Fix occupancy calculation for grouped GEMM (#532)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user