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

Handle warp configurations for 2D and 3D blocks #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjperkins
Copy link

@sjperkins sjperkins commented Jan 29, 2019

I noticed that the warp_id calculation within much of the code assumes a 1D thread block. Is this an assumed limitation when using trove?

int warp_id = threadIdx.x & WARP_MASK;

To cater for 2D and 3D blocks this should probably be

int warp_id = ((threadIdx.z*blockDim.y + threadIdx.y)*blockDimx.x + threadIdx.x) & WARP_MASK;

This PR makes the above change, but I'm not sure if its worth going further if the actual algorithm internals depend on a 1D thread block?

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