Skip to content
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

Fixed parameter mismatch in complex gemm benchmarks #489

Conversation

OuadiElfarouki
Copy link
Collaborator

This patch fixes the mismatching parameters passed to GEMM (and batched derivative) benchmarks when using custom csv file and enabling the BLAS_ENABLE_COMPLEX cmake flag.
This is originally due to the fact that complex data type GEMM expects two values for each scalar alpha and beta (real and imag parts), and thus causes invalid number of parameters (+-2) as both complex and non-complex benchmarks use the same passed csv file.
The patch approach is a workaround that helps :

  • If complex parameters are passed and the non-complex operator is called, take only real parts of alpha and beta.
  • If non-complex parameters are passed the complex operator is called, use the same value of the parameter (alpha, beta) to construct the real and imag parts of the complex equivalent parameter (e.g. alpha_cplx = {alpha_real, alpha_real}).
  • Same behaviour is kept when data type matches parameter passed as before.

@muhammad-tanvir-1211 muhammad-tanvir-1211 merged commit 29e2c93 into codeplaysoftware:master Jan 3, 2024
3 checks passed
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.

3 participants