-
Notifications
You must be signed in to change notification settings - Fork 288
Closed
Labels
Description
Describe the bug
Hi, I try to use intel-extension-for-pytorch for nn training and get a error with very simple code blow:
import torch
import intel_extension_for_pytorch as ipex
import numpy
device = torch.device('xpu')
original_tensor = torch.from_numpy(numpy.array([1,2,3])).to(device)
next_tensor = original_tensor.clone()
and the error is shown blow:
[W OperatorEntry.cpp:150] Warning: Overriding a previously registered kernel for the same operator and the same dispatch key
operator: torchvision::nms
no debug info
dispatch key: CPU
previous kernel: registered at /build/intel-pytorch-extension/csrc/cpu/aten/TorchVisionNms.cpp:47
new kernel: registered at /opt/workspace/vision/torchvision/csrc/ops/cpu/nms_kernel.cpp:112 (function registerKernel)
py38_reflectance_intelexttorch/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File "tesr.py", line 7, in <module>
next_tensor = original_tensor.clone()
RuntimeError: The program was built for 1 devices
Build program log for 'Intel(R) Graphics [0x5690]':
warning: module got recompiled from IR because provided native binary is incompatible with underlying device and/or driver [-Wrecompiled-from-ir]
error: Double type is not supported on this platform.
in kernel: 'typeinfo name for void at::AtenIpexTypeXPU::launch_unrolled_kernel<4, at::impl::copy_device_to_device(at::TensorIterator&, bool)::'lambda5'()::operator()() const::'lambda6'()::operator()() const::'lambda'(c10::complex<double>), xpu::dpcpp::Array<char*, 2>, TrivialOffsetCalculator<1, unsigned int>, TrivialOffsetCalculator<1, unsigned int>, at::native::Memory::LoadWithCast<1, true>, at::native::Memory::StoreWithCast<true> >(long, at::impl::copy_device_to_device(at::TensorIterator&, bool)::'lambda5'()::operator()() const::'lambda6'()::operator()() const::'lambda'(c10::complex<double>) const&, xpu::dpcpp::Array<char*, 2>, TrivialOffsetCalculator<1, unsigned int>, TrivialOffsetCalculator<1, unsigned int>, at::native::Memory::LoadWithCast<1, true>, at::native::Memory::StoreWithCast<true>)::'lambda'(sycl::_V1::handler&)::operator()(sycl::_V1::handler&) const::'lambda'(sycl::_V1::nd_item<1>)'
error: backend compiler failed build.
error: Double type is not supported on this platform.
in kernel: 'typeinfo name for void at::AtenIpexTypeXPU::launch_unrolled_kernel<4, at::impl::copy_device_to_device(at::TensorIterator&, bool)::'lambda5'()::operator()() const::'lambda6'()::operator()() const::'lambda'(c10::complex<double>), xpu::dpcpp::Array<char*, 2>, TrivialOffsetCalculator<1, unsigned int>, TrivialOffsetCalculator<1, unsigned int>, at::native::Memory::LoadWithCast<1, true>, at::native::Memory::StoreWithCast<true> >(long, at::impl::copy_device_to_device(at::TensorIterator&, bool)::'lambda5'()::operator()() const::'lambda6'()::operator()() const::'lambda'(c10::complex<double>) const&, xpu::dpcpp::Array<char*, 2>, TrivialOffsetCalculator<1, unsigned int>, TrivialOffsetCalculator<1, unsigned int>, at::native::Memory::LoadWithCast<1, true>, at::native::Memory::StoreWithCast<true>)::'lambda'(sycl::_V1::handler&)::operator()(sycl::_V1::handler&) const::'lambda'(sycl::_V1::nd_item<1>)'
error: backend compiler failed build.
-11 (PI_ERROR_BUILD_PROGRAM_FAILURE)
Versions
The versions is :
Collecting environment information...
PyTorch version: 1.13.0a0+gitb1dde16
PyTorch CXX11 ABI: Yes
IPEX version: 1.13.10+xpu
IPEX commit: 7d85b0e92
Build type: Release
OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: N/A
IGC version: 2023.0.0 (2023.0.0.20221201)
CMake version: version 3.23.2
Libc version: glibc-2.31
Python version: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.14.0-1047-oem-x86_64-with-glibc2.29
Is XPU available: True
DPCPP runtime version: 2023.0.0
MKL version: 2023.0.0
GPU models and configuration:
[0] _DeviceProperties(name='Intel(R) Graphics [0x5690]', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=0, total_memory=15473MB, max_compute_units=512)
[1] _DeviceProperties(name='Intel(R) Graphics [0x4626]', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=0, total_memory=25348MB, max_compute_units=96)
Intel OpenCL ICD version: 22.24.23453+i392~u20.04
Level Zero version: 1.3.23453+i392~u20.04
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 20
On-line CPU(s) list: 0-19
Thread(s) per core: 1
Core(s) per socket: 14
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 154
Model name: 12th Gen Intel(R) Core(TM) i7-12700H
Stepping: 3
CPU MHz: 2700.000
CPU max MHz: 4700.0000
CPU min MHz: 400.0000
BogoMIPS: 5376.00
Virtualization: VT-x
L1d cache: 336 KiB
L1i cache: 224 KiB
L2 cache: 8.8 MiB
NUMA node0 CPU(s): 0-19
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] intel-extension-for-pytorch==1.13.10+xpu
[pip3] msgpack-numpy==0.4.8
[pip3] numpy==1.24.2
[pip3] torch==1.13.0a0+gitb1dde16
[pip3] torchvision==0.14.1a0+0504df5
[conda] mkl 2022.2.0 intel_8748 file:///opt/intel/oneapi/conda_channel
[conda] mkl-dpcpp 2022.2.0 intel_8748 file:///opt/intel/oneapi/conda_channel
[conda] mkl-service 2.4.0 py39h7634626_12 file:///opt/intel/oneapi/conda_channel
[conda] mkl_fft 1.3.1 py39h1909d4f_16 file:///opt/intel/oneapi/conda_channel
[conda] mkl_random 1.2.2 py39h94ca54a_16 file:///opt/intel/oneapi/conda_channel
[conda] mkl_umath 0.1.1 py39h0348192_26 file:///opt/intel/oneapi/conda_channel
[conda] numpy 1.21.4 py39h8dc10e9_16 file:///opt/intel/oneapi/conda_channel
[conda] numpy-base 1.21.4 py39h97bc315_16 file:///opt/intel/oneapi/conda_channel
Thanks!