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

Method ZeQueue

platforms/levelzero/hal/src/ze_queue.cpp:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace xsched::levelzero;
9
10ZeQueue::ZeQueue(ze_device_handle_t dev, ze_command_queue_handle_t cmdq): kDev(dev), kCmdq(cmdq)
11{
12 ze_device_properties_t dev_props;
13 ze_pci_ext_properties_t pci_ext_props;
14 dev_props.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
15 dev_props.pNext = nullptr;
16 pci_ext_props.stype = ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES;
17 pci_ext_props.pNext = nullptr;
18 ZE_ASSERT(Driver::DeviceGetProperties(kDev, &dev_props));
19 ZE_ASSERT(Driver::DevicePciGetPropertiesExt(kDev, &pci_ext_props));
20
21 XDeviceId id = MakePciId(pci_ext_props.address.domain, pci_ext_props.address.bus,
22 pci_ext_props.address.device, pci_ext_props.address.function);
23 device_ = MakeDevice(GetXDeviceType(dev_props.type), id);
24 ZE_ASSERT(Driver::CommandQueueSynchronize(kCmdq, UINT64_MAX));
25}
26
27void ZeQueue::Launch(std::shared_ptr<preempt::HwCommand> hw_cmd)
28{

Callers

nothing calls this directly

Calls 3

MakePciIdFunction · 0.85
MakeDeviceFunction · 0.85
GetXDeviceTypeFunction · 0.50

Tested by

no test coverage detected