Skip to content

[upstream #3539] [Bug Skip] test_cache_hot_load device=xpu fails on XPU: AOTAutograd / inductor cache counter mismatch#20

Draft
Stonepia wants to merge 1 commit into
mainfrom
agent/issue-381
Draft

[upstream #3539] [Bug Skip] test_cache_hot_load device=xpu fails on XPU: AOTAutograd / inductor cache counter mismatch#20
Stonepia wants to merge 1 commit into
mainfrom
agent/issue-381

Conversation

@Stonepia

Copy link
Copy Markdown
Collaborator

[upstream pytorch#3539] [Bug Skip] test_cache_hot_load device=xpu fails on XPU: AOTAutograd / inductor cache counter mismatch

Fixes https://github.com/intel-sandbox/torch-xpu-ops-exp/issues/381

Root Cause: The test exercises the AOTAutograd cache hot-load round trip:

  1. Compile a function with dynamic=True, populate the FX graph cache.
  2. torch.compiler.save_cache_artifacts() → serialise.
  3. Clear caches; torch.compiler.load_cache_artifacts() → deserialise.
  4. Recompile and assert counters reflect a hit on the AOTAutograd cache
    plus the expected number of fxgraph_cache_miss /
    fxgraph_lookup_write_file events.

On XPU, autotune_local_cache: True produces extra Triton autotune
cache entries (visible as len(cache_info.autotune_artifacts) == 2
where autotune_expect = 2 if device == GPU_TYPE else 0). The
non-bundled subclass adds these to the inductor counter
(Expected 4 but got 6); the bundled subclass appears to bypass the
inductor count entirely (Expected 2 but got 0).

This is consistent with the XPU autotune cache pathway not following
the same accounting as the CUDA path, OR the bundled cache
serialisation on XPU not embedding the autotune artifacts into the
bundle the way it does on CUDA.

Failed Tests:

  • dynamo/test_aot_autograd_cache_xpu.py::AOTAutogradCacheTests::test_cache_hot_load_device_xpu_bfloat16_dynamic_True
  • dynamo/test_aot_autograd_cache_xpu.py::AOTAutogradCacheBundledTests::test_cache_hot_load_device_xpu_bfloat16_dynamic_True
  • dynamo/test_aot_autograd_cache_xpu.py::AOTAutogradCacheTests::test_cache_hot_load_device_xpu_float32_dynamic_True
  • dynamo/test_aot_autograd_cache_xpu.py::AOTAutogradCacheBundledTests::test_cache_hot_load_device_xpu_float32_dynamic_True

Diff stat:

test/dynamo/test_aot_autograd_cache.py | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

[upstream pytorch#3539] [Bug Skip] test_cache_hot_load device=xpu fails on XPU: AOTAutograd / inductor cache counter mismatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant