Skip to content

Conversation

martin-frbg
Copy link
Collaborator

fixes #5497

Comment on lines +35 to +36
#define SGEMV BLASFUNC(sgemv)
#define SHGEMV BLASFUNC(shgemv)
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No support for SHGEMM (FP16) in the tests

2 participants