-
Notifications
You must be signed in to change notification settings - Fork 449
Refactor Thrust/CUB dispatch mechanisms to not rely on __CUDA_ARCH__
#278
Comments
This is relevant to my interests. I been blocked by this since 2019. What's the new mechanism? |
@seanbaxter There's a work-in-progress in #276.
Basically:
I'm curious, though -- what are you doing with this? Are you using the CUB dispatch in another project? |
I was compiling CUDA Toolkit samples without modification with a single translation pass in 2019:
I ended up removing this functionality because CUDA_ARCH-based dispatch was too hard to treat robustly as the projects got more complicated. I made some requests to change this dispatch mechanism, and now it looks like it's happening. I'm looking to re-enable CUDA targets in my compiler. I want to compile CUB/Thrust with a single pass, as we all do. For background, I had an if-codegen statement which did operand substitution at codegen time rather than template substitution, and that appears to be exactly the same as nvc++'s if-target. There was an I looked over <__target_macros> closely.. Three small questions:
? Just a bit confused by the macro name style in 1 and the C++ name style in 2. Maybe they're unrelated things. |
Ah ok - Everything in |
|
@griwes That doesn't clarify. Is |
I'm not sure how much I can say at this point, but the short answer is that that value doesn't actually ever manifest directly in a variable, and the backend understands the bitset. |
I'm just trying to compile CUB/Thrust with this new dispatch mechanic. What are the implicit declarations needed to do that? |
The value of an |
They are used for assembling the right token when preprocessing with In the back-end, these tokens are concatenated to obtain predefined boolean values on NVCC. It was done this way, maybe naively, because NVC++ and NVCC create the dispatch at different stages in compilation. |
Closing in favor of NVIDIA/cccl#65 |
No description provided.
The text was updated successfully, but these errors were encountered: