Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add patch to improve CUDA 11 compatibility of GCCcore/12.2.0 and GCCcore/12.3.0 #18854

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/g/GCCcore/GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ patches = [
'GCCcore-12.1.0_allow-pragma-wself-init.patch',
'GCCcore-12.1.0_fix-Wuninitialized-in-AVX-headers.patch',
'GCCcore-12.2.0_fix-vectorizer.patch',
'GCCcore-12.2.0_improve-cuda-compatibility.patch',
]
checksums = [
{'gcc-12.2.0.tar.gz': 'ac6b317eb4d25444d87cf29c0d141dedc1323a1833ec9995211b13e1a851261c'},
Expand All @@ -52,6 +53,8 @@ checksums = [
{'GCCcore-12.1.0_fix-Wuninitialized-in-AVX-headers.patch':
'0ea675960795e238a43ae7d685a0082b21f0b63cf2fe499f6d55e89e0aaee392'},
{'GCCcore-12.2.0_fix-vectorizer.patch': '0b76fc379308fd189ee39c4a3a49facacf8ede08dbec4280f289341083f1632b'},
{'GCCcore-12.2.0_improve-cuda-compatibility.patch':
'91d00122554b56381592229398540e63baa26d03633292a7fdf338407a4a62d5'},
]

builddependencies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The GCC stdlib uses a GCC feature not supported by nvcc until CUDA 12.
I.e. CUDA 12 does not support GCC 12 (only GCC <= 11) erroring at
> if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get))

As the same isn't supported by clang use the same fix.
See https://gcc.gnu.org/bugzilla//show_bug.cgi?id=104990

Author: Alexander Grund (TU Dresden)

--- gcc-12.2.0-orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+++ gcc-12.2.0/libstdc++-v3/include/bits/locale_facets_nonio.tcc
@@ -1465,7 +1465,7 @@
ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
__err = ios_base::goodbit;
bool __use_state = false;
-#if __GNUC__ >= 5 && !defined(__clang__)
+#if __GNUC__ >= 5 && !defined(__clang__) && (!defined(__CUDACC__) || (__CUDACC_VER_MAJOR__ >= 12))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"
// Nasty hack. The C++ standard mandates that get invokes the do_get
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/g/GCCcore/GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ sources = [
patches = [
'GCCcore-6.2.0-fix-find-isl.patch',
'GCCcore-9.3.0_gmp-c99.patch',
'GCCcore-12.2.0_improve-cuda-compatibility.patch',
]
checksums = [
{'gcc-12.3.0.tar.gz': '11275aa7bb34cd8ab101d01b341015499f8d9466342a2574ece93f954d92273b'},
Expand All @@ -44,6 +45,8 @@ checksums = [
{'nvptx-tools-20230122.tar.gz': 'af05fac26e9a83d337758a5495dc35f7a7bbfd90cd09f4a5d3242d059f235e08'},
{'GCCcore-6.2.0-fix-find-isl.patch': '5ad909606d17d851c6ad629b4fddb6c1621844218b8d139fed18c502a7696c68'},
{'GCCcore-9.3.0_gmp-c99.patch': '0e135e1cc7cec701beea9d7d17a61bab34cfd496b4b555930016b98db99f922e'},
{'GCCcore-12.2.0_improve-cuda-compatibility.patch':
'91d00122554b56381592229398540e63baa26d03633292a7fdf338407a4a62d5'},
]

builddependencies = [
Expand Down
Loading