MCPcopy Create free account
hub / github.com/ROCm/clr / HostQueue

Method HostQueue

rocclr/platform/commandqueue.cpp:37–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35namespace amd {
36
37HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properties props,
38 uint queueRTCUs, Priority priority, const std::vector<uint32_t>& cuMask)
39 : CommandQueue(context, device, props, device.info().queueProperties_, queueRTCUs, priority,
40 cuMask),
41 lastEnqueueCommand_(nullptr),
42 head_(nullptr),
43 tail_(nullptr),
44 isActive_(false),
45 sync_policy_(amd::SyncPolicy::Auto) {
46 if (GPU_FORCE_QUEUE_PROFILING) {
47 properties().set(CL_QUEUE_PROFILING_ENABLE);
48 }
49 if (AMD_DIRECT_DISPATCH) {
50 // Initialize the queue
51 thread_.Init(this);
52 } else {
53 if (thread_.state() >= Thread::INITIALIZED) {
54 ScopedLock sl(queueLock_);
55 thread_.start(this);
56 // wait for HostQueue::loop() to update acceptingCommands_ as true
57 while (!thread_.acceptingCommands_) {
58 queueLock_.wait();
59 }
60 }
61 }
62}
63
64bool HostQueue::terminate() {
65 // incase of force destroy skip checking on the last command

Callers

nothing calls this directly

Calls 6

infoMethod · 0.45
setMethod · 0.45
InitMethod · 0.45
stateMethod · 0.45
startMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected