MCPcopy Create free account
hub / github.com/XpuOS/xsched / HipQueue

Method HipQueue

platforms/hip/hal/src/hip_queue.cpp:13–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using namespace xsched::protocol;
12
13HipQueue::HipQueue(hipStream_t stream): kStream(stream)
14{
15 // Get hip context
16 // FIXME: we should get the context from the stream
17 hipCtx_t current_context = nullptr;
18 HIP_ASSERT(Driver::CtxGetCurrent(&current_context));
19 context_ = current_context;
20
21 // Get device
22 hipDevice_t device = 0;
23 HIP_ASSERT(Driver::CtxGetDevice(&device));
24
25 // Get device PCI address
26 hipDeviceProp_t prop;
27 HIP_ASSERT(Driver::GetDeviceProperties(&prop, device));
28 device_ = MakeDevice(
29 kDeviceTypeGPU, MakePciId(prop.pciDomainID, prop.pciBusID, prop.pciDeviceID, 0));
30
31 // Get stream flags
32 HIP_ASSERT(Driver::StreamGetFlags(kStream, &stream_flags_));
33
34 // Make sure no commands are running on stream_
35 HIP_ASSERT(Driver::StreamSynchronize(kStream));
36
37}
38
39void HipQueue::Synchronize()
40{

Callers

nothing calls this directly

Calls 2

MakeDeviceFunction · 0.85
MakePciIdFunction · 0.85

Tested by

no test coverage detected