intel / intel/torch-xpu-ops

[release/2.14] UT failure: test_autocast_sdpa_dynamic_shapes - torch._dynamo.exc.InternalTorchDynamoError: NotEqualError (ShapeEnv not equal)

Open
#4,832 2 comments 0 reactions 0 assignees View on GitHub
module: inductor os: Linux os: Windows test: ut
Dominant language
Python
Stars
113
Forks
128
Avg merge
5d 9h
Merged PRs (30d)
112

Description

Split from #4825.

Cases:
op_ut,test.dynamo.test_dynamic_shapes.DynamicShapesCtxManagerTests,test_autocast_sdpa_dynamic_shapes

## ErrorLog
```
________ DynamicShapesCtxManagerTests.test_autocast_sdpa_dynamic_shapes ________
[gw3] 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/test/dynamo/test_ctx_manager.py", line 316, in test_autocast_sdpa
compiled = opt_mod(query, key, value)
...
File "/tmp/xpu-tool/Python/3.10.20/x64/lib/python3.10/site-packages/torch/fx/experimental/recording.py", line 535, in shape_env_check_state_equal
raise NotEqualError("field values do not match:", errors)
torch._dynamo.exc.InternalTorchDynamoError: NotEqualError: ShapeEnv not equal: field values do not match:

==> guards: values do not match.
> Left: [s83 <= 576, (FloatTrueDiv(1.0, FloatPow(ToFloat(s83), 0.5))) >= 0.0, (FloatTrueDiv(1.0, FloatPow(ToFloat(s83), 0.5))) >= 0.0]
> Right: [s83 <= 576, (FloatTrueDiv(1.0, FloatPow(ToFloat(s83), 0.5))) >= 0.0, (FloatTrueDiv(1.0, FloatPow(ToFloat(s83), 0.5))) >= 0.0, (FloatTrueDiv(1.0, FloatPow(ToFloat(s83), 0.5))) >= 0.0]
```

## Pytorch Version
71b66af50dd18422e9ed558d83e3582d14aa1639

Contributor guide

Open the contributing guide

Research direction

Read test/dynamo/test_ctx_manager.py around line 316 and run DynamicShapesCtxManagerTests.test_autocast_sdpa_dynamic_shapes to reproduce the failure. Trace the ShapeEnv state reported by the error and confirm the test completes without the NotEqualError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.