eigen-magma icon indicating copy to clipboard operation
eigen-magma copied to clipboard

undefine GEMM_SPECIALIZATION macro

Open manuels opened this issue 12 years ago • 7 comments

manuels avatar Aug 12 '13 19:08 manuels

hi Manuel,

Thank you for helping out :)

Can you please give a minimal description of what this GEMM_SPECIALIZATION macro is for and why it should be undefined?

Would this change affect the bechmark results?

Many thanks in advance, Best regards, Giovanni

bravegag avatar Aug 13 '13 09:08 bravegag

Hi,

your question is a little confusing because this macro was not defined by me, but by Giovanni Azua (is that you?). It defines a specialization of the general matrix-matrix product function for magma.

However, it was not undefined after usage which can cause bugs when this header file is used.

manuels avatar Aug 13 '13 10:08 manuels

Hi,

I am even more confused because [after looking a bit more carefully] that macro is what actually enables the template specialization that invokes MAGMA, therefore undefining it is like removing the MAGMA layer which is the main purpose of this project ...

That macro was introduced in the GeneralMatrixMatrix_MKL.h implementation and therefore replicated in the MAGMA implementation. Undefining it makes no sense whatsoever.

btw Yes I'm Giovanni Azua ;)

bravegag avatar Aug 13 '13 11:08 bravegag

Undefining it makes no sense whatsoever

It does: the macro is used and afterwards it should be undefined again. Undefining it will not affect the previous usage.

manuels avatar Aug 13 '13 11:08 manuels

OK now I understand, makes sense. The same fix applies to the GeneralMatrixMatrix_MKL.h implementation too and to all other *_MKL and *_MAGMA.h as well.

Thanks. Best regards, Giovanni

bravegag avatar Aug 13 '13 11:08 bravegag

Glad I could prevent some potential bugs in the future ;)

manuels avatar Aug 13 '13 11:08 manuels

hmmm but then I would prefer your pull request to patch all affected instances of the problem and not just one case.

bravegag avatar Aug 13 '13 11:08 bravegag