Advertisement

Should I expect for SV_GroupIndex to be consecutive?

Started by July 31, 2018 08:46 AM
1 comment, last by Adam Miles 6 years, 6 months ago

The example:

I have a group size of 512 threads. I want to load data from device memory to the LDS that is 128 bytes.
Like this:


if (groupInd < 128) {
    // load the corresponding data element
}


Doing this, I expect two wavefronts to do the job. It would screw up my mood if I code it this way, and the GPU spreads this task over more than two wavefronts creating divergence.
 

Yes, that'll run as you expect. Just bear in mind that not every piece of HW runs wave sizes of 64, so the number of waves that go down this path will vary from GPU to GPU.

Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group

This topic is closed to new replies.

Advertisement