-
Notifications
You must be signed in to change notification settings - Fork 62
Description
🐛 Describe the bug
After migrate the test_higher_order_ops.py to XPU. The test case test_dropout still failed with error
Error message
========================================================================= FAILURES =========================================================================
________________________________________________________ ActivationCheckpointingTests.test_dropout _________________________________________________________
Traceback (most recent call last):
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3224, in wrapper
method(*args, **kwargs)
File "/home/erxin/torch-ut/v/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/erxin/torch-ut/pytorch/test/dynamo/test_higher_order_ops.py", line 6914, in test_dropout
self._validate(
File "/home/erxin/torch-ut/pytorch/test/dynamo/test_higher_order_ops.py", line 6842, in _validate
result = opt_fn(*cloned_args)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 817, in compile_wrapper
raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1998, in _call_user_compiler
raise BackendCompilerFailed(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1973, in call_user_compiler
compiled_fn = compiler_fn(gm, example_inputs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/dynamo/repro/after_dynamo.py", line 156, in call
compiled_gm = compiler_fn(gm, example_inputs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/init.py", line 2424, in call
return self.compiler_fn(model, inputs, **self.kwargs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/backends/common.py", line 117, in call
cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1105, in aot_module_simplified
aot_graph_capture = aot_stage1_graph_capture(aot_state, functional_call)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 161, in aot_stage1_graph_capture
aot_dispatch_autograd_graph(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture.py", line 379, in aot_dispatch_autograd_graph
create_functionalized_fn(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture_wrappers.py", line 1048, in create_functionalized_fn
helper, args, args_descs = create_functionalized_rng_ops_wrapper(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture_wrappers.py", line 497, in create_functionalized_rng_ops_wrapper
fwd_seed, fwd_base_offset = CUDARngStateHelper.get_torch_state_as_tuple(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_prims_common/init.py", line 2125, in get_torch_state_as_tuple
raise RuntimeError("CUDA not available")
torch._dynamo.exc.BackendCompilerFailed: backend='compiler_fn' raised:
RuntimeError: CUDA not available
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
To execute this test, run the following from the base repo dir:
python test/dynamo/test_higher_order_ops.py ActivationCheckpointingTests.test_dropout
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
------------------------------------------------------------------- Captured stdout call -------------------------------------------------------------------
frames [('total', 1)]
inline_call []
stats [('calls_captured', 3)]
aot_autograd [('total', 1), ('not_ok', 1)]
____________________________________________________ ActivationCheckpointingTests.test_dropout_inductor ____________________________________________________
Traceback (most recent call last):
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/home/erxin/torch-ut/v/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 3224, in wrapper
method(*args, **kwargs)
File "/home/erxin/torch-ut/v/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/erxin/torch-ut/pytorch/test/dynamo/test_higher_order_ops.py", line 6933, in test_dropout_inductor
self._validate(
File "/home/erxin/torch-ut/pytorch/test/dynamo/test_higher_order_ops.py", line 6842, in _validate
result = opt_fn(*cloned_args)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 817, in compile_wrapper
raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1998, in _call_user_compiler
raise BackendCompilerFailed(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1973, in call_user_compiler
compiled_fn = compiler_fn(gm, example_inputs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/dynamo/repro/after_dynamo.py", line 156, in call
compiled_gm = compiler_fn(gm, example_inputs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/init.py", line 2379, in call
return compile_fx(model, inputs, config_patches=self.config)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 2569, in compile_fx
return aot_autograd(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_dynamo/backends/common.py", line 117, in call
cg = aot_module_simplified(gm, example_inputs, **self.kwargs)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/aot_autograd.py", line 1105, in aot_module_simplified
aot_graph_capture = aot_stage1_graph_capture(aot_state, functional_call)
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_compile.py", line 161, in aot_stage1_graph_capture
aot_dispatch_autograd_graph(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture.py", line 379, in aot_dispatch_autograd_graph
create_functionalized_fn(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture_wrappers.py", line 1048, in create_functionalized_fn
helper, args, args_descs = create_functionalized_rng_ops_wrapper(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/graph_capture_wrappers.py", line 497, in create_functionalized_rng_ops_wrapper
fwd_seed, fwd_base_offset = CUDARngStateHelper.get_torch_state_as_tuple(
File "/home/erxin/torch-ut/v/lib/python3.10/site-packages/torch/_prims_common/init.py", line 2125, in get_torch_state_as_tuple
raise RuntimeError("CUDA not available")
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
RuntimeError: CUDA not available
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
To execute this test, run the following from the base repo dir:
python test/dynamo/test_higher_order_ops.py ActivationCheckpointingTests.test_dropout_inductor
This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
------------------------------------------------------------------- Captured stdout call -------------------------------------------------------------------
frames [('total', 1)]
inline_call []
stats [('calls_captured', 3)]
aot_autograd [('total', 1), ('autograd_cache_bypass', 1), ('not_ok', 1)]
Branch Info
torch main branch
The failure detail
torch_prims_common_init_.py contains unmigrated code which still hardcode to check CUDA.
Versions
2025-08-27 06:49:51 (27.4 MB/s) - ‘collect_env.py’ saved [30687/30687]
Collecting environment information...
PyTorch version: 2.9.0.dev20250825+xpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 4.1.0
Libc version: glibc-2.35
Python version: 3.10.18 | packaged by conda-forge | (main, Jun 4 2025, 14:45:41) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: True
XPU used to build PyTorch: 20250101
Intel GPU driver version:
level-zero: 1.0.0-92u22.0422.04
intel-opencl-icd: 25.05.32567.19-1099
libze1: 1.20.2.0-1098~22.04
Intel GPU models onboard:
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel(R) Data Center GPU Max 1100
Intel GPU models detected:
[0] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[1] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[2] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[3] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[4] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[5] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[6] _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1100', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', device_id=0xBDA, driver_version='1.6.32567+19', total_memory=49152MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 192
On-line CPU(s) list: 0-191
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8468V
CPU family: 6
Model: 143
Thread(s) per core: 2
Core(s) per socket: 48
Socket(s): 2
Stepping: 8
Frequency boost: enabled
CPU max MHz: 2401.0000
CPU min MHz: 800.0000
BogoMIPS: 4800.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 intel_ppin 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 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: 195 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-47,96-143
NUMA node1 CPU(s): 48-95,144-191
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: 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, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] dpcpp-cpp-rt==2025.1.1
[pip3] impi-rt==2021.15.0
[pip3] intel-cmplr-lib-rt==2025.1.1
[pip3] intel-cmplr-lib-ur==2025.1.1
[pip3] intel-cmplr-lic-rt==2025.1.1
[pip3] intel-opencl-rt==2025.1.1
[pip3] intel-openmp==2025.1.1
[pip3] intel-pti==0.12.3
[pip3] intel-sycl-rt==2025.1.1
[pip3] mkl==2025.1.0
[pip3] numpy==2.2.6
[pip3] oneccl==2021.15.2
[pip3] oneccl-devel==2021.15.2
[pip3] onemkl-sycl-blas==2025.1.0
[pip3] onemkl-sycl-dft==2025.1.0
[pip3] onemkl-sycl-lapack==2025.1.0
[pip3] onemkl-sycl-rng==2025.1.0
[pip3] onemkl-sycl-sparse==2025.1.0
[pip3] optree==0.17.0
[pip3] pytorch-triton-xpu==3.4.0+git0958dc9b
[pip3] tbb==2022.1.0
[pip3] tcmlib==1.3.0
[pip3] torch==2.9.0.dev20250825+xpu
[pip3] umf==0.10.0
[conda] dpcpp-cpp-rt 2025.1.1 pypi_0 pypi
[conda] impi-rt 2021.15.0 pypi_0 pypi
[conda] intel-cmplr-lib-rt 2025.1.1 pypi_0 pypi
[conda] intel-cmplr-lib-ur 2025.1.1 pypi_0 pypi
[conda] intel-cmplr-lic-rt 2025.1.1 pypi_0 pypi
[conda] intel-opencl-rt 2025.1.1 pypi_0 pypi
[conda] intel-openmp 2025.1.1 pypi_0 pypi
[conda] intel-pti 0.12.3 pypi_0 pypi
[conda] intel-sycl-rt 2025.1.1 pypi_0 pypi
[conda] mkl 2025.1.0 pypi_0 pypi
[conda] numpy 2.2.6 pypi_0 pypi
[conda] oneccl 2021.15.2 pypi_0 pypi
[conda] oneccl-devel 2021.15.2 pypi_0 pypi
[conda] onemkl-sycl-blas 2025.1.0 pypi_0 pypi
[conda] onemkl-sycl-dft 2025.1.0 pypi_0 pypi
[conda] onemkl-sycl-lapack 2025.1.0 pypi_0 pypi
[conda] onemkl-sycl-rng 2025.1.0 pypi_0 pypi
[conda] onemkl-sycl-sparse 2025.1.0 pypi_0 pypi
[conda] optree 0.17.0 pypi_0 pypi
[conda] pytorch-triton-xpu 3.4.0+git0958dc9b pypi_0 pypi
[conda] tbb 2022.1.0 pypi_0 pypi
[conda] tcmlib 1.3.0 pypi_0 pypi
[conda] torch 2.9.0.dev20250825+xpu pypi_0 pypi
[conda] umf 0.10.0 pypi_0 pypi