diff options
| author | mikhnenko <[email protected]> | 2025-10-07 10:25:21 +0300 |
|---|---|---|
| committer | mikhnenko <[email protected]> | 2025-10-07 10:38:03 +0300 |
| commit | e07309516bf008045b92028d09d482923b65baea (patch) | |
| tree | 06a485ce7a130c39bbe2311a10c6bf7e2fd50dc0 | |
| parent | babe7533f18c11be1f8a195ed2324d2d9a89436a (diff) | |
Bump CUDA_HOST_TOOLCHAIN
commit_hash:076fe96026b57c22a3f65ea7b482b7d880430570
| -rw-r--r-- | build/scripts/compile_cuda.py | 2 | ||||
| -rw-r--r-- | contrib/restricted/abseil-cpp/absl/numeric/internal/bits.h | 4 | ||||
| -rw-r--r-- | contrib/restricted/abseil-cpp/patches/fix-cuda.sh | 10 |
3 files changed, 14 insertions, 2 deletions
diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py index 9c44278c574..ac92270204c 100644 --- a/build/scripts/compile_cuda.py +++ b/build/scripts/compile_cuda.py @@ -72,6 +72,8 @@ def main(): # nvcc concatenates the sources for clang, and clang reports unused # things from .h files as if they they were defined in a .cpp file. cflags += ['-Wno-unused-function', '-Wno-unused-parameter'] + # nvcc format source files and give results to clang + cflags += ['-Wno-deprecated-literal-operator'] if not is_clang(command) and '-fopenmp=libomp' in cflags: cflags.append('-fopenmp') diff --git a/contrib/restricted/abseil-cpp/absl/numeric/internal/bits.h b/contrib/restricted/abseil-cpp/absl/numeric/internal/bits.h index e6815445ab7..5aedfdf223a 100644 --- a/contrib/restricted/abseil-cpp/absl/numeric/internal/bits.h +++ b/contrib/restricted/abseil-cpp/absl/numeric/internal/bits.h @@ -199,7 +199,7 @@ CountLeadingZeroes32(uint32_t x) { ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ inline int CountLeadingZeroes16(uint16_t x) { -#if ABSL_HAVE_BUILTIN(__builtin_clzg) +#if ABSL_HAVE_BUILTIN(__builtin_clzg) && !defined(__CUDACC__) return x == 0 ? 16 : __builtin_clzg(x); #elif ABSL_HAVE_BUILTIN(__builtin_clzs) static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int) @@ -337,7 +337,7 @@ CountTrailingZeroesNonzero64(uint64_t x) { ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ inline int CountTrailingZeroesNonzero16(uint16_t x) { -#if ABSL_HAVE_BUILTIN(__builtin_ctzg) +#if ABSL_HAVE_BUILTIN(__builtin_ctzg) && !defined(__CUDACC__) return __builtin_ctzg(x); #elif ABSL_HAVE_BUILTIN(__builtin_ctzs) static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int) diff --git a/contrib/restricted/abseil-cpp/patches/fix-cuda.sh b/contrib/restricted/abseil-cpp/patches/fix-cuda.sh new file mode 100644 index 00000000000..bf8554a6001 --- /dev/null +++ b/contrib/restricted/abseil-cpp/patches/fix-cuda.sh @@ -0,0 +1,10 @@ +set -xue + +replace_has_keyword_in() +{ + sed 's/#if ABSL_HAVE_'${1}'('${2}')/#if ABSL_HAVE_'${1}'('${2}') \&\& !defined(__CUDACC__)/g' -i ${3} +} + +# clang20 + cuda 12 support +replace_has_keyword_in BUILTIN __builtin_clzg absl/numeric/internal/bits.h +replace_has_keyword_in BUILTIN __builtin_ctzg absl/numeric/internal/bits.h |
