P4 to Git Change 1201490 by xcui@merged_opencl_jxcwin on 2015/10/20 10:47:18
SWDEV-41018 - if system is equal to or less than 2GB memory, disable CPU and APU for OpenCL, and force the device to be 1.2 if it is a discrete GPU. precheckin: http://ocltc.amd.com:8111/viewModification.html?modId=60516&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true code review: http://ocltc.amd.com/reviews/r/8738/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#277 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#531 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#331 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#95 edit
此提交包含在:
@@ -146,6 +146,7 @@ bool
|
||||
Settings::create(
|
||||
const CALdeviceattribs& calAttr
|
||||
, bool reportAsOCL12Device
|
||||
, bool smallMemSystem
|
||||
)
|
||||
{
|
||||
CALuint target = calAttr.target;
|
||||
@@ -228,6 +229,14 @@ Settings::create(
|
||||
oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
|
||||
XCONCAT(OpenCL, XCONCAT(OPENCL_MAJOR, OPENCL_MINOR)) : OpenCL12;
|
||||
}
|
||||
if (smallMemSystem) { //force the dGPU to be 1.2 device for small memory system.
|
||||
if (apuSystem_) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
oclVersion_ = OpenCL12;
|
||||
}
|
||||
}
|
||||
if (GPU_FORCE_OCL20_32BIT) {
|
||||
force32BitOcl20_ = true;
|
||||
oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
|
||||
|
||||
新增問題並參考
封鎖使用者