| 8 | using namespace xsched::levelzero; |
| 9 | |
| 10 | ZeQueue::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 | |
| 27 | void ZeQueue::Launch(std::shared_ptr<preempt::HwCommand> hw_cmd) |
| 28 | { |
nothing calls this directly
no test coverage detected