[BUG]: cuda.cooperative should validate the sizes of arrays passed to CUB APIs that takes a fixed-size C array
Open
cuda.coop
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 487
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 296
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.