Skip to content

BUILD_SEPARATE_OPS=ON leads to failure when building PyTorch for XPU on Windows #2031

@Oscilloscope98

Description

@Oscilloscope98

Flag BUILD_SEPARATE_OPS=ON leads to failure when building PyTorch for XPU on Windows.

Parts of error log:

[410/889] Linking CXX shared library bin\torch-xpu-ops-sycl-NestedTensorTransformerFunctionKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-NestedTensorTransformerFunctionKernels.dll lib/torch-xpu-ops-sycl-NestedTensorTransformerFunctionKernels.lib 
... failed (exit code 1181) with the following output:
LINK : fatal error LNK1181: 无法打开输入文件“caffe2\aten_xpu\src\CMakeFiles\torch-xpu-ops-sycl-NestedTensorTransformerFunctionKernels.dir\ATen\native\nested\xpu\sycl\torch-xpu-ops-sycl-NestedTensorTransformerFunctionKernels_gen_NestedTensorTransformerFunctionKernels.cpp.obj”

[411/889] Linking CXX shared library bin\torch-xpu-ops-sycl-QuantizedMaxPool2d.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-QuantizedMaxPool2d.dll lib/torch-xpu-ops-sycl-QuantizedMaxPool2d.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-QuantizedMaxPool2d_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-QuantizedMaxPool2d.lib 和对象 lib\torch-xpu-ops-sycl-QuantizedMaxPool2d.exp

torch-xpu-ops-sycl-QuantizedMaxPool2d_gen_QuantizedMaxPool2d.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclDeviceMaxWorkGroupSize(signed char)" (?syclDeviceMaxWorkGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-QuantizedMaxPool2d.dll : fatal error LNK1120: 1 个无法解析的外部命令

[412/889] Linking CXX shared library bin\torch-xpu-ops-sycl-FusedObsFakeQuantKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-FusedObsFakeQuantKernels.dll lib/torch-xpu-ops-sycl-FusedObsFakeQuantKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-FusedObsFakeQuantKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-FusedObsFakeQuantKernels.lib 和对象 lib\torch-xpu-ops-sycl-FusedObsFakeQuantKernels.exp

torch-xpu-ops-sycl-FusedObsFakeQuantKernels_gen_FusedObsFakeQuantKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-FusedObsFakeQuantKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[413/889] Linking CXX shared library bin\torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.dll lib/torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.lib 和对象 lib\torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.exp

torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels_gen_MakePerTensorQuantizedTensorKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-MakePerTensorQuantizedTensorKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[414/889] Linking CXX shared library bin\torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.dll lib/torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.lib 和对象 lib\torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.exp

torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels_gen_SparseBinaryOpIntersectionKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-SparseBinaryOpIntersectionKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[415/889] Linking CXX shared library bin\torch-xpu-ops-sycl-AffineQuantizerKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-AffineQuantizerKernels.dll lib/torch-xpu-ops-sycl-AffineQuantizerKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-AffineQuantizerKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-AffineQuantizerKernels.lib 和对象 lib\torch-xpu-ops-sycl-AffineQuantizerKernels.exp

torch-xpu-ops-sycl-AffineQuantizerKernels_gen_AffineQuantizerKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-AffineQuantizerKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[416/889] Linking CXX shared library bin\torch-xpu-ops-sycl-FakeQuantizeCoreKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-FakeQuantizeCoreKernels.dll lib/torch-xpu-ops-sycl-FakeQuantizeCoreKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-FakeQuantizeCoreKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-FakeQuantizeCoreKernels.lib 和对象 lib\torch-xpu-ops-sycl-FakeQuantizeCoreKernels.exp

torch-xpu-ops-sycl-FakeQuantizeCoreKernels_gen_FakeQuantizeCoreKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-FakeQuantizeCoreKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[417/889] Linking CXX shared library bin\torch-xpu-ops-sycl-SparseCsrTensorMathKernels.dll
FAILED: [code=4294967295] bin/torch-xpu-ops-sycl-SparseCsrTensorMathKernels.dll lib/torch-xpu-ops-sycl-SparseCsrTensorMathKernels.lib 
... failed (exit code 1120) with the following output:
torch-xpu-ops-sycl-SparseCsrTensorMathKernels_sycl_device_obj.obj : warning LNK4078: 找到多个“__CLANG_OFFLOAD_BUNDLE__sycl-spi”节,它们具有不同的特性(40500040)

  正在创建库 lib\torch-xpu-ops-sycl-SparseCsrTensorMathKernels.lib 和对象 lib\torch-xpu-ops-sycl-SparseCsrTensorMathKernels.exp

torch-xpu-ops-sycl-SparseCsrTensorMathKernels_gen_SparseCsrTensorMathKernels.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) struct c10::xpu::DeviceProp * __cdecl at::xpu::getDeviceProperties(signed char)" (__imp_?getDeviceProperties@xpu@at@@YAPEAUDeviceProp@1c10@@C@Z),函数 "__int64 __cdecl xpu::sycl::syclMaxSubGroupSize(signed char)" (?syclMaxSubGroupSize@sycl@xpu@@YA_JC@Z) 中引用了该符号

bin\torch-xpu-ops-sycl-SparseCsrTensorMathKernels.dll : fatal error LNK1120: 1 个无法解析的外部命令

[418/889] Linking CXX shared library bin\torch_xpu.dll
[419/889] Building CXX object caffe2\aten_xpu\src\CMakeFiles\torch_xpu_ops_aten.dir\__\__\__\xpu\ATen\RegisterXPU_0.cpp.obj
ninja: build stopped: subcommand failed.
-- Checkout nccl release tag: v2.27.5-1

Build details:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions