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

Possibly mistaken usage of the cupyx.jit.thrust.device execution policy in the JIT context? #8239

Open
leofang opened this issue Mar 13, 2024 · 3 comments
Assignees
Labels

Comments

@leofang
Copy link
Member

leofang commented Mar 13, 2024

When discussing the Thrust JIT support with the CCCL team, a question was raised regarding the usage of the jit.thrust.device policy in the test suite, ex:

jit.thrust.sort_by_key(
jit.thrust.device,
x_array.begin(),
x_array.end(),
y_array.begin(),
)
According to what I learned, when using Thrust algorithms in a kernel the expectation should be to always use jit.thrust.seq instead. Before CUDA 12, using the device policy would actually silently launch additional kernels using the "old" CUDA dynamic parallelism, so-called CDP1 in the CUDA Programming Guide (although why it worked without us passing -rdc explicitly to the compiler remains to be seen). Worst of all, this is not something that a debugger or profiler can warn. Starting CUDA 12, it'd fall back to the seq policy and at some point it will become a compile-time error.

@jrhemstad @gevtushenko please correct me if the above summary is inaccurate 🙂 Thanks!

@kmaehashi
Copy link
Member

cc/ @asi1024

@leofang
Copy link
Member Author

leofang commented Mar 13, 2024

Sorry, apparently I only typed the note without leaving the actual question... the question is: did you see issues when using the seq policy during development, thus deciding to switch to device in some, but not all, of the tests?

@jrhemstad
Copy link

See NVIDIA/cccl#1534 for a more thorough explanation of the background and Thrust's plans for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants