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

PTX: Conditional reference-to-value rewrite #483

Open
maleadt opened this issue Jul 6, 2023 · 0 comments
Open

PTX: Conditional reference-to-value rewrite #483

maleadt opened this issue Jul 6, 2023 · 0 comments
Labels
ptx Stuff about the NVIDIA PTX back-end.

Comments

@maleadt
Copy link
Member

maleadt commented Jul 6, 2023

We should not unconditionally rewrite all parameters to be passed by-value, as there's actually a limit:

__global__ function parameters are passed to the device via constant memory and are limited to 32,764 bytes starting with Volta, and 4 KB on older architectures.

Not doing the rewrite requires that CUDA.jl allocates a box on the GPU that contains the argument. This also needs to be a stream-ordered allocation, in order to respect the kernel's lifetime.

@maleadt maleadt added the ptx Stuff about the NVIDIA PTX back-end. label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ptx Stuff about the NVIDIA PTX back-end.
Projects
None yet
Development

No branches or pull requests

1 participant