Skip to content

Commit

Permalink
Deprecate ABI v2 and v3 in libcudacxx (#3575)
Browse files Browse the repository at this point in the history
* Deprecate ABI v2 and v3 in libcudacxx

* Update libcudacxx/include/cuda/std/detail/__config

* Add matching for defines in NVRTCC

---------

Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com>
  • Loading branch information
wmaxey and miscco committed Feb 4, 2025
1 parent c5a1ba2 commit 60ffa8a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcudacxx/include/cuda/std/detail/__config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
# define _LIBCUDACXX_CUDA_ABI_VERSION _LIBCUDACXX_CUDA_ABI_VERSION_LATEST
#endif

#if (_LIBCUDACXX_CUDA_ABI_VERSION < 4) && !defined(LIBCUDACXX_IGNORE_DEPRECATED_ABI)
# error "libcu++ ABIs older than version 4 are deprecated, define LIBCUDACXX_IGNORE_DEPRECATED_ABI to ignore"
#endif

#ifdef _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION
# if _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION != _LIBCUDACXX_CUDA_ABI_VERSION
# error cuda_pipeline.h has assumed a different libcu++ ABI version than provided by this library. To fix this, please include a libcu++ header before including cuda_pipeline.h, or upgrade to a version of the toolkit this version of libcu++ shipped in.
Expand Down
1 change: 1 addition & 0 deletions libcudacxx/test/libcudacxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DCCCL_ENABLE_ASSERTIONS")

# Disable dialect deprecation
string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DCCCL_IGNORE_DEPRECATED_CPP_DIALECT")
string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DLIBCUDACXX_IGNORE_DEPRECATED_ABI")

if (NOT MSVC AND NOT ${CMAKE_CUDA_COMPILER_ID} STREQUAL "Clang")
set(LIBCUDACXX_WARNING_LEVEL "--compiler-options=-Wall --compiler-options=-Wextra")
Expand Down
6 changes: 6 additions & 0 deletions libcudacxx/test/utils/nvidia/nvrtc/nvrtcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ ArgPair argHandlers[] = {
nvrtcArguments.emplace_back("-G");
return NORMAL;
}},
{// Matches -D
std::regex("^-D.+$"),
[](const std::smatch& match) {
nvrtcArguments.emplace_back(match[0].str());
return NORMAL;
}},
{// Capture an argument that is just '-'. If no input file is listed input is on stdin
std::regex("^-$"),
[](const std::smatch& match) {
Expand Down

0 comments on commit 60ffa8a

Please sign in to comment.