Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/186918
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4af7053 with merge base 1c2190b ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
4443ddb to
f3768cc
Compare
|
|
22bced1 to
91ef91f
Compare
91ef91f to
a7dc7b0
Compare
New plugin to guide refactoring PyTorch test files for the community device-agnostic testing initiative (pytorch/pytorch#174469, #185142, #185590). Plugin structure: - skills/test-refactor/SKILL.md: 4-phase workflow (Analyze, Classify, Refactor, Verify) - skills/test-refactor/CLASSIFICATION-GUIDE.md: decision tree for 5 hardware categories (GENERIC, DEVICE_GENERIC, DEVICE_SPECIFIC, MULTI_DEVICE_GENERIC, MULTI_DEVICE_SPECIFIC) - skills/test-refactor/PATTERNS.md: 7 before/after examples from real merged PRs - skills/test-refactor/REFERENCES.md: links to RFCs, tracking spreadsheet, Slack, example PRs - agents/test-refactor-agent.md: specialist agent with generic delegation to compile agents (extensible to distributed, quantization agents as they get added) Supports the hw_classification attribute from pytorch/pytorch#186918. Registered in marketplace.json. Updated README.md and REPO_ARCH.md.
fffrog
left a comment
There was a problem hiding this comment.
SGTM, thank you for updates.
|
Hi @albanD, so sorry to bother you again, could you help to review and approve this PR first? This PR is the fundamental one. |
|
This PR's MI350 CI jobs are stuck queued because they still request the old See the active SEV for details: #187193 |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Summary
This PR introduces hardware classification for PyTorch test classes.
Tests can now explicitly declare their hardware classification through a
hw_classificationclass attribute, and users can filter which categories of tests to run via--hw-classification.When
--hw-classificationis not specified, all existing test discovery and execution paths remain unchanged.Changes
Hardware classification
Added
HardwareClassificationwith three categories:GENERICDEVICE_GENERICCPU,CUDA,XPU,MPS— specific built-in device typesTest filtering
Added
--hw-classificationsupport across unittest, pytest, subprocess, parallel, XML, repeat, andrun_test.pyexecution paths. Filtering is implemented through:HardwareClassificationTestLoaderHardwareClassificationPytestPlugin_filter_suite_by_hw_classification()Tests
Added unit tests in
test/test_testing.pycovering:Initial rollout
Annotated test classes in
test/profiler/test_memory_profiler.pyto validate the rollout and provide an initial set of classified tests.Test Plan
Verified on CUDA
python test/test_testing.py -v -k 'TestHardwareClassifications'---------------------------------------------------------------------- Ran 4 tests in 0.006s OKValidated the feature using hardware classification annotations in
test/profiler/test_memory_profiler.py:(34 total test methods: 20 GENERIC + 14 DEVICE_GENERIC)
Verified:
GENERICruns 20 testsDEVICE_GENERICruns 14 testsGENERIC+DEVICE_GENERICruns 34 testsVerified the filter works across the main execution paths:
--use-pytestpython -m pytestrun_test.pyforwardingCommands: