Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7222 Discussions

Why change the default behaviour for GEMM? (and other BLAS95/LAPACK95 interfaces?)

fattyboomsticks
Beginner
564 Views
(This post is merely feedback).
As far as I am aware, the default behaviour for the blas95 interface of the GEMM matrix multiply routine has always been to set the 'beta' parameter to 1 (recall GEMM computes C = alpha * A * B + beta*C). Incredibly, this has been changed in 10.2 so that now the default value is 0!? The problem with this change is that 'old' code will still run, the results of the computation will of course be different to what was intended. I expect that a lot of erroneous results are going to be produced before people realise that GEMM now functions differently. Also, every call to GEMM must be corrected by hand, a time consuming thing to do for large programs.

It's madness to change the default behaviours of interfaces like this, especially when the performance gains in doing so are all but nonexistent. Trival changes to the routine should be made 'behind' the interface. Don't get me wrong, I'm grateful that MKL is freely available. We all make mistakes (e.g. I should've taken the time to choose a proper username).
0 Kudos
1 Reply
Vladimir_Koldakov__I
New Contributor III
564 Views

Hello!

It just adjusted to the F95 BLAST proposal:

Some of the arguments may not appear in a specific instance. In this case a pre-defined value is assumed.
...
alpha 1.0 or (1.0,0.0)
beta 0.0 or (0.0,0.0)

Thanks,
-Vladimir

0 Kudos
Reply