This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Add libcu++ dependency; initial round of NV_IF_TARGET ports.#1605
Merged
Conversation
Collaborator
Author
|
run tests |
fc0846e to
b771cda
Compare
Collaborator
Author
|
run tests |
058166e to
9065dda
Compare
Collaborator
Author
|
run tests |
17cfee7 to
e12b463
Compare
Collaborator
Author
|
run tests |
e12b463 to
d51b751
Compare
Collaborator
Author
|
run tests |
d51b751 to
2f2d141
Compare
Collaborator
Author
|
run tests |
2f2d141 to
bbc43d0
Compare
Collaborator
Author
|
run tests |
bbc43d0 to
193be7c
Compare
Collaborator
Author
|
run tests |
193be7c to
42c32ad
Compare
Collaborator
Author
|
run tests |
NV_IF_TARGET ports.
Collaborator
Author
|
run tests |
42c32ad to
3710ed4
Compare
Collaborator
Author
|
run tests |
Collaborator
Author
|
run tests |
1a65974 to
e398841
Compare
Collaborator
Author
|
run tests |
1 similar comment
Collaborator
Author
|
run tests |
2 tasks
robertmaynard
approved these changes
May 3, 2022
e9953c8 to
50316c7
Compare
Collaborator
Author
|
Rebased. Now that the version has been bumped to 2.0.0 we can start to seriously think about merging this. run tests |
gevtushenko
approved these changes
May 11, 2022
Collaborator
gevtushenko
left a comment
There was a problem hiding this comment.
There are a few comments that I consider critical, but the source of the issue isn't caused by this PR. So the comments shouldn't block it. The rest of the comments are quite optional.
| #include <thrust/system/detail/bad_alloc.h> | ||
| #include <thrust/detail/malloc_and_free.h> | ||
|
|
||
| #ifdef THRUST_CACHING_DEVICE_MALLOC |
Collaborator
There was a problem hiding this comment.
I don't see any documentation on this macro, is it still in use?
50316c7 to
c9fe022
Compare
Collaborator
Author
|
run tests |
There's no way for a user to meaningfully use this, since libcudacxx is a required dependency. It is checked during the initial `find_package(Thrust)` call, before the user would have access to Thrust's CMake API. Updated the CMake README.md with instructions for using an explicit libcudacxx target.
- The `g_state` flag wasn't reset between executions. - The `destroy` method was being invoke in the current host system, not the system that owned the allocated memory (always cpp). This broke on MSVC's OpenMP implementation, where it seemed to be asserting the `g_state` flag before it was updated by `destroy`. This only happened on MSVC when host system = OMP, and appears to be a bug/miscompile in MSVC (repro'd on 2019). Fixed by explicitly tagging the allocator system to cpp. - Added check that `destroy` is not invoked on empty vectors.
c9fe022 to
4cdf6de
Compare
Collaborator
Author
|
run tests |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires NVIDIA/cub#448.
This PR contains an initial set of changes necessary to migrate Thrust and CUB to NV_IF_TARGET and remove dependence on
__CUDA_ARCH__. It does not fully remove all usages of__CUDA_ARCH__, but rather focuses on the following:#ifdef __CUDA_ARCH__to useNV_IF_TARGET.This also includes various bug fixes for issues exposed by the above.
Future PRs will address the remaining usages of
__CUDA_ARCH__in the CDP macros and the kernel dispatch infrastructure.Pre-written Release Notes
Breaking Changes
NV_IF_TARGETports. #1605: Add libcu++ dependency.NV_IF_TARGETports. #1605: The following macros are no longer defined by default. They can be re-enabled by definingTHRUST_PROVIDE_LEGACY_ARCH_MACROS. These will be removed completely in a future release.THRUST_IS_HOST_CODE: Replace withNV_IF_TARGET.THRUST_IS_DEVICE_CODE: Replace withNV_IF_TARGET.THRUST_INCLUDE_HOST_CODE: Replace withNV_IF_TARGET.THRUST_INCLUDE_DEVICE_CODE: Replace withNV_IF_TARGET.THRUST_DEVICE_CODE: Replace withNV_IF_TARGET.Other Enhancements
NV_IF_TARGETports. #1605: Removed special case code for unsupported CUDA architectures.NV_IF_TARGETports. #1605: Replace several usages of__CUDA_ARCH__with<nv/target>to handle host/device code divergence.Bug Fixes
NV_IF_TARGETports. #1605: Fix some execution space warnings in the allocator library.