Fix occupancy calculation for grouped GEMM (#532)

This commit is contained in:
Jack Kosaian
2022-06-18 19:53:59 -04:00
committed by GitHub
parent 25e26a6e51
commit fa56763c25
3 changed files with 25 additions and 66 deletions

View File

@@ -419,12 +419,6 @@ struct TestbedGrouped {
/// Returns the number of threadblocks to launch if the kernel can run on the target
/// device. Otherwise, returns zero.
int sufficient() const {
//
// Determine SMEM requirements and waive if not satisfied
//
int smem_size = int(sizeof(typename Gemm::GemmKernel::SharedStorage));
cudaDeviceProp properties;
int device_idx;
cudaError_t result = cudaGetDevice(&device_idx);
@@ -439,7 +433,7 @@ struct TestbedGrouped {
throw std::runtime_error("cudaGetDeviceProperties() failed");
}
int occupancy = std::min(2, int(properties.sharedMemPerMultiprocessor / smem_size));
int occupancy = Gemm::maximum_active_blocks();
return properties.multiProcessorCount * occupancy;
}