Skip to content

Conversation

@bentsherman
Copy link
Member

Just a small fix I forgot to add a while ago. In OpenCL the global work size is the number of all work items, but in CUDA the grid size is the number of all thread blocks (workgroups in OpenCL). When I added the CUDA example (which was adapted from the OpenCL example) I forgot to make this change. Doesn't cause any errors but CUDA just launches a bunch of extra threads that immediately exit. So I'm fixing this for future ACE users.

Funny story, for the longest time the KINC CUDA kernel was always just slightly slower than the OpenCL kernel... then I finally fixed this in the KINC code and then the CUDA version was slightly faster... as it should be.

@bentsherman
Copy link
Member Author

Added another CUDA function to CUDA::Kernel which can be used to control GPU occupancy of a kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants