SWDEV-369570 - MaxSharedMemoryPerBloc check
Change-Id: I74d216a5d9316758bb611eb241ba85222194ce8b
This commit is contained in:
zatwierdzone przez
Payam Ghafari
rodzic
236a725d67
commit
2e60edbe0e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user