Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build Pytorch XPU on Windows Server #1151

Open
DDEle opened this issue Dec 9, 2024 · 0 comments
Open

Failed to build Pytorch XPU on Windows Server #1151

DDEle opened this issue Dec 9, 2024 · 0 comments
Assignees

Comments

@DDEle
Copy link
Contributor

DDEle commented Dec 9, 2024

🐛 Describe the bug

I got the following error message when build pytorch with xpu-ops, both on BaseKit 2024.2.1 and BaseKit 2025.0.

[7431/7561] Building SYCL device link file caffe2/aten_xpu/src/CMakeFiles/torch_xpu_ops_sycl_kernels.dir/torch_xpu_ops_sycl_kernels_sycl_device_obj.obj
FAILED: caffe2/aten_xpu/src/CMakeFiles/torch_xpu_ops_sycl_kernels.dir/torch_xpu_ops_sycl_kernels_sycl_device_obj.obj D:/dingyi/pytorch/build/caffe2/aten_xpu/src/CMakeFiles/torch_xpu_ops_sycl_kernels.dir/torch_xpu_ops_sycl_kernels_sycl_device_obj.obj 
caffe2\aten_xpu\src\CMakeFiles\torch_xpu_ops_sycl_kernels_sycl_device_obj.obj-a7899af.bat e9da7c94967a2b23
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.0.0 Build 20241008
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.



C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\bin\compiler\clang-offload-bundler: error: 'D:/dingyi/pytorch/build/caff2/aten_xpu/src/CMakeFiles/torch_xpu_ops_sycl_kernels.dir/ATen/native/xpu/sycl/./torch_xpu_ops_sycl_kernels_generated_LerpKernels.cpp.obj': no such file or directory

icx: error: clang-offload-bundler command failed with exit code 1 (use -v to see invocation)

Batch file failed at line 3 with errorcode 1

Notice that it does have the .cpp.obj file on the disk, and the command inside torch_xpu_ops_sycl_kernels_sycl_device_obj.obj-a7899af.bat can be executed successfully when pasted to a powshell prompt (but give the same error when pasted to a CMD promot).

Step-by-step to reproduce:

C:\ProgramData\miniforge3\Scripts\activate
conda activate yi
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
set XPU_BUNDLE_ROOT=%ProgramFiles(x86)%\Intel\oneAPI
call "%XPU_BUNDLE_ROOT%\compiler\latest\env\vars.bat"
call "%XPU_BUNDLE_ROOT%\ocloc\latest\env\vars.bat"
set CMAKE_SHARED_LINKER_FLAGS=/FORCE:MULTIPLE
set CMAKE_MODULE_LINKER_FLAGS=/FORCE:MULTIPLE
set CMAKE_EXE_LINKER_FLAGS=/FORCE:MULTIPLE
set USE_CUDA=0
python setup.py bdist_wheel > build.log 2>&1

Content of torch_xpu_ops_sycl_kernels_sycl_device_obj.obj-a7899af.bat.txt here (added .txt dur to the limitation of github)

Versions

Torch Sorce version: pytorch/pytorch@7851460

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Microsoft Windows Server 2016 Datacenter (10.0.14393 64-bit)
GCC version: (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders) 13.1.0
Clang version: Could not collect
CMake version: version 3.30.1
Libc version: N/A

Python version: 3.9.19 | packaged by conda-forge | (main, Mar 20 2024, 12:38:46) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.14393-SP0
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

CPU:
----------------------
Name: Intel(R) Xeon(R) Platinum 8260L CPU @ 2.30GHz
Manufacturer: GenuineIntel
Family: 179
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2295
MaxClockSpeed: 2295
L2CacheSize: 24576
L2CacheSpeed: None
Revision: 21765
----------------------
Name: Intel(R) Xeon(R) Platinum 8260L CPU @ 2.30GHz
Manufacturer: GenuineIntel
Family: 179
Architecture: 9
ProcessorType: 3
DeviceID: CPU1
CurrentClockSpeed: 2295
MaxClockSpeed: 2295
L2CacheSize: 24576
L2CacheSpeed: None
Revision: 21765

Versions of relevant libraries:
[pip3] numpy==1.26.4
[conda] numpy                     1.26.4                   pypi_0    pypi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants