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

Account for dimensions exceeding the domain of 32-bit (unsigned) integers #90

Open
eyalroz opened this issue Jun 9, 2021 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@eyalroz
Copy link
Owner

eyalroz commented Jun 9, 2021

A linear CUDA grid can have 2^31-1 blocks (in the x dimension), each of size 1024 elements, for a total of a little under 2^41 threads. Currently, our types and grid_info functions assume all dimensions can fit within 32-bit integers... and that is not the case.

At the same time, it is costly to default to use 64-bit values for dimensions when a kernel author knows that the dimensions don't actually exceed 32-bits. (Limiting to 16 bits is less useful, since NVIDIA GPU cores don't operate faster on 16-bit integers).

So, we need to figure out how to support over-32-bit dimensions while not forcing them on users by default. Currently we simply do not support this.

@eyalroz eyalroz added bug Something isn't working question Further information is requested labels Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant