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
Этот коммит содержится в:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user