P4 to Git Change 1189314 by gandryey@gera-w8 on 2015/09/09 16:57:25

ECR #304775 - Add  DISABLE_DEFERRED_ALLOC key

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#121 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#240 edit


[ROCm/clr commit: 1420c01d90]
Этот коммит содержится в:
foreman
2015-09-09 17:09:47 -04:00
родитель 66ae72c2f2
Коммит 228eeed2f2
2 изменённых файлов: 17 добавлений и 8 удалений
+15 -8
Просмотреть файл
@@ -282,12 +282,14 @@ Memory::create(void* initFrom, bool sysMemAlloc)
return false;
}
bool ok = true;
const std::vector<Device*>& devices = context_().devices();
// Forces system memory allocation on the device,
// instead of device memory
forceSysMemAlloc_ = sysMemAlloc;
// Create memory on all available devices
for (size_t i = 0; ok && i < devices.size(); i++) {
for (size_t i = 0; i < devices.size(); i++) {
deviceAlloced_[devices[i]] = AllocInit;
// Only GPU devices have device memory objects
@@ -295,13 +297,18 @@ Memory::create(void* initFrom, bool sysMemAlloc)
deviceMemories_[i].ref_ = devices[i];
deviceMemories_[i].value_ = NULL;
}
if (DISABLE_DEFERRED_ALLOC) {
device::Memory* mem = getDeviceMemory(*devices[i]);
if (NULL == mem) {
LogPrintfError("Can't allocate memory size - 0x%08X bytes!",
getSize());
return false;
}
}
}
// Forces system memory allocation on the device,
// instead of device memory
forceSysMemAlloc_ = sysMemAlloc;
return ok;
return true;
}
bool
+2
Просмотреть файл
@@ -166,6 +166,8 @@ release(bool, GPU_IFH_MODE, false, \
"1 = Enable GPU IFH (infinitely fast hardware) mode. Any other value keeps setting disabled.") \
release(bool, GPU_MIPMAP, true, \
"Enables GPU mipmap extension") \
release(bool, DISABLE_DEFERRED_ALLOC, false, \
"Disables deferred memory allocation on device") \
release(int, AMD_GPU_FORCE_SINGLE_FP_DENORM, -1, \
"Force denorm for single precision: -1 - don't force, 0 - disable, 1 - enable") \
debug(bool, OCL_FORCE_CPU_SVM, false, \