-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add cuda::ptx::*
namespace
#574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this idea. Thanks for bringing it forward.
What I am not 100% sure is if we really want to put this in libcu++ or whether we want to make this its completely own subproject, that just inherits some of the common machinery.
The advantage would be that we would be "separated" from CTK releases which would make it a bit more explicit that we are not providing any guarantees here
Co-authored-by: Michael Schellenberger Costa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments. I have left responses inline.
libcudacxx/.upstream-tests/test/cuda/ptx/mbarrier_arrive_tx.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/.upstream-tests/test/cuda/ptx/mbarrier_arrive_tx.pass.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Schellenberger Costa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. Many have been resolved. I replied inline to the open discussions.
libcudacxx/.upstream-tests/test/cuda/ptx/mbarrier_arrive_tx.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/.upstream-tests/test/cuda/ptx/mbarrier_arrive_tx.pass.cpp
Outdated
Show resolved
Hide resolved
This is amazing work. Whatever the team decides, I am happy to see the fruition. For analogy, this is like CUDA Python providing low-level Python bindings for CUDA C APIs, so that Python users can access CUDA from Python. We are witnessing the advent of low-level C++ binding for PTX APIs (so that C++ users can access CUDA from C++, without writing inline PTX)! |
This is a great initiative. |
The test would previously not fail when invalid ptx was present. Fixed now.
...libcxx/include/__cuda/ptx/parallel_synchronization_and_communication_instructions_mbarrier.h
Outdated
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h
Outdated
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h
Outdated
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h
Outdated
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h
Show resolved
Hide resolved
...libcxx/include/__cuda/ptx/parallel_synchronization_and_communication_instructions_mbarrier.h
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_isa_target_macros.h
Outdated
Show resolved
Hide resolved
libcudacxx/include/cuda/std/detail/libcxx/include/__cuda/ptx/ptx_isa_target_macros.h
Outdated
Show resolved
Hide resolved
cuda::ptx::*
proof-of-conceptcuda::ptx::*
namespace
Use the original spellings as in PTX ISA 70 and 78 and also expose in C++ as such.
I think this PR is ready to merge. All comments have been incorporated. In addition, I have made some small improvements after using the API in barrier.h:
|
/backport |
Backport failed for Please cherry-pick the changes locally. git fetch origin branch/2.3.x
git worktree add -d .worktree/backport-574-to-branch/2.3.x origin/branch/2.3.x
cd .worktree/backport-574-to-branch/2.3.x
git checkout -b backport-574-to-branch/2.3.x
ancref=$(git merge-base 83b3365bbc12a9db248b67c22052413d41fae97e 9e9fb70b712a6799791997d3c70db6a28a71af72)
git cherry-pick -x $ancref..9e9fb70b712a6799791997d3c70db6a28a71af72 |
* Add `cuda::ptx::*` namespace (#574) * fixup `___CUDA_VPTX` -> `_CUDA_VPTX` (#664) * fixup `___CUDA_VPTX` -> `_CUDA_VPTX` * Fix warning for unused variable in branches that are constexpr disabled. --------- Co-authored-by: Allard Hendriksen <[email protected]> Co-authored-by: Wesley Maxey <[email protected]>
Description
Add
cuda/ptx
header andcuda::ptx
namespace .closes #659
cuda/ptx
cuda::ptx
mbarrier.arrive.expect_tx
to demonstrate implementation, testing, documentation, and internal use by higher-level libcu++ APIs.Summary of intent:
#include <cuda/ptx>
by outside users..sem, .space, .scope, .op
and others.Checklist