P4 to Git Change 1160575 by gandryey@gera-dev-w7 on 2015/06/11 18:31:59

ECR #304775 - Real time queue support
	- Add the new interface for the real time queue creation

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_command.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#90 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#246 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#511 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#144 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#91 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#48 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#15 edit
Этот коммит содержится в:
foreman
2015-06-11 19:17:47 -04:00
родитель 72ad7da2cf
Коммит 5ef2aa5d9e
2 изменённых файлов: 16 добавлений и 2 удалений
+12 -2
Просмотреть файл
@@ -87,6 +87,7 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
} *p = reinterpret_cast<const QueueProperty*>(queue_properties);
uint queueSize = amdDevice.info().queueOnDevicePreferredSize_;
uint queueRTCUs = 0;
if (p != NULL) while(p->name != 0) {
switch(p->name) {
case CL_QUEUE_PROPERTIES:
@@ -94,9 +95,13 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
//properties = p->value.properties;
properties = static_cast<cl_command_queue_properties>(p->value.raw);
break;
case CL_QUEUE_SIZE: // Unimplemented
case CL_QUEUE_SIZE:
queueSize = p->value.size;
break;
#define CL_QUEUE_REAL_TIME_COMPUTE_UNITS_AMD 0x404f
case CL_QUEUE_REAL_TIME_COMPUTE_UNITS_AMD:
queueRTCUs = p->value.size;
break;
default:
*not_null(errcode_ret) = CL_INVALID_QUEUE_PROPERTIES;
LogWarning("invalid property name");
@@ -110,13 +115,18 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
return (cl_command_queue) 0;
}
if (queueRTCUs > amdDevice.info().numRTCUs_) {
*not_null(errcode_ret) = CL_INVALID_VALUE;
return (cl_command_queue) 0;
}
amd::CommandQueue* queue = NULL;
{
amd::ScopedLock lock(amdContext.lock());
// Check if the app creates a host queue
if (!(properties & CL_QUEUE_ON_DEVICE)) {
queue = new amd::HostQueue(amdContext, amdDevice, properties);
queue = new amd::HostQueue(amdContext, amdDevice, properties, queueRTCUs);
}
else {
// Is it a device default queue
+4
Просмотреть файл
@@ -652,6 +652,10 @@ RUNTIME_ENTRY(cl_int, clGetDeviceInfo, (
minor, param_value_size, param_value, param_value_size_ret);
}
CASE(CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD, numAsyncQueues_);
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD 0x404D
#define CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_AMD 0x404E
CASE(CL_DEVICE_MAX_REAL_TIME_COMPUTE_QUEUES_AMD, numRTQueues_);
CASE(CL_DEVICE_MAX_REAL_TIME_COMPUTE_UNITS_AMD, numRTCUs_);
default:
break;
}