hipamd icon indicating copy to clipboard operation
hipamd copied to clipboard

Possible bug in occupancy calculation

Open jpsamaroo opened this issue 2 years ago • 1 comments

I've been porting the algorithm in ihipOccupancyMaxActiveBlocksPerMultiprocessor to Julia to use for our own occupancy calculations, and noticed a potential typo in:

https://github.com/ROCm-Developer-Tools/hipamd/blob/05e3016405bdaec0b8acfe8378df968dd02136d5/src/hip_platform.cpp#L351

I assume this should actually be if (wrkGrpInfo->usedVGPRs_ > 0) {, since we want to ensure we don't get a divide-by-zero when no VGPRs are used? Obviously such kernels probably don't actually need their occupancy calculated, but I figured it was worth reporting in case someone has run into this!

jpsamaroo avatar Jan 25 '23 16:01 jpsamaroo

Thanks for pointing it out will raise it internally

jatinx avatar May 17 '23 16:05 jatinx