Skip to content

[Bug Skip]: functorch\test_aotdispatch_xpu.py AssertionError: Expected hasattr(..., '_dynamo_weak_dynamic_indices') to be True #3786

@bjarzemb

Description

@bjarzemb

🐛 Describe the bug

Multiple test_mark_activations_dynamic test cases fail on Windows with Intel XPU (Arc B580) with AssertionError: Expected hasattr(..., '_dynamo_weak_dynamic_indices') to be True. Similiar issue was raised earlier: #3501.

Affected Test Cases

functorch\test_aotdispatch_xpu.py::TestAOTAutograd::test_mark_activations_dynamic
functorch\test_aotdispatch_xpu.py::TestAOTAutograd::test_mark_activations_dynamic_with_nested
functorch\test_aotdispatch_xpu.py::TestAOTAutogradWithDynamo::test_mark_activations_dynamic
functorch\test_aotdispatch_xpu.py::TestAOTAutogradWithDynamo::test_mark_activations_dynamic_with_nested
functorch\test_aotdispatch_xpu.py::TestAOTAutogradWithCache::test_mark_activations_dynamic
functorch\test_aotdispatch_xpu.py::TestAOTAutogradWithCache::test_mark_activations_dynamic_with_nested

Error Message

Click to expand traceback
Traceback (most recent call last):
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\unittest\case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\unittest\case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\testing\_internal\common_utils.py", line 3535, in wrapper
    method(*args, **kwargs)
  File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\functorch\test_aotdispatch_xpu.py", line 4480, in test_mark_activations_dynamic_with_nested
    fn(x, y, nt)
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_dynamo\eval_frame.py", line 1131, in compile_wrapper
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\functorch\test_aotdispatch_xpu.py", line 4452, in fn
    @torch.compile(backend="aot_eager", fullgraph=True)
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_dynamo\eval_frame.py", line 1398, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_functorch\aot_autograd.py", line 1273, in forward
    return compiled_fn(full_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_functorch\_aot_autograd\runtime_wrappers.py", line 1126, in runtime_wrapper
    result = _codegen_runtime_wrapper(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_functorch\_aot_autograd\subclass_codegen.py:codegen(runtime_wrapper_orchestration)", line 7, in _runtime_wrapper
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\_functorch\_aot_autograd\utils.py", line 93, in g
    return f(*args)
           ^^^^^^^^
  File "C:\Users\gta\miniforge3\envs\202605151131_9ed8fd28_32.0.101.8801_2025.3.2.61\Lib\site-packages\torch\autograd\function.py", line 625, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gta\repositories\pytorch\pytorch\third_party\torch-xpu-ops\test\xpu\functorch\test_aotdispatch_xpu.py", line 4434, in pack
    raise AssertionError(
AssertionError: Expected hasattr(..., '_dynamo_weak_dynamic_indices') to be True

Versions

Click to expand environment details
PyTorch version: 2.13.0a0+git9ed8fd2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro (10.0.26100 64-bit)
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.31.6
Libc version: N/A

Python version: 3.12.13 | packaged by conda-forge | (main, Mar  5 2026, 16:36:12) [MSC v.1944 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.26100-SP0
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: 20250302
Intel GPU driver version:
* 32.0.101.8801 (20260512000000.******+***)
Intel GPU models onboard:
* Intel(R) Arc(TM) B580 Graphics
Intel GPU models detected:
* [0] _XpuDeviceProperties(name='Intel(R) Arc(TM) B580 Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero V2', type='gpu', device_id=0xE20B, uuid=86800be2-0000-0000-0400-000000000000, driver_version='1.15.37858', total_memory=11875MB, local_mem_size=128KB, max_compute_units=160, memory_clock_rate=0MHz, memory_bus_width=64-bit, gpu_eu_count=160, gpu_subslice_count=20, 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
Caching allocator config: N/A

CPU:
Name: Intel(R) Core(TM) Ultra 5 245K
Manufacturer: GenuineIntel
Family: 773
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 3071
MaxClockSpeed: 4200
L2CacheSize: 26624
L2CacheSpeed: None
Revision: None

Versions of relevant libraries:
[pip3] bert_pytorch==0.0.1a4
[pip3] functorch==1.14.0a0+b71aa0b
[pip3] intel-openmp==2025.3.3
[pip3] mkl-include==2025.3.1
[pip3] mkl-static==2025.3.1
[pip3] mypy==2.1.0
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.2
[pip3] onemkl-license==2025.3.1
[pip3] onnx==1.21.0
[pip3] onnx-ir==0.1.16
[pip3] onnxscript==0.6.2
[pip3] optree==0.13.0
[pip3] pytorch-labs-segment-anything-fast==0.2
[pip3] tbb==2022.3.1
[pip3] tbb-devel==2022.3.1
[pip3] tcmlib==1.4.1
[pip3] torch==2.13.0a0+git9ed8fd2
[pip3] torch_geometric==2.4.0
[pip3] torchao==0.17.0
[pip3] torchaudio==2.11.0a0+c0cbdb9
[pip3] torchbench==0.1
[pip3] torchmetrics==1.9.0
[pip3] torchmultimodal==0.1.0b0
[pip3] torchrec-nightly==2022.4.26
[pip3] torchvision==0.27.0a0+499ca51
[pip3] torchx-nightly==2026.5.15
[pip3] triton-xpu==3.7.1+git21033c4e
[conda] bert-pytorch              0.0.1a4                   dev_0    <develop>
[conda] functorch                 1.14.0a0+b71aa0b          pypi_0    pypi
[conda] intel-openmp              2025.3.3                 pypi_0    pypi
[conda] mkl-include               2025.3.1                 pypi_0    pypi
[conda] mkl-static                2025.3.1                 pypi_0    pypi
[conda] numpy                     1.26.2                   pypi_0    pypi
[conda] onemkl-license            2025.3.1                 pypi_0    pypi
[conda] optree                    0.13.0                   pypi_0    pypi
[conda] pytorch-labs-segment-anything-fast 0.2                      pypi_0    pypi
[conda] tbb                       2022.3.1                 pypi_0    pypi
[conda] tbb-devel                 2022.3.1                 pypi_0    pypi
[conda] tcmlib                    1.4.1                    pypi_0    pypi
[conda] torch                     2.13.0a0+git9ed8fd2          pypi_0    pypi
[conda] torch-geometric           2.4.0                    pypi_0    pypi
[conda] torchao                   0.17.0                   pypi_0    pypi
[conda] torchaudio                2.11.0a0+c0cbdb9          pypi_0    pypi
[conda] torchbench                0.1                      pypi_0    pypi
[conda] torchmetrics              1.9.0                    pypi_0    pypi
[conda] torchmultimodal           0.1.0b0                  pypi_0    pypi
[conda] torchrec-nightly          2022.4.26                pypi_0    pypi
[conda] torchvision               0.27.0a0+499ca51          pypi_0    pypi
[conda] torchx-nightly            2026.5.15                pypi_0    pypi
[conda] triton-xpu                3.7.1+git21033c4e          pypi_0    pypi

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions