Open
Conversation
`dpclang` compiler is an open source version of the closed source Intel DPC++ compiler. `dpclang` is being supported by Intel in the https://github.com/intel/llvm public repository and got recently packaged into upcoming Ubuntu 26.04 LTS. This commit enables minimal support of `dpclang` compiler in PyTorch building towards fully open source PyTorch stack on Linux. Limitations: * Kineto, XCCL and oneMKL paths were not enabled and might require additional work * SYCL-TLA, oneDNN and Pytorch itself might require additional changes to properly handle dpclang compiler as it does not support `__INTEL_LLVM_COMPILER` macro We will address above limitations in the follow up patches. At the moment the following procedure can be used to build PyTorch for XPU with `dpclang` compiler on Ubuntu 26.04: * Do NOT activate oneAPI environment * Install open source DPC++ compiler, OpenCL and few other tools with: ``` apt-get install dpclang-6 ocl-icd-opencl-dev pkg-config libze-dev ``` * Build PyTorch as follows: ``` XPU_SYCL_COMPILER=dpclang USE_KINETO=0 USE_ONEMKL_XPU=0 \ python3 setup.py develop ``` Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
dvrogozh
added a commit
to dvrogozh/pytorch
that referenced
this pull request
Apr 8, 2026
`dpclang` compiler is an open source version of the closed source Intel DPC++ compiler. `dpclang` is being supported by Intel in the https://github.com/intel/llvm public repository and got recently packaged into upcoming Ubuntu 26.04 LTS. This commit enables minimal support of `dpclang` compiler in PyTorch building towards fully open source PyTorch stack on Linux. Limitations: * Kineto, XCCL and oneMKL paths were not enabled and might require additional work * SYCL-TLA, oneDNN and Pytorch itself might require additional changes to properly handle dpclang compiler as it does not support `__INTEL_LLVM_COMPILER` macro We will address above limitations in the follow up patches. At the moment the following procedure can be used to build PyTorch for XPU with `dpclang` compiler on Ubuntu 26.04: * Do NOT activate oneAPI environment * Install open source DPC++ compiler, OpenCL and few other tools with: ``` apt-get install dpclang-6 ocl-icd-opencl-dev pkg-config libze-dev ``` * Build PyTorch as follows: ``` XPU_SYCL_COMPILER=dpclang USE_KINETO=0 USE_ONEMKL_XPU=0 \ python3 setup.py develop ``` The dependency from intel/torch-xpu-ops#3287 is weak in a sense that the change is transparent to the current production build of the PyTorch for XPU using oneAPI DL Essentials. The change in torch-xpu-ops is only required for the build with the `dpclang`. Needs: intel/torch-xpu-ops#3287 Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dpclangcompiler is an open source version of the closed source Intel DPC++ compiler.dpclangis being supported by Intel in the https://github.com/intel/llvm public repository and got recently packaged into upcoming Ubuntu 26.04 LTS.This commit enables minimal support of
dpclangcompiler in PyTorch building towards fully open source PyTorch stack on Linux. Limitations:__INTEL_LLVM_COMPILERmacroWe will address above limitations in the follow up patches. At the moment the following procedure can be used to build PyTorch for XPU with
dpclangcompiler on Ubuntu 26.04:The dependency from pytorch/pytorch#179763 is weak in a sense that the change is transparent to the current production build of the PyTorch for XPU using oneAPI DL Essentials. The change in torch-xpu-ops is only required for the build with the dpclang.
Needs: pytorch/pytorch#179763
CC: @guangyey @EikanWang @chuanqi129 @frenchwr