Repository navigation
Conversation
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - OUTDATED (earlier commit) - Ready for human review:
Findings (2): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195700
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 523bb1e with merge base 12acbeb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@CuiYifeng could you please help review this test port / refactor PR? Thanks! |
5fc7c28 to
53f846e
Compare
There was a problem hiding this comment.
Why not remove @onlyCUDA for test_batch_invariance?
There was a problem hiding this comment.
torch.backends api used in this test_batch_invariance is cuda specific, for example torch.backends.cuda.preferred_blas_library, so I didn't remove onlyCUDA.
|
|
||
| @unittest.skipIf(not _has_cuda_sm80(), "requires CUDA SM80") | ||
| @skipIfXpu(msg="torch-xpu-ops/issues/5048") | ||
| @unittest.skipIf(not TEST_XPU and not _has_cuda_sm80(), "requires CUDA SM80 or XPU") |
There was a problem hiding this comment.
Since XPU has been skipped by @skipIfXpu, why do we need not TEST_XPU? Furthermore, not TEST_XPU is not equal to TEST_CUDA. How about using:
@unittest.skipIf(TEST_CUDA and not _has_cuda_sm80(), "requires CUDA SM80")
There was a problem hiding this comment.
Adding TEST_XPU check is to enable XPU for this case, skipIfXpu is to skip the test due to known issue, when the known issue is fixed we will remove the skipIfXpu decorator.
| @skipIfXpu(msg="torch-xpu-ops/issues/5048") | ||
| @unittest.skipIf(not TEST_XPU and not _has_cuda_sm80(), "requires CUDA SM80 or XPU") |
There was a problem hiding this comment.
Adding TEST_XPU check is to enable XPU for this case, skipIfXpu is to skip the test due to known issue, when the known issue is fixed we will remove the skipIfXpu decorator.
| def _skip_if_not_cuda(self): | ||
| if GPU_TYPE != "cuda": | ||
| self.skipTest("CUDA-specific variance heuristic") | ||
| if GPU_TYPE not in ["cuda", "xpu"]: | ||
| self.skipTest("CUDA/XPU-specific variance heuristic") | ||
|
|
||
| def _dtypes(self): | ||
| dtypes = [torch.float16] | ||
| if torch.cuda.is_bf16_supported(): | ||
| dtypes.append(torch.bfloat16) | ||
| return dtypes | ||
|
|
||
| @skipIfXpu(msg="intel/torch-xpu-ops/issues/5221") |
There was a problem hiding this comment.
Since the destination is to enable this test case only for cuda and xpu, can we remove self._skip_if_not_cuda() and control devices with decorator directly?
There was a problem hiding this comment.
Let me rename _skip_if_not_cuda -> _skip_if_not_gpu
| self.skipTest("GPU not available") | ||
| if GPU_TYPE != "cuda": | ||
| if GPU_TYPE not in ("cuda", "xpu"): | ||
| self.skipTest("CUDA/ROCm-only cpp_wrapper debug sync") |
There was a problem hiding this comment.
Message is not aligned with new condition.
There was a problem hiding this comment.
Let me update the message
| xfails = set(xfail_dicts.get(test_type, {}).get(backend, {}).get(op_name, set())) | ||
| # fbcode's Triton fork + cuBLAS/GPU stack differ from OSS CI, so some combos | ||
| # fail the compiled-vs-eager numerics only in fbcode. Gate on IS_FBCODE (CUDA | ||
| # only) so OSS does not hit spurious XPASS on these. | ||
| if IS_FBCODE and torch.version.hip is None: | ||
| if IS_FBCODE and torch.version.hip is None and device_type != "xpu": |
There was a problem hiding this comment.
Could you add a comment to explain why we can skip the following xfails?
There was a problem hiding this comment.
I think there already has comments in 819-821 to address this is a cuda specific XFAIL.
| @@ -163,7 +179,7 @@ def setUp(self): | |||
| # NOTE: triton.fb is fbcode-only; OSS CI sets CUDA_HOME via env. | |||
| import os | |||
|
|
|||
| if "CUDA_HOME" not in os.environ and "CUDA_PATH" not in os.environ: | |||
| if GPU_TYPE == 'cuda' and "CUDA_HOME" not in os.environ and "CUDA_PATH" not in os.environ: | |||
There was a problem hiding this comment.
| if GPU_TYPE == 'cuda' and "CUDA_HOME" not in os.environ and "CUDA_PATH" not in os.environ: | |
| if GPU_TYPE == "cuda" and "CUDA_HOME" not in os.environ and "CUDA_PATH" not in os.environ: |
Please unify the style.
| not TEST_CUDA or torch.cuda.device_count() < 2, | ||
| "requires at least two CUDA devices", | ||
| not TEST_GPU or device_module.device_count() < 2, | ||
| "requires at least two GPU devices", | ||
| ) | ||
| def test_raw_stream_name_does_not_clobber_user_stream_on_cuda_1(self): |
There was a problem hiding this comment.
Please update the hard code on_cuda_1 after generalization.
633f83a to
6480ab0
Compare
da3545d to
8932f34
Compare
2ee5276 to
40847c5
Compare
40847c5 to
8f56ac6
Compare
8d09a4b to
e62e887
Compare
e62e887 to
f756886
Compare
…and test/inductor/test_triton_launcher_integration.py
updated test/inductor/test_torchinductor_opinfo_properties.py
test_torchinductor_opinfo_properties.py
f756886 to
523bb1e
Compare
|
@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 |
…202442 (base update) [ghstack-poisoned]
Pull Request resolved: pytorch#195700 Approved by: https://github.com/CuiYifeng, https://github.com/etaf, https://github.com/jansel
Pull Request resolved: pytorch#195700 Approved by: https://github.com/CuiYifeng, https://github.com/etaf, https://github.com/jansel
The three TestAOTIUserStreams cases skipped XPU pending intel/torch-xpu-ops#5177. Now that record_event/wait_event/synchronize_event lower into the XPU AOTI event cache, drop the skips and assert on the XPU lowering instead of the CUDA-only cudaEventRecord/cudaStreamWaitEvent symbols. The upstream generic-device rewrite of this file (pytorch#195700) already landed on main, so the test bodies keep using the module-level device_module/TEST_GPU idiom rather than the per-test getattr(torch, GPU_TYPE) form from the original patch.
The three TestAOTIUserStreams cases skipped XPU pending intel/torch-xpu-ops#5177. Now that record_event/wait_event/synchronize_event lower into the XPU AOTI event cache, drop the skips and assert on the XPU lowering instead of the CUDA-only cudaEventRecord/cudaStreamWaitEvent symbols. The upstream generic-device rewrite of this file (pytorch#195700) already landed on main, so the test bodies keep using the module-level device_module/TEST_GPU idiom rather than the per-test getattr(torch, GPU_TYPE) form from the original patch.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo