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

[BUG]: cuda.cooperative should validate the sizes of arrays passed to CUB APIs that takes a fixed-size C array #3913

Open
brycelelbach opened this issue Feb 22, 2025 · 0 comments
Labels
bug Something isn't working right. cuda.cooperative For all items related to the cuda.cooperative Python module

Comments

@brycelelbach
Copy link
Collaborator

CUB APIs that take a fixed-sized C array will have a corresponding cuda.cooperative API that takes a Numba array. We don't do any checking of the size of the Numba array; if it is smaller than the fixed-sized C array should be, presumably bad things happen. If it is larger, then only the first N elements are used by the operation.

We want to get JIT compilation time errors here. We should be able to do that in Numba by requiring the size of the Numba array passed to such APIs is a literal (Numba has an API for this). If the size of the array isn't known at JIT compilation time or doesn't match, we should produce an error.

@github-project-automation github-project-automation bot moved this to Todo in CCCL Feb 22, 2025
@brycelelbach brycelelbach added bug Something isn't working right. cuda.cooperative For all items related to the cuda.cooperative Python module labels Feb 22, 2025
@brycelelbach brycelelbach changed the title cuda.cooperative should validate the sizes of arrays passed to CUB APIs that takes a fixed-size C array [BUG]: cuda.cooperative should validate the sizes of arrays passed to CUB APIs that takes a fixed-size C array Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right. cuda.cooperative For all items related to the cuda.cooperative Python module
Projects
Status: Todo
Development

No branches or pull requests

1 participant