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 CUB/MSVC/RDC tests #469

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

gevtushenko
Copy link
Collaborator

Description

closes #462

There's a CMake bug affecting CUDA object libraries with RDC=true that was fixed in 3.27.5. This PR adds a warning when the visual studio generator is used with RDC=true build. Apart from that, there's another CMake bug related to object libraries that forces us to use $<TARGET_OBJECTS:target>. Unfortunately, this breaks ninja / make generators, so the WAR is only applied to the visual studio generator. Our Catch2 test mixes CUDA and CXX targets, because nvcc can't process Catch2 header. When CMake links object library with an executable produced by a single CXX target, we are back at linkage issues. To WAR this issue, this PR introduces a dummy CUDA target to the Catch2 runner. With this changes, I was able to successfully build RDC=true Catch2 tests on windows.

Apart from that, Catch2 tests are now separated into .cdp_0 and .cdp_1 to ease tests development. While validating separate Catch2 compilation, I noticed that this mode was broken because of direct inclusion of Catch2 headers. This PR fixes thas as well.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@gevtushenko gevtushenko requested review from a team as code owners September 20, 2023 23:38
@gevtushenko gevtushenko requested review from alliepiper, griwes, elstehle and robertmaynard and removed request for a team September 20, 2023 23:38
@gevtushenko gevtushenko changed the title Fix main/GitHub/rdc tests Fix CUB/MSVC/RDC tests Sep 20, 2023
cub/test/catch2_runner_helper.cu Show resolved Hide resolved
@gevtushenko gevtushenko merged commit dc77fea into NVIDIA:main Sep 21, 2023
457 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: Fix MSVC build of CUB tests with RDC=true
3 participants