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
此提交包含在:
@@ -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.
|
||||
|
||||
新增問題並參考
封鎖使用者