Compilation fails with CUDA 12.6

63 views
Skip to first unread message

Pauleonix

unread,
Aug 20, 2024, 9:50:37 AM8/20/24
to MAGMA User
There seems to be an issue with MAGMA's min and max macros conflicting with occurrences down the line from CUDA 12.6's cooperative_groups.h (magmablas/zgbtf2_kernels.cu:15).

It looks like the same issue surfaced for hip/hip_cooperative_groups.h and min and was solved by undefining min before including the header.

Mark Gates

unread,
Aug 20, 2024, 9:56:15 AM8/20/24
to Pauleonix, MAGMA User
Thanks for the report. We'll work on fixing it.

In general,
#include "magma_internal.h"
should be the last (or close to last) thing included, after including vendor headers, to avoid macros conflicting. (Although a better long-term solution would be to switch to C++ std::min, std::max, completely removing the need for these error-prone macros.)

Mark

Interim Director, Innovative Computing Laboratory (ICL)
Research Assistant Professor, University of Tennessee, Knoxville

Pauleonix

unread,
Aug 20, 2024, 12:40:55 PM8/20/24
to MAGMA User, mga...@icl.utk.edu, MAGMA User, Pauleonix
I wasn't aware of the GitHub repo, just the BitBucket one (Maybe one of them should state that it is archived or a mirror in the description and link the other?). There seems to be a corresponding issue already: https://github.com/icl-utk-edu/magma/issues/7

Pauleonix

unread,
Aug 20, 2024, 12:41:05 PM8/20/24
to MAGMA User, mga...@icl.utk.edu, MAGMA User, Pauleonix
Including magma_internal.h after cooperative_groups.h is not an option because MAGMA_HAVE_CUDA/MAGMA_HAVE_HIP are needed to determine the right cooperative groups header. Undefining min and max seems to work fine. It then relies on the min and max from the CUDA Math API
mga...@icl.utk.edu schrieb am Dienstag, 20. August 2024 um 15:56:15 UTC+2:

Ahmad Abdelfattah

unread,
Aug 20, 2024, 2:14:54 PM8/20/24
to Pauleonix, MAGMA User, Mark Gates, Pauleonix
Thank you for raising the issue. A simple fix will soon be pushed. 

We have just moved to GitHub. The bitbucket repo will be deprecated once we copy some remaining issues to GitHub. 

Thanks,
Ahmad


-- 
You received this message because you are subscribed to the Google Groups "MAGMA User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magma-user+...@icl.utk.edu.
To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/magma-user/1b50ac6f-8ed6-472f-b514-74f6d5ad56ffn%40icl.utk.edu.

Reply all
Reply to author
Forward
0 new messages