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>
`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>
|
@dvrogozh |
|
@tsocha, I will file an issue today to start tracking tasks required for enabling pytorch build against Linux provided dependencies instead of oneAPI and break down the planned steps in there. |
|
@EikanWang WDYT |
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