P4 to Git Change 2005601 by gandryey@gera-hip-lnx on 2019/09/27 13:58:55
SWDEV-184709 - support hipLaunchCooperativeKernel() - Switch to the device library functions for GWS sync and init Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#42 edit ... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/src/runtimeApi/module/hipCooperativeGroup.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palschedcl.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#152 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocschedcl.cpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#87 edit
This commit is contained in:
@@ -542,7 +542,7 @@ hipError_t ihipCreateGlobalVarObj(const char* name, hipModule_t hmod, amd::Memor
|
||||
namespace hip_impl {
|
||||
|
||||
hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
|
||||
const void* f,
|
||||
hipFunction_t f,
|
||||
int blockSize,
|
||||
size_t dynamicSMemSize)
|
||||
{
|
||||
@@ -585,7 +585,7 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
|
||||
|
||||
size_t total_used_lds = wrkGrpInfo->usedLDSSize_ + dynamicSMemSize;
|
||||
if (total_used_lds != 0) {
|
||||
// Calculate LDS occupacy per CU. lds_per_cu / (static_lsd + dynamic_lds)
|
||||
// Calculate LDS occupancy per CU. lds_per_cu / (static_lsd + dynamic_lds)
|
||||
int lds_occupancy = static_cast<int>(device->info().localMemSize_ / total_used_lds);
|
||||
*numBlocks = std::min(*numBlocks, lds_occupancy);
|
||||
}
|
||||
@@ -595,7 +595,7 @@ hipError_t ihipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
|
||||
}
|
||||
|
||||
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
|
||||
const void* f,
|
||||
hipFunction_t f,
|
||||
int blockSize,
|
||||
size_t dynamicSMemSize)
|
||||
{
|
||||
@@ -603,7 +603,7 @@ hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
|
||||
}
|
||||
|
||||
hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks,
|
||||
const void* f,
|
||||
hipFunction_t f,
|
||||
int blockSize,
|
||||
size_t dynamicSMemSize,
|
||||
unsigned int flags)
|
||||
|
||||
Reference in New Issue
Block a user