Make test.py run tests using the inductor backend #3
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.
As it stands,
test.py
is being used on nightly and pull request workflows in eager mode only (the default for theModel
class). As inductor is a valid working backend that is also supported by all platforms, we should also validate it via real models in torchbench, specially in PRs.This should expose pre-existing issues with the current inductor implementation on main and improve the torch.compile coverage, while not extensively increasing the time that PRs take to run with new tests.
This change allows for the discovery of both
eager
andinductor
backends foreval
andtrain
tests. As the current implementation of the skip mechanism only account foreval
andtrain
being implemented or not, and assuming that any operation that works oneager
should also work viainductor
, we only let the metadata skip the test if theeval
ortrain
steps are not implemented for a particular method.Test collection for each model should look like this now: