P4 to Git Change 1192638 by xcui@merged_opencl_jxcwin on 2015/09/21 14:34:25

SWDEV-17662 - EPR #426715 - for CZ enabled PX system, we need discrete GPU be the first device to do SVM allocation, and the fine grain system capable device do the allocation after discrete GPU.

	precheckin:
	http://ocltc.amd.com:8111/viewModification.html?modId=58725&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

	code review:
	http://ocltc.amd.com/reviews/r/8513/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#255 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#36 edit


[ROCm/clr commit: ff9a6c0c58]
Este commit está contenido en:
foreman
2015-09-21 14:46:15 -04:00
padre c3fca75c4c
commit 98131ac83e
Se han modificado 2 ficheros con 21 adiciones y 4 borrados
+16 -4
Ver fichero
@@ -40,10 +40,22 @@ Context::Context(
svmAllocDevice_.push_back(device);
}
}
//make sure the first device is GPU
if ((svmAllocDevice_.size() > 1)
&& (svmAllocDevice_.front()->type() == CL_DEVICE_TYPE_CPU)) {
std::swap(svmAllocDevice_.front(), svmAllocDevice_.back());
if (svmAllocDevice_.size() > 1) {
//make sure the CPU is the last device to do allocation.
if ((svmAllocDevice_.front()->type() == CL_DEVICE_TYPE_CPU)) {
std::swap(svmAllocDevice_.front(), svmAllocDevice_.back());
}
uint isFirstDeviceFGSEnabled = svmAllocDevice_.front()->isFineGrainedSystem();
for (auto& dev : svmAllocDevice_) {
//allocation on fine - grained system incapable device first
if (isFirstDeviceFGSEnabled && (dev->type() == CL_DEVICE_TYPE_GPU)
&& (!(dev->isFineGrainedSystem()))) {
std::swap(svmAllocDevice_.front(), dev);
break;
}
}
}
}