You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ZGEMM3M is broken due to cgemm3m_unroll_n never assigned #4500
I tried ZGEMM3M on Haswell, it does not work, gives SIGFPE (division by zero). It happens because the divider is cgemm3m_unroll_n, which is never assigned with any value.
@wjc404 , could it be that the cgemm3m_unroll_n assignment was accidentally removed?
Is it CGEMM3M or ZGEMM3M that you are seeing problems with (different unroll parameters, different kernels) ?
On first glance I do not see any dropped assignments, are you building for DYNAMIC_ARCH or a single TARGET ?
Also, do you build with gmake or cmake ? The level 3 driver uses shared code where the variable type is passed in by the build system and cgemm3m should depend on cgemm3m_unroll_n while zgemm3m sees zgemm3m_unroll_nonly, no cross-use of parameters
You should see that the segfault is due to the function being called gotoblas->zgemm3m_itcopyb is 0x0 (as well as everything else, like on my screenshots above).
thanks. still suspect something else wrong as the gemm3m test/ctest work for me (noticed they are not - perhaps no longer - hooked up by default). in a hurry now, will try to experiment later. which platform and compiler ?
OK, I've got the explanation now. The reason why *gemm3m are missing is that USE_GEMM3M switch defined by CMake was never translated into a C macro for the files that check #if (USE_GEMM3M). Therefore, the logic depending on CMake var worked, and logic depending on the macro did not. #4502 should fix this.
Sorry for any confusion I caused - I was not well and must have mistakenly used a gmake build to convince myself that the GEMM3M tests worked with CMAKE. :(
Will wire up those GEMM3M counterparts in test and ctest in a followup PR...
Activity
martin-frbg commentedon Feb 10, 2024
Is it CGEMM3M or ZGEMM3M that you are seeing problems with (different unroll parameters, different kernels) ?
On first glance I do not see any dropped assignments, are you building for DYNAMIC_ARCH or a single TARGET ?
martin-frbg commentedon Feb 10, 2024
Also, do you build with gmake or cmake ? The level 3 driver uses shared code where the variable type is passed in by the build system and cgemm3m should depend on
cgemm3m_unroll_nwhile zgemm3m seeszgemm3m_unroll_nonly, no cross-use of parametersmartin-frbg commentedon Feb 10, 2024
I cannot reproduce this, and do not see why/where this could happen (unless it is a specific compiler overoptimizing something).
dmikushin commentedon Feb 10, 2024
Hi @martin-frbg ,
Sorry for a misleading description. I will explain everything now!
I'm building
DYNAMIC_ARCHmode, and my native architecture isHASWELL.According to OpenBLAS design, all supported functions and tuneable parameters are provided via a global variable
gotoblas:So normally, whatever functionality is supported, its entries must be filled within the
gotoblasstructure. For example, fordgemmit looks like this:So my point is: the entries for
cgemm3mandzgemm3mingotoblasstructure are never assigned:I hope I'm making it clear now: there is no way how gemm3m could ever work, if they are entirely missing from
gotoblasvariable above.gdb ./benchmark_gemm3m_COMPLEX_DOUBLEp *gotoblasgotoblas->zgemm3m_itcopybis 0x0 (as well as everything else, like on my screenshots above).martin-frbg commentedon Feb 10, 2024
thanks. still suspect something else wrong as the gemm3m test/ctest work for me (noticed they are not - perhaps no longer - hooked up by default). in a hurry now, will try to experiment later. which platform and compiler ?
dmikushin commentedon Feb 10, 2024
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Adding USE_GEMM3M macro to kernel targets, so that the *gemm3m functi…
dmikushin commentedon Feb 12, 2024
OK, I've got the explanation now. The reason why *gemm3m are missing is that
USE_GEMM3Mswitch defined by CMake was never translated into a C macro for the files that check#if (USE_GEMM3M). Therefore, the logic depending on CMake var worked, and logic depending on the macro did not. #4502 should fix this.Adding USE_GEMM3M macro to kernel targets, so that the *gemm3m functi…
martin-frbg commentedon Feb 15, 2024
Sorry for any confusion I caused - I was not well and must have mistakenly used a gmake build to convince myself that the GEMM3M tests worked with CMAKE. :(
Will wire up those GEMM3M counterparts in test and ctest in a followup PR...