-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Block, thread, and warp indices would ideally be unsigned, as in CUDA C/C++. This would:
- Reduce computation and register usage (due to handling signs)
- Align better with CUDA C/C++
However, due to Numba's typing it can result in float indices being generated rather than int ones (e.g unsigned + signed = float or something like that), or 32-bit values becoming 64-bit ones (as observed in numba/numba#6112 (comment))
This was started in numba/numba#6112 - completion of this PR would be sufficient to implement this feature request, but it may not be as simple as getting the test suite to behave identically - effects may be observed in more complex programs where types change.
An alternative path may be to define a separate type for thread indices that is more resistant to upcasting when used in computations, but the exact solution is unclear.