Skip to content

[Test] Add HardwareClassification to TestModule and TestJitReplaceSubmodule - #191473

Closed
can-gaa-hou wants to merge 2 commits into
pytorch:mainfrom
can-gaa-hou:hw-classification-test-modules
Closed

can-gaa-hou wants to merge 2 commits into
pytorch:mainfrom
can-gaa-hou:hw-classification-test-modules

Conversation

@can-gaa-hou

Copy link
Copy Markdown
Collaborator

Summary

#186918 introduced hw_classification (GENERIC/ACCELERATOR/CPU/CUDA/MPS/XPU) so tests can opt into --hw-classification filtering. test_modules.py predates that rollout and its two test classes were left unclassified. This annotates them, following the same convention already applied to other files (e.g. #190991).

TestModule is instantiated via instantiate_device_type_tests, so it gets ACCELERATOR. TestJitReplaceSubmodule has no device/dtype parametrization and never touches an accelerator, so it gets GENERIC.

@pytorch-bot

pytorch-bot Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/191473

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit ca0d030 with merge base fa4050d (image):

CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Jul 29, 2026
@can-gaa-hou can-gaa-hou added the module: tests/core This label covers all test cases within the Core and Tensor sheets. label Jul 29, 2026
@jbschlosser jbschlosser added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 30, 2026
@fffrog fffrog moved this to Backlog in PyTorch Test Refactoring Aug 3, 2026
Comment thread test/test_modules.py Resolved

@fffrog fffrog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, thank you.

@fffrog fffrog moved this from Backlog to Ready for Review(Definitive) in PyTorch Test Refactoring Aug 6, 2026
@can-gaa-hou
can-gaa-hou force-pushed the hw-classification-test-modules branch from 19d92c5 to 4df8154 Compare August 6, 2026 13:44
@can-gaa-hou

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased hw-classification-test-modules onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout hw-classification-test-modules && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the hw-classification-test-modules branch from 4df8154 to ca0d030 Compare August 8, 2026 08:57

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

@albanD albanD moved this from Ready for Review(Definitive) to Ready for Merge in PyTorch Test Refactoring Aug 11, 2026
@can-gaa-hou

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 12, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

gavinwang269 pushed a commit to gavinwang269/pytorch that referenced this pull request Aug 13, 2026
…module (pytorch#191473)

## Summary

pytorch#186918 introduced `hw_classification` (`GENERIC`/`ACCELERATOR`/`CPU`/`CUDA`/`MPS`/`XPU`) so tests can opt into `--hw-classification` filtering. `test_modules.py` predates that rollout and its two test classes were left unclassified. This annotates them, following the same convention already applied to other files (e.g. pytorch#190991).

`TestModule` is instantiated via `instantiate_device_type_tests`, so it gets `ACCELERATOR`. `TestJitReplaceSubmodule` has no device/dtype parametrization and never touches an accelerator, so it gets `GENERIC`.
Pull Request resolved: pytorch#191473
Approved by: https://github.com/fffrog, https://github.com/albanD
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
…module (pytorch#191473)

## Summary

pytorch#186918 introduced `hw_classification` (`GENERIC`/`ACCELERATOR`/`CPU`/`CUDA`/`MPS`/`XPU`) so tests can opt into `--hw-classification` filtering. `test_modules.py` predates that rollout and its two test classes were left unclassified. This annotates them, following the same convention already applied to other files (e.g. pytorch#190991).

`TestModule` is instantiated via `instantiate_device_type_tests`, so it gets `ACCELERATOR`. `TestJitReplaceSubmodule` has no device/dtype parametrization and never touches an accelerator, so it gets `GENERIC`.
Pull Request resolved: pytorch#191473
Approved by: https://github.com/fffrog, https://github.com/albanD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: tests/core This label covers all test cases within the Core and Tensor sheets. open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants