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
此提交包含在:
foreman
2016-05-03 14:32:32 -04:00
父節點 3736e175a3
當前提交 9d15802430
共有 11 個檔案被更改,包括 98 行新增46 行删除
+15 -2
查看文件
@@ -31,6 +31,12 @@ class DeviceQueue;
class CommandQueue : public RuntimeObject
{
public:
static const uint RealTimeDisabled = 0xffffffff;
enum class Priority : uint {
Normal = 0,
Medium
};
struct Properties
{
typedef cl_command_queue_properties value_type;
@@ -92,6 +98,9 @@ public:
//! Returns the number or requested real time CUs
uint rtCUs() const { return rtCUs_; }
//! Returns the queue priority
Priority priority() const { return priority_; }
protected:
//! CommandQueue constructor is protected
//! to keep the CommandQueue class as a virtual interface
@@ -100,16 +109,19 @@ protected:
Device& device, //!< Device object
cl_command_queue_properties properties, //!< Queue properties
cl_command_queue_properties propMask, //!< Queue properties mask
uint rtCUs = 0 //!< Avaialble real time compute units
uint rtCUs = RealTimeDisabled, //!< Avaialble real time compute units
Priority priority = Priority::Normal //!< Queue priority
)
: properties_(propMask, properties)
, rtCUs_(rtCUs)
, priority_(priority)
, queueLock_("CommandQueue::queueLock")
, device_(device)
, context_(context) {}
Properties properties_; //!< Queue properties
uint rtCUs_; //!< The number of used RT compute units
Priority priority_; //!< Queue priority
Monitor queueLock_; //!< Lock protecting the queue
Device& device_; //!< The device
SharedReference<Context> context_; //!< The context of this command queue
@@ -179,7 +191,8 @@ public:
Context& context,
Device& device,
cl_command_queue_properties properties,
uint queueRTCUs = 0
uint queueRTCUs = 0,
Priority priority = Priority::Normal
);
//! Returns TRUE if this command queue can accept commands.