I am kind of confused with hipExtModuleLaunchKernel's globalWorkSize parameter. The HIP API document says it is equivalent to hipLaunchKernel's gridDim.x, but when I print gridDim.x inside a custom kernel, they do not match. It seems the equation to translate globalWorkSize into gridDim.x is as follow:
gridDim.x = (globalWorkSize + localWorkSizeX - 1) / localWorkSizeX
Am I correct?