SWDEV-369570 - MaxSharedMemoryPerBloc check

Change-Id: I74d216a5d9316758bb611eb241ba85222194ce8b


[ROCm/clr commit: 2e60edbe0e]
Dieser Commit ist enthalten in:
pghafari verfasst und Payam Ghafari committed 2023-01-17 07:52:15 -05:00
1 Ursprung 7261e8fa39
Commit 829bbe4933
1 Datei geändert
+4
+4
Datei anzeigen
@@ -224,6 +224,10 @@ hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWorkSizeX,
}
const amd::Device* device = g_devices[deviceId]->devices()[0];
const auto& info = device->info();
if (sharedMemBytes > info.localMemSizePerCU_) { //sharedMemPerBlock
return hipErrorInvalidValue;
}
// Make sure dispatch doesn't exceed max workgroup size limit
if (blockDimX * blockDimY * blockDimZ > device->info().maxWorkGroupSize_) {
return hipErrorInvalidValue;