mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
feature: supports core device handle with zesInit
Related-To: NEO-13805 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
83637404bf
commit
f52c81c0e4
@@ -24,6 +24,7 @@ struct OsSysman {
|
||||
static OsSysman *create(SysmanDeviceImp *pSysmanImp);
|
||||
virtual uint32_t getSubDeviceCount() = 0;
|
||||
virtual const NEO::HardwareInfo &getHardwareInfo() const = 0;
|
||||
virtual void getDeviceUuids(std::vector<std::string> &deviceUuids) = 0;
|
||||
};
|
||||
|
||||
} // namespace Sysman
|
||||
|
||||
@@ -34,8 +34,7 @@ SysmanDevice *SysmanDevice::fromHandle(zes_device_handle_t handle) {
|
||||
return nullptr;
|
||||
}
|
||||
if (std::find(globalSysmanDriver->sysmanDevices.begin(), globalSysmanDriver->sysmanDevices.end(), sysmanDevice) == globalSysmanDriver->sysmanDevices.end()) {
|
||||
PRINT_DEBUG_STRING(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "SysmanDevice::fromHandle: Device not found in sysmanDevices list%s\n", "");
|
||||
return nullptr;
|
||||
return globalSysmanDriver->getSysmanDeviceFromCoreDeviceHandle(handle);
|
||||
}
|
||||
return sysmanDevice;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ struct SysmanDevice : _ze_device_handle_t {
|
||||
static ze_result_t deviceEnumEnabledVF(zes_device_handle_t hDevice, uint32_t *pCount, zes_vf_handle_t *phVFhandle);
|
||||
|
||||
virtual OsSysman *deviceGetOsInterface() = 0;
|
||||
virtual void getDeviceUuids(std::vector<std::string> &deviceUuids) = 0;
|
||||
};
|
||||
|
||||
} // namespace Sysman
|
||||
|
||||
@@ -211,6 +211,10 @@ ze_result_t SysmanDeviceImp::fabricPortGetMultiPortThroughput(uint32_t numPorts,
|
||||
return pFabricPortHandleContext->fabricPortGetMultiPortThroughput(numPorts, phPort, pThroughput);
|
||||
}
|
||||
|
||||
void SysmanDeviceImp::getDeviceUuids(std::vector<std::string> &deviceUuids) {
|
||||
return pOsSysman->getDeviceUuids(deviceUuids);
|
||||
}
|
||||
|
||||
OsSysman *SysmanDeviceImp::deviceGetOsInterface() {
|
||||
return pOsSysman;
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ struct SysmanDeviceImp : SysmanDevice, NEO::NonCopyableAndNonMovableClass {
|
||||
bool deviceEventListen(zes_event_type_flags_t &pEvent, uint64_t timeout) override;
|
||||
ze_result_t fabricPortGetMultiPortThroughput(uint32_t numPorts, zes_fabric_port_handle_t *phPort, zes_fabric_port_throughput_t **pThroughput) override;
|
||||
ze_result_t deviceEnumEnabledVF(uint32_t *pCount, zes_vf_handle_t *phVFhandle) override;
|
||||
|
||||
OsSysman *deviceGetOsInterface() override;
|
||||
void getDeviceUuids(std::vector<std::string> &deviceUuids) override;
|
||||
|
||||
private:
|
||||
NEO::ExecutionEnvironment *executionEnvironment = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user