Skip to content

Commit

Permalink
Fix icc / cub (#1152)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Schellenberger Costa <[email protected]>
  • Loading branch information
gevtushenko and miscco committed Nov 28, 2023
1 parent bc4f2e3 commit ad93a00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 7 additions & 3 deletions cub/cub/util_macro.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#pragma once

#include <cub/version.cuh>
#include <cuda/__cccl_config>

#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
# pragma GCC system_header
Expand Down Expand Up @@ -134,9 +134,13 @@ constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t,
#if !defined(CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION)
_CCCL_DIAG_SUPPRESS_GCC("-Wattributes")
_CCCL_DIAG_SUPPRESS_CLANG("-Wattributes")
#if !defined(_CCCL_CUDA_COMPILER_NVHPC)
# if !defined(_CCCL_CUDA_COMPILER_NVHPC)
_CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage)
#endif // !_CCCL_CUDA_COMPILER_NVHPC
# endif // !_CCCL_CUDA_COMPILER_NVHPC
# if defined(_CCCL_COMPILER_ICC) || defined(_CCCL_COMPILER_ICC_LLVM)
# pragma warning(disable : 1890) // the "__visibility__" attribute can only appear on functions and
// variables with external linkage'
# endif
#endif // !CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION

/** @} */ // end group UtilModule
Expand Down
10 changes: 5 additions & 5 deletions libcudacxx/include/cuda/std/detail/libcxx/include/__cccl_config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
#define __CCCL_CONFIG

// Determine the host compiler
#if defined(__NVCOMPILER)
#if defined(__INTEL_LLVM_COMPILER)
# define _CCCL_COMPILER_ICC_LLVM
#elif defined(__INTEL_COMPILER)
# define _CCCL_COMPILER_ICC
#elif defined(__NVCOMPILER)
# define _CCCL_COMPILER_NVHPC
#elif defined(__clang__)
# define _CCCL_COMPILER_CLANG
Expand All @@ -22,10 +26,6 @@
# define _CCCL_COMPILER_MSVC
#elif defined(__IBMCPP__)
# define _CCCL_COMPILER_IBM
#elif defined(__INTEL_LLVM_COMPILER)
# define _CCCL_COMPILER_ICC_LLVM
#elif defined(__INTEL_COMPILER)
# define _CCCL_COMPILER_ICC
#elif defined(__CUDACC_RTC__)
# define _CCCL_COMPILER_NVRTC
#endif
Expand Down

0 comments on commit ad93a00

Please sign in to comment.