90453b68d3f2fb3d8fe26a05665f205ffe740da3
The hipOccupancyMaxPotentialBlockSize API is meant to return the number of threads for the highest-occupancy workgroup, and the number of those workgroups. It was previously calculating the number of maximum-sized workgroups that would fit on a single CU. This is a mixture of the API we wanted (to calculate max potential block size) and the MaxBlocksPerMultiprocessor function. This patch fixes it up so that the internal occupancy calculation function works for two uses: the traditional function that calculates the maximum blocks per multiprocessor when a user passes in a fixed block size (used for hipMaxBlocksPerMultiprocessor style functions) and a function that calculates the size of a block that would lead to maximum occupancy, and how many blocks of that size would be needed to fill the whole GPU (for hipOccupancyMaxPotentialBlockSize style functions). This also updates the occupancy calculation function to prepare for gfx10, which does not have SGPR-based occupancy limits. Change-Id: Ie007b3f9d5ebc4e166b50a3a051498af35650f35
Popis
Nebyl uveden žádný popis
Jazyky
C++
67.5%
C
20.6%
Python
6.6%
CMake
3.4%
Shell
0.6%
Jiný
1.1%