From c986201f8dd769f388ad7a43ffbbb711c7c6cbb6 Mon Sep 17 00:00:00 2001 From: Kenichi Maehashi Date: Sat, 15 Feb 2025 09:16:20 +0900 Subject: [PATCH] Merge pull request #8952 from jakirkham/use_cxx17 Broaden usage of C++17 --- cupy/_core/_cub_reduction.pyx | 3 ++- cupy/_functional/vectorize.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cupy/_core/_cub_reduction.pyx b/cupy/_core/_cub_reduction.pyx index 01b4fb6feb2..67f70653264 100644 --- a/cupy/_core/_cub_reduction.pyx +++ b/cupy/_core/_cub_reduction.pyx @@ -36,7 +36,8 @@ cdef function.Function _create_cub_reduction_function( # license issue we can't yet bundle bf16 headers. CUB offers us a # band-aid solution to avoid including the latter (NVIDIA/cub#478, # nvbugs 3641496). - options += ('--std=c++11', '-DCUB_DISABLE_BF16_SUPPORT') + # 3. Recent CCCL versions need C++17. + options += ('--std=c++17', '-DCUB_DISABLE_BF16_SUPPORT') cdef str backend if runtime._is_hip_environment: diff --git a/cupy/_functional/vectorize.py b/cupy/_functional/vectorize.py index 580f01c7a94..85bcfa07ead 100644 --- a/cupy/_functional/vectorize.py +++ b/cupy/_functional/vectorize.py @@ -98,7 +98,7 @@ def __call__(self, *args): kern = _core.ElementwiseKernel( in_params, out_params, body, 'cupy_vectorize', preamble=result.code, - options=('-DCUPY_JIT_MODE', '--std=c++14'), + options=('-DCUPY_JIT_MODE', '--std=c++17'), ) self._kernel_cache[itypes] = kern