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

CUDA fix #103

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

CUDA fix #103

wants to merge 4 commits into from

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.

1 participant