support selection of tests that use op infos #17
Merged
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.
Fixes #16.
Currently we rely on the device identifier comes directly after the test case function name. That is no longer true when using
OpInfo
's. The name of the instantiated test follows the scheme(template_name)_(op_name)_(device)_(dtype)
.This is a complete rewrite of the internal matching logic:
TestCase
has adevice_type
attribute, we can simply strip the device identifier from the instantiated name.template_name
andop_name
in the pattern above might contain underscores and they are also separated by a single underscore, it is impossible to extract the two parts without further knowledge. To overcome this, we caninspect
the source of the function and extract thetemplate_name
(which is the function name) directly.