pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
https://pytorch.org
Other
82.71k stars 22.28k forks source link

missing thrust/complex.h PyTorch_rocm on gfx1032 #136442

Open brcisna opened 1 week ago

brcisna commented 1 week ago

🐛 Describe the bug

Debain 13 python3.10.12 venv pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.1

When trying to compile xformers built against PYTorch2.4.1_rocm I receive the following error

Error log

`/home/superuser/.pyenv/versions/wunjo/lib/python3.10/site-packages/torch/include/c10/util/complex.h:8:10: fatal error: 'thrust/complex.h' file not found 8 | #include <thrust/complex.h> | ^~~~~~ 1 error generated when compiling for gfx1032.

After this point there are endless errors in the compile routine. Not sure what I am missing. Am very green at this.

TIA

Versions

python collect_env.py Collecting environment information... PyTorch version: 2.4.1+rocm6.1 Is debug build: False CUDA used to build PyTorch: N/A ROCM used to build PyTorch: 6.1.40091-a8dbc0c19

OS: Debian GNU/Linux trixie/sid (x86_64) GCC version: (Debian 14.2.0-3) 14.2.0 Clang version: Could not collect CMake version: version 3.30.3 Libc version: glibc-2.40

Python version: 3.10.12 (main, Sep 17 2024, 03:58:18) [GCC 14.2.0] (64-bit runtime) Python platform: Linux-6.10.9-amd64-x86_64-with-glibc2.40 Is CUDA available: True CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: AMD Radeon Pro W6600 (gfx1032) Nvidia driver version: Could not collect cuDNN version: Could not collect HIP runtime version: 6.1.40091 MIOpen runtime version: 3.1.0 Is XNNPACK available: True

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 40 On-line CPU(s) list: 0-39 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz CPU family: 6 Model: 63 Thread(s) per core: 2 Core(s) per socket: 10 Socket(s): 2 Stepping: 2 CPU(s) scaling MHz: 49% CPU max MHz: 3000.0000 CPU min MHz: 1200.0000 BogoMIPS: 4589.20 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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf 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 cpuid_fault epb pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts vnmi md_clear flush_l1d Virtualization: VT-x L1d cache: 640 KiB (20 instances) L1i cache: 640 KiB (20 instances) L2 cache: 5 MiB (20 instances) L3 cache: 50 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-9,20-29 NUMA node1 CPU(s): 10-19,30-39 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Meltdown: Mitigation; PTI Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.23.5 [pip3] onnx==1.16.2 [pip3] onnxruntime==1.19.2 [pip3] onnxruntime-gpu==1.19.2 [pip3] open_clip_torch==2.26.1 [pip3] pytorch-lightning==2.3.3 [pip3] pytorch-ranger==0.1.1 [pip3] pytorch-triton-rocm==3.0.0 [pip3] torch==2.4.1+rocm6.1 [pip3] torch-optimizer==0.3.0 [pip3] torchaudio==2.4.1+rocm6.1 [pip3] torchlibrosa==0.1.0 [pip3] torchmetrics==1.2.0 [pip3] torchvision==0.19.1+rocm6.1 [pip3] triton==2.1.0 [conda] Could not collect lect_env.py Collecting environment information... PyTorch version: 2.4.1+rocm6.1 Is debug build: False CUDA used to build PyTorch: N/A ROCM used to build PyTorch: 6.1.40091-a8dbc0c19

OS: Debian GNU/Linux trixie/sid (x86_64) GCC version: (Debian 14.2.0-3) 14.2.0 Clang version: Could not collect CMake version: version 3.30.3 Libc version: glibc-2.40

Python version: 3.10.12 (main, Sep 17 2024, 03:58:18) [GCC 14.2.0] (64-bit runtime) Python platform: Linux-6.10.9-amd64-x86_64-with-glibc2.40 Is CUDA available: True CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: AMD Radeon Pro W6600 (gfx1032) Nvidia driver version: Could not collect cuDNN version: Could not collect HIP runtime version: 6.1.40091 MIOpen runtime version: 3.1.0 Is XNNPACK available: True

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 40 On-line CPU(s) list: 0-39 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz CPU family: 6 Model: 63 Thread(s) per core: 2 Core(s) per socket: 10 Socket(s): 2 Stepping: 2 CPU(s) scaling MHz: 57% CPU max MHz: 3000.0000 CPU min MHz: 1200.0000 BogoMIPS: 4589.20 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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf 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 cpuid_fault epb pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts vnmi md_clear flush_l1d Virtualization: VT-x L1d cache: 640 KiB (20 instances) L1i cache: 640 KiB (20 instances) L2 cache: 5 MiB (20 instances) L3 cache: 50 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-9,20-29 NUMA node1 CPU(s): 10-19,30-39 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Meltdown: Mitigation; PTI Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.23.5 [pip3] onnx==1.16.2 [pip3] onnxruntime==1.19.2 [pip3] onnxruntime-gpu==1.19.2 [pip3] open_clip_torch==2.26.1 [pip3] pytorch-lightning==2.3.3 [pip3] pytorch-ranger==0.1.1 [pip3] pytorch-triton-rocm==3.0.0 [pip3] torch==2.4.1+rocm6.1 [pip3] torch-optimizer==0.3.0 [pip3] torchaudio==2.4.1+rocm6.1 [pip3] torchlibrosa==0.1.0 [pip3] torchmetrics==1.2.0 [pip3] torchvision==0.19.1+rocm6.1 [pip3] triton==2.1.0 [conda] Could not collect

cc @seemethere @malfet @osalpekar @atalman @zou3519 @xmfan @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang

hongxiayang commented 1 week ago

Can you do a find for complex.h in your /opt/rocm directory? it should be located in your rocm installation, for example: I have that file in below directory: /opt/rocm/include/thrust/complex.h

jithunnair-amd commented 1 week ago

Please set ROCM_PATH env var if your ROCm installation is not in /opt/rocm