P4 to Git Change 1264675 by gandryey@gera-w8 on 2016/05/03 14:13:52

SWDEV-86170 - Need OCL changes for Compute Unit Reservation
	- Add support for RT and Medium priority queues
	- Use the new packet for the CU mask programming. It will allow CU reservation for RT queue in KMD.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_command.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/devenq/schedule.cl#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#546 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#159 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#127 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#402 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.hpp#139 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#81 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.h#52 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#165 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/backend.h#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#17 edit


[ROCm/clr commit: 0c54d874fb]
Этот коммит содержится в:
foreman
2016-05-03 14:32:32 -04:00
родитель 8fd7c40f36
Коммит 2b8e8294c1
+9 -3
Просмотреть файл
@@ -87,7 +87,8 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
} *p = reinterpret_cast<const QueueProperty*>(queue_properties);
uint queueSize = amdDevice.info().queueOnDevicePreferredSize_;
uint queueRTCUs = 0;
uint queueRTCUs = amd::CommandQueue::RealTimeDisabled;
amd::CommandQueue::Priority priority = amd::CommandQueue::Priority::Normal;
if (p != NULL) while(p->name != 0) {
switch(p->name) {
case CL_QUEUE_PROPERTIES:
@@ -102,6 +103,10 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
case CL_QUEUE_REAL_TIME_COMPUTE_UNITS_AMD:
queueRTCUs = p->value.size;
break;
#define CL_QUEUE_MEDIUM_PRIORITY 0x4050
case CL_QUEUE_MEDIUM_PRIORITY:
priority = amd::CommandQueue::Priority::Medium;
break;
default:
*not_null(errcode_ret) = CL_INVALID_QUEUE_PROPERTIES;
LogWarning("invalid property name");
@@ -115,7 +120,8 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
return (cl_command_queue) 0;
}
if (queueRTCUs > amdDevice.info().numRTCUs_) {
if ((queueRTCUs != amd::CommandQueue::RealTimeDisabled) &&
((queueRTCUs > amdDevice.info().numRTCUs_) || (queueRTCUs == 0))) {
*not_null(errcode_ret) = CL_INVALID_VALUE;
return (cl_command_queue) 0;
}
@@ -126,7 +132,7 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
// Check if the app creates a host queue
if (!(properties & CL_QUEUE_ON_DEVICE)) {
queue = new amd::HostQueue(amdContext, amdDevice, properties, queueRTCUs);
queue = new amd::HostQueue(amdContext, amdDevice, properties, queueRTCUs, priority);
}
else {
// Is it a device default queue