[Testcase Refactoring] Decouple test_compile_subprocess.py from CUDA-specific - #193761
Draft
pengyeqing wants to merge 1 commit into
Draft
[Testcase Refactoring] Decouple test_compile_subprocess.py from CUDA-specific#193761pengyeqing wants to merge 1 commit into
pengyeqing wants to merge 1 commit into
Conversation
…specific Summary: - Add `hw_classification = HardwareClassification.GENERIC|ACCELERATOR|CUDA|CPU` to tests class. - Repalce `HAS_TRITON` with `@requires_capabilities(Capability.lib.triton)` at test cases. This allows out-of-tree accelerators to be recognized correctly when deciding whether a inductor test has enough devices to run. Signed-off-by: Yeqing Peng <846295776@qq.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/193761
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
Author
|
@pytorchbot label "module: tests/graph" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces hardcoded CUDA references with device-agnostic equivalents so out-of-tree accelerator backends can run these tests.
Changes
hw_classification = HardwareClassification.GENERIC|ACCELERATOR|CUDA|CPUto tests class.HAS_TRITONwith@requires_capabilities(Capability.lib.triton)at test cases.Motivation
torch.cudaonly recognizes CUDA. New accelerators (e.g.,PrivateUse1-based out-of-tree backends) are silently skipped even when enough devices are available. A generic decorator lets inductor tests adapt to any accelerator supported bytorch.accelerator.Test Plan
python test/inductor/test_compile_subprocess.py --hw-classification GENERIC ACCELERATOR CUDA CPU XXXNotes
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo