Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/197547
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit c380a78 with merge base 5de236d ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "topic: not user facing" |
dvrogozh
left a comment
There was a problem hiding this comment.
linalg.tensorinvnow computes correctly on XPU
Nothing in PR description or linked intel/torch-xpu-ops#5074 issue tells what was actually changed to fix the problem. Without that this looks a random change. Please update PR with clear details.
|
|
BBBela
left a comment
There was a problem hiding this comment.
I am not sure if removing the expectedFailure is good solution here - at least in this moment. There is an older issue that lists affected test case as failing, but PVC-specific (intel/torch-xpu-ops#4313). This expectedFailure that is being removed by this PR was added about month ago when generalizing upstream test files.
In short - from the issues it looks like the test_numpy_ref_linalg_tensorinv_xpu_float64 without any decorators fails on PVC with numerical errors and passes on BMG. After adding expectedFailure decorator it passes on PVC with XFAIL but fails on BMG with Unexpected Success. The problem is that most of PyTorch XPU CI runs on PVC, while torch-xpu-ops CI runs on BMG. I launched XPU CI on this PR to confirm this, but if the above is correct, then test_numpy_ref_linalg_tensorinv_xpu_float64 will fail on this PR with numerical problems.
I believe it needs to be checked and verified on PVC platform.
|
The CI results are as expected - the |
Thanks @dvrogozh, you're right. That sentence was misleading. Nothing was changed in the code to "fix" So this PR only changes the test expectation, and that is valid only if the test also passes on PVC. |
|
@BBBela thanks a lot for the timeline and for running XPU CI. This explains pretty much the whole picture that I was not aware of. That intel/torch-xpu-ops#4313 task completely slipped through my radar.
Agreed. My validation was done on BMG only, so I only saw the
This one is Interesting. A few things that might help narrow it down:
I've updated the PR description to reflect all this, and I'm keeping the PR in draft until your PVC investigation is done. |
|
The result of investigation is that the root cause of numerical problem with I put more detailed problem and investigation description in the linked issue intel/torch-xpu-ops#5074. Saying that, we can proceed with merging this PR as the problem is clear now and resolved on main. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
3a6616e to
c380a78
Compare
BBBela
left a comment
There was a problem hiding this comment.
Let's wait for CI results, but after recent finding this PR looks good to me and a right solution.
One thing - after investigation showed the real problem and the exact commit that made this expectedFailure redundant, I believe that this PR description needs to be again adjusted, sorry
Once CI is green, you have my approval 😉
@pponikox, I believe you did that, right? Please, reply for a clarity.
I recommend to use the following form referencing other stuff: I.e. in our particular case: In this form git log can be more easily parsed and searched if needed. |
BBBela
left a comment
There was a problem hiding this comment.
CI passed, thanks for patience during investigating the problem 😉
Yes, the description was updated yesterday.
Just for clarification: However when I save or go to preview the links are shortened into this I'm not 100% sure how this description is visible in the history, but scanning through other logs I think that full links URLs are used 😉 |
3 things to clarify:
UPDATE:
This might have been in the other PR review :). |
|
I double checked that the latests CI failure is NOT related to my changes (problem is with |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…f float64 (pytorch#197547) ### Summary Fixes pytorch#200245 Fixes: intel/torch-xpu-ops#5074 Related: intel/torch-xpu-ops#4313 Related: intel/torch-xpu-ops#2618 Removes the XPU `expectedFailure` for `TestCommon.test_numpy_ref` (`linalg.tensorinv`, `float64`) from the OpInfo in `torch/testing/_internal/opinfo/definitions/linalg.py`. No `linalg.tensorinv` or XPU kernel code is changed. The XPU result was always correct. The `expectedFailure` was hiding a wrong **NumPy reference** in the PyTorch XPU CI environment, and that environment was fixed by pytorch#199535. ### Root cause - `test_numpy_ref` compares `torch.linalg.tensorinv` on XPU against `np.linalg.tensorinv` computed on the CPU host. - NumPy <= 1.23.x bundles OpenBLAS <= 0.3.20, which returns wrong results for LU-based routines (inv/solve/det) on Intel Xeon Sapphire Rapids and Granite Rapids CPUs (numpy/numpy#22502, fixed in OpenBLAS 0.3.21 / NumPy 1.24.0 via numpy/numpy#22525). Detailed analysis: intel/torch-xpu-ops#2618. - PyTorch XPU CI images used Python 3.10, for which `.ci/docker/requirements-ci.txt` pins `numpy==1.23.2`, on affected host CPUs. As a result the reference was wrong and the test failed. - The failure was originally attributed to PVC / oneMKL. That turned out to be incorrect: the deciding factor was the host CPU + NumPy/OpenBLAS version, not the GPU. ### Validation Intel BMG: ``` python test_ops_xpu.py TestCommonXPU.test_numpy_ref_linalg_tensorinv_xpu_float64 -v ``` - before: FAILED (unexpected success) - after: OK (complex128 variant also passes) PyTorch XPU CI: rebased onto `viable/strict` 5de236d which includes pytorch#199535. Pull Request resolved: pytorch#197547 Approved by: https://github.com/dvrogozh, https://github.com/BBBela, https://github.com/chuanqi129, https://github.com/atalman


Summary
Fixes #200245
Fixes: intel/torch-xpu-ops#5074
Related: intel/torch-xpu-ops#4313
Related: intel/torch-xpu-ops#2618
Removes the XPU
expectedFailureforTestCommon.test_numpy_ref(linalg.tensorinv,float64) from the OpInfo intorch/testing/_internal/opinfo/definitions/linalg.py.No
linalg.tensorinvor XPU kernel code is changed. The XPU result was always correct. TheexpectedFailurewas hiding a wrong NumPy reference in the PyTorch XPU CI environment, and that environment was fixed by #199535.Root cause
test_numpy_refcomparestorch.linalg.tensorinvon XPU againstnp.linalg.tensorinvcomputed on the CPU host..ci/docker/requirements-ci.txtpinsnumpy==1.23.2, on affected host CPUs. As a result the reference was wrong and the test failed.Validation
Intel BMG:
PyTorch XPU CI: rebased onto
viable/strict5de236d which includes #199535.