intel / intel-extension-for-pytorch

A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
Apache License 2.0
1.55k stars 236 forks source link

IFFTRN Arguments RuntimeError: FFT_INVALID_DESCRIPTOR #613

Closed KPoletti closed 4 months ago

KPoletti commented 4 months ago

Describe the bug

Hi,

I am running into a bug similar to Issue #479.

I am trying to use torch.ff.irfftn with the optional arguments of s, dim, and norm.

While I can run the example given in the original issue, I receive the same error when I add in the arguments of s and/or dim (norm does not trigger the error). All arguments work on Nvidia GPU's.

Examples

All the cases return the same error:

import torch 
import intel_extension_for_pytorch as ipex

x = torch.rand(1000,1000,1,3).to(torch.device("xpu"))
# case 1 
y = torch.fft.irfftn(x,s=[10,10])
# case 2
y = torch.fft.irfftn(x, dim=[0])
# case 3
y = torch.fft.irfftn(x, s=[10,10],dim=[0,1])

Error:

FFT WARNING: INPUT_STRIDES and OUTPUT_STRIDES are deprecated: please use FWD_STRIDES and BWD_STRIDES, instead.

FFT WARNING: INPUT_STRIDES and OUTPUT_STRIDES are deprecated: please use FWD_STRIDES and BWD_STRIDES, instead.

FFT WARNING: INPUT_STRIDES and OUTPUT_STRIDES are deprecated: please use FWD_STRIDES and BWD_STRIDES, instead.

FFT WARNING: INPUT_STRIDES and OUTPUT_STRIDES are deprecated: please use FWD_STRIDES and BWD_STRIDES, instead.

Traceback (most recent call last):
  File "/work2/08770/kp32595/stampede3/PythonTest/ifft.py", line 10, in <module>
    y = torch.fft.irfftn(x,s=[10,10])
RuntimeError: FFT_INVALID_DESCRIPTOR

Versions

Collecting environment information... PyTorch version: 2.1.0.post0+cxx11.abi PyTorch CXX11 ABI: Yes IPEX version: 2.1.20+xpu IPEX commit: b78b4d97e Build type: Release

OS: Rocky Linux 9.2 (Blue Onyx) (x86_64) GCC version: (GCC) 13.2.0 Clang version: N/A IGC version: 2024.1.0 (2024.1.0.20240308) CMake version: version 3.28.1 Libc version: glibc-2.34

Python version: 3.10.14 (main, Mar 21 2024, 16:24:04) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34 Is XPU available: True DPCPP runtime version: 2024.0 MKL version: 2024.0 GPU models and configuration: [0] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [1] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [2] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [3] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [4] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [5] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [6] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) [7] _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512) Intel OpenCL ICD version: 23.43.27642.40-803.el9_2 Level Zero version: 1.3.27642.40-803.el9_2

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 96 On-line CPU(s) list: 0-95 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) Platinum 8468 CPU family: 6 Model: 143 Thread(s) per core: 1 Core(s) per socket: 48 Socket(s): 2 Stepping: 8 CPU max MHz: 3800.0000 CPU min MHz: 800.0000 BogoMIPS: 4200.00 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 dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 4.5 MiB (96 instances) L1i cache: 3 MiB (96 instances) L2 cache: 192 MiB (96 instances) L3 cache: 210 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94 NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers Vulnerability Spectre v2: Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] configmypy==0.1.0 [pip3] intel-extension-for-pytorch==2.1.20+xpu [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.26.4 [pip3] tensorly-torch==0.4.0 [pip3] torch==2.1.0.post0+cxx11.abi [pip3] torch-harmonics==0.6.5 [pip3] torchvision==0.16.0.post0+cxx11.abi [conda] intel-extension-for-pytorch 2.1.20 py310_xpu_1 intel [conda] mkl 2024.1.0 intel_691 intel [conda] mkl-dpcpp 2024.1.0 intel_691 intel [conda] mkl-include 2024.1.0 intel_691 intel [conda] mkl-static 2024.1.0 intel_691 intel [conda] numpy 1.26.4 py310heeff2f4_0
[conda] numpy-base 1.26.4 py310h8a23956_0
[conda] onemkl-sycl-blas 2024.1.0 intel_691 intel [conda] onemkl-sycl-datafitting 2024.1.0 intel_691 intel [conda] onemkl-sycl-dft 2024.1.0 intel_691 intel [conda] onemkl-sycl-lapack 2024.1.0 intel_691 intel [conda] onemkl-sycl-rng 2024.1.0 intel_691 intel [conda] onemkl-sycl-sparse 2024.1.0 intel_691 intel [conda] onemkl-sycl-stats 2024.1.0 intel_691 intel [conda] onemkl-sycl-vm 2024.1.0 intel_691 intel [conda] pytorch 2.1.0 py310_xpu_2 intel [conda] tensorly-torch 0.4.0 pypi_0 pypi [conda] torch-harmonics 0.6.5 pypi_0 pypi [conda] torchvision 0.16.0 py310_xpu_2 intel

ZailiWang commented 4 months ago

Thanks for reporting this. I reproduced the issue at my side and have triggered an internal investigation process for it. Will let you know if any progress.

ZailiWang commented 4 months ago

The issue will be fixed in next IPEX xpu release.

KPoletti commented 4 months ago

Thanks so much!