Give tests parameterized by shapes better names #406
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.
This is an example of what I think the change should be, but I didn't want to go through and do it for everything until checking in with others. I found it helpful to have more descriptive test names when working on kernels, especially as you can select by them.
This incidentally also appears to fix a bug that was creating duplicate perf tests. I printed out
get_test_shapes("chained_gemm")
and got the following:Looks like each time shapes.py was imported, the loop adding perf tests got run again.
Before:
After:
Before:
After:
IMO, it's also a bit weird that the perf test param piggy-backs on shapes and then is separately controlled by a command line arg. Could it just be a separate parameter instead with the appropriate mark and the test can read from there rather than directly accessing the command line arg? One disadvantage to that is that in the current proposal there'd then be a "no_perf" suffix on all the non-perf tests. I couldn't figure out a way to my pytest have no id for a test param value (you can do the empty string but it still gets joined on
-
and your test name looks weird).WDYT?