intel / intel/torch-xpu-ops

[Bug Skip]: test_wrap_config_affects_cache_key AssertionError: Scalars are not equal

Open
#4,810 0 comments 0 reactions 0 assignees View on GitHub
random skipped
Dominant language
Python
Stars
113
Forks
129
Avg merge
5d 9h
Merged PRs (30d)
112

Description

### 🐛 Describe the bug with skip template

Cases:
op_ut,third_party.torch-xpu-ops.test.xpu.dynamo.test_wrap_inductor_compiled_regions_xpu.TestWrapInductorCompiledRegions,test_wrap_config_affects_cache_key

```
______ TestWrapInductorCompiledRegions.test_wrap_config_affects_cache_key ______
[gw10] linux -- Python 3.10.20 /tmp/xpu-tool/Python/3.10.20/x64/bin/python
Traceback (most recent call last):
File "/__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/dynamo/test_wrap_inductor_compiled_regions_xpu.py", line 431, in test_wrap_config_affects_cache_key
self.assertEqual(counters["aot_autograd"]["autograd_cache_miss"], 2)
File "/tmp/xpu-tool/Python/3.10.20/x64/lib/python3.10/site-packages/torch/_dynamo/test_case.py", line 127, in assertEqual
return super().assertEqual(x, y, *args, **kwargs)
File "/tmp/xpu-tool/Python/3.10.20/x64/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 4844, in assertEqual
raise error_metas.pop()[0].to_error( # type: ignore[index]
AssertionError: Scalars are not equal!

Expected 2 but got 1.
Absolute difference: 1
Relative difference: 0.5

To execute this test, run the following from the base repo dir:
PYTORCH_TEST_WITH_SLOW=1 python test/xpu/dynamo/test_wrap_inductor_compiled_regions_xpu.py TestWrapInductorCompiledRegions.test_wrap_config_affects_cache_key

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
- generated xml file: /__w/torch-xpu-ops/torch-xpu-ops/pytorch/third_party/torch-xpu-ops/test/xpu/op_ut_with_all.dynamo.test_wrap_inductor_compiled_regions_xpu.xml -
=========================== short test summary info ============================
FAILED dynamo/test_wrap_inductor_compiled_regions_xpu.py::TestWrapInductorCompiledRegions::test_wrap_config_affects_cache_key - AssertionError: Scalars are not equal!

Expected 2 but got 1.
Absolute difference: 1
Relative difference: 0.5

To execute this test, run the following from the base repo dir:
PYTORCH_TEST_WITH_SLOW=1 python test/xpu/dynamo/test_wrap_inductor_compiled_regions_xpu.py TestWrapInductorCompiledRegions.test_wrap_config_affects_cache_key

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

### Versions

pytorch main

Contributor guide

Open the contributing guide

Research direction

Start by running the reported command for test/xpu/dynamo/test_wrap_inductor_compiled_regions_xpu.py::TestWrapInductorCompiledRegions.test_wrap_config_affects_cache_key. Read the test around line 431 and its cache-key setup, then investigate why autograd_cache_miss is 1 instead of the expected 2. Done means the test passes with the intended cache-key behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.