Unifying kernel tests #483
Labels
is:help-wanted
Need ideas on how to solve this.
is:proposal
Maybe we should do something this way.
is:technical-debt
This is aimed at reducing technical debt.
reg:testing
This is related to testing.
Milestone
At the moment, all of our non-reference kernel tests are basically the same (except for the templated tests, but I will get to that): We generate some random matrices or load one of the ani matrices, execute each of our kernels, maybe in multiple configurations on reference and the executor we are testing and compare the result for equality or near-equality.
This approach means a lot of code duplication, a lot of potential for inconsistencies and a lot of work in case we need to change an internal kernel interface.
With a very hacky and inaccurate bash one-liner, I looked at the amount of different lines between CUDA and HIP as well as OMP and CUDA/HIP for each test:
Thus I would like to discuss whether you consider it sensible to unify the kernel tests into a single code structure, and if so, what the best approach to implementing this would be.
I'm thinking of a wrapper that amounts to something like
This would again cut down on the test runtimes (as I assume the reference implementations are often our bottleneck) and provide additional benefits, like a simple enumeration of missing kernels.
This would also allow us to extend our GPU tests to the templated setting, while still avoiding issues with missing 64bit support in cuSPARSE/hipSPARSE.
I would of course still keep the individual test folders, since there are certain components etc. that are specific to the executors and should only be tested there.
The text was updated successfully, but these errors were encountered: