Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants