-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add test for SHGEMM #5499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add test for SHGEMM #5499
Conversation
#define SGEMV BLASFUNC(sgemv) | ||
#define SHGEMV BLASFUNC(shgemv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shouldn't be necessary as shgemv
is tested separately?
int ret = 0; | ||
int loop = SHGEMM_LARGEST; | ||
char transA = 'N', transB = 'N'; | ||
float alpha = 1.0, beta = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given #5485, is it worth setting beta
to 1.0
here, or testing both variations? Similarly with alpha
, as 1.0
and 0.0
can have faster paths but in-between values usually don't.
I haven't got a good answer to this in the C tests, but we could try adding some Python-based tests with hypothesis
or Rust tests with proptest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting we also don't test anything but square, and it'd be nice to sample in the various dimensions - though we could maybe just randomly sample to start with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on the variations of alpha and beta, but we need to keep in mind that these test are run on each and every build, so time will become a problem sooner or later, and I think non-trivial dependencies like python or rust are completely out of the question for a default build.
Perhaps it would make sense to put those in a completely separate project similar to BLAS-Tester
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to keep in mind that these test are run on each and every build
Yeah, that's the reason I moved to a more randomly sampled approach, as it'll likely hit the relevant cases and shrink to the specific problem case quite quickly in such a small space. Otherwise, yes, the amount of permutations becomes a bit tricky to manage 😿
I think non-trivial dependencies like python or rust are completely out of the question for a default build.
This is where I got to, I haven't found something that fits just yet.
Perhaps it would make sense to put those in a completely separate project similar to BLAS-Tester
Hmm, does that cause an issue that they're not run on the default build? And does it discourage people from adding tests for the default build?
It would be fun though, we could also potentially combine it with the benchmarking repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, something like that that runs as CI but does not (necessarily) run as part of a normal build process. I'm not even totally averse to having something like a pytest subdirectory as long as it doesn't become mandatory for user builds and doesn't take up too much space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But short-term I'd like to get the code stable enough to do another release, and perhaps focus on my other work for a while so that I do not run myself out of business.
Co-authored-by: Christopher Sidebottom <[email protected]>
fixes #5497