P4 to Git Change 1579735 by gandryey@gera-w8 on 2018/07/12 14:22:40
SWDEV-158730 - [CQE OCL][ocltst][WIN] OCLMemoryInfo[1] a sub-test of ocltst oclruntime module is failed - Update free memory calculation for APU systems. There is still an issue in GSL with multiple alloc/free passes Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#595 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#96 edit
Cette révision appartient à :
@@ -1800,28 +1800,29 @@ bool Device::globalFreeMemory(size_t* freeMemory) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
gslMemInfo memInfo = {0};
|
||||
gslMemInfo memInfo = { 0 };
|
||||
gslCtx()->getMemInfo(&memInfo, GSL_MEMINFO_BASIC);
|
||||
|
||||
// Fill free memory info
|
||||
freeMemory[TotalFreeMemory] =
|
||||
(memInfo.cardMemAvailableBytes + memInfo.cardExtMemAvailableBytes +
|
||||
resourceCache().lclCacheSize()) / Ki;
|
||||
freeMemory[TotalFreeMemory] = (memInfo.cardMemAvailableBytes + memInfo.cardExtMemAvailableBytes +
|
||||
resourceCache().lclCacheSize()) / Ki;
|
||||
freeMemory[LargestFreeBlock] =
|
||||
std::max(memInfo.cardLargestFreeBlockBytes, memInfo.cardExtLargestFreeBlockBytes) / Ki;
|
||||
std::max(memInfo.cardLargestFreeBlockBytes, memInfo.cardExtLargestFreeBlockBytes) / Ki;
|
||||
if (settings().apuSystem_) {
|
||||
uint64_t sysMem = 0;
|
||||
if ((memInfo.agpMemAvailableBytes + resourceCache().cacheSize()) > resourceCache().lclCacheSize()) {
|
||||
sysMem = (memInfo.agpMemAvailableBytes + resourceCache().cacheSize()) - resourceCache().lclCacheSize();
|
||||
}
|
||||
sysMem /= Ki;
|
||||
freeMemory[TotalFreeMemory] += sysMem;
|
||||
|
||||
if (settings().viPlus_) {
|
||||
// for viPlus_, OCL is using remote instead remoteUSWC to avoid extra copy
|
||||
freeMemory[TotalFreeMemory] += (memInfo.agpMemAvailableCacheableBytes -
|
||||
resourceCache().lclCacheSize() + resourceCache().cacheSize()) / Ki;
|
||||
freeMemory[LargestFreeBlock] += memInfo.agpCacheableLargestFreeBlockBytes / Ki;
|
||||
} else {
|
||||
freeMemory[TotalFreeMemory] += (memInfo.agpMemAvailableBytes -
|
||||
resourceCache().lclCacheSize() + resourceCache().cacheSize()) / Ki;
|
||||
freeMemory[LargestFreeBlock] += memInfo.agpLargestFreeBlockBytes / Ki;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur