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

Fix nvc++ as host compiler #560

Merged
merged 1 commit into from
Oct 14, 2023
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 cub/cub/util_macro.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t,
#if !defined(CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION)
_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wattributes")
_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wattributes")
#if !defined(_LIBCUDACXX_COMPILER_NVHPC_CUDA)
_LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage)
#endif
#endif

/** @} */ // end group UtilModule
Expand Down
9 changes: 9 additions & 0 deletions libcudacxx/include/cuda/std/detail/libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1756,16 +1756,25 @@ typedef unsigned int char32_t;
# define _LIBCUDACXX_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
# define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCUDACXX_TOSTRING(clang diagnostic ignored str))
# define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(str)
# elif defined(_LIBCUDACXX_COMPILER_GCC)
# define _LIBCUDACXX_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
# define _LIBCUDACXX_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
# define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCUDACXX_TOSTRING(GCC diagnostic ignored str))
# define _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(str)
# elif defined(_LIBCUDACXX_COMPILER_NVHPC)
# define _LIBCUDACXX_DIAGNOSTIC_PUSH _Pragma("diagnostic push")
# define _LIBCUDACXX_DIAGNOSTIC_POP _Pragma("diagnostic pop")
# define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCUDACXX_TOSTRING(diag_suppress str))
# else
# define _LIBCUDACXX_DIAGNOSTIC_PUSH
# define _LIBCUDACXX_DIAGNOSTIC_POP
# define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str)
# define _LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(str)
# endif

// _LIBCUDACXX_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
Expand Down
3 changes: 3 additions & 0 deletions thrust/thrust/system/cuda/detail/core/agent_launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ namespace core {
#if !defined(THRUST_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION)
_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wattributes")
_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wattributes")
#if !defined(_LIBCUDACXX_COMPILER_NVHPC_CUDA)
_LIBCUDACXX_NVHPC_DIAGNOSTIC_IGNORED(attribute_requires_external_linkage)
#endif
#endif

#ifndef THRUST_DETAIL_KERNEL_ATTRIBUTES
Expand Down