P4 to Git Change 1226078 by rili@rili_opencl_stg on 2016/01/08 15:03:58

SWDEV-84309 - Using agpMemAvailableCacheableBytes instead of agpMemAvailableBytes when calculating free memory for viPlus_ apu.
	                         When memory allocation is in system memory, only agpMemAvailableCacheableBytes is changed

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#539 edit


[ROCm/clr commit: bc822d60d1]
This commit is contained in:
foreman
2016-01-08 15:16:55 -05:00
والد 0289b1b699
کامیت cee266b2d8
@@ -1890,8 +1890,15 @@ Device::globalFreeMemory(size_t* freeMemory) const
freeMemory[LargestFreeBlock] = std::max(memInfo.cardLargestFreeBlockBytes,
memInfo.cardExtLargestFreeBlockBytes) / Ki;
if (settings().apuSystem_) {
freeMemory[TotalFreeMemory] += memInfo.agpMemAvailableBytes / Ki;
freeMemory[LargestFreeBlock] += memInfo.agpLargestFreeBlockBytes / Ki;
if (settings().viPlus_) {
// for viPlus_, OCL is using remote instead remoteUSWC to avoid extra copy
freeMemory[TotalFreeMemory] += memInfo.agpMemAvailableCacheableBytes / Ki;
freeMemory[LargestFreeBlock] += memInfo.agpCacheableLargestFreeBlockBytes / Ki;
}
else {
freeMemory[TotalFreeMemory] += memInfo.agpMemAvailableBytes / Ki;
freeMemory[LargestFreeBlock] += memInfo.agpLargestFreeBlockBytes / Ki;
}
}
return true;