mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
feature: Implement support for zeDeviceGetStatus
Added support for zeDeviceGetStatus API. Added ULTs for zeDeviceGetStatus API. Related-To: LOCI-1558 Signed-off-by: Zhang, Winston <winston.zhang@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
befb9fca58
commit
44a8610ebb
@@ -73,6 +73,7 @@ struct Device : _ze_device_handle_t {
|
||||
virtual ze_result_t getProperties(ze_device_properties_t *pDeviceProperties) = 0;
|
||||
virtual ze_result_t getSubDevices(uint32_t *pCount, ze_device_handle_t *phSubdevices) = 0;
|
||||
virtual ze_result_t getCacheProperties(uint32_t *pCount, ze_device_cache_properties_t *pCacheProperties) = 0;
|
||||
virtual ze_result_t getStatus() = 0;
|
||||
virtual ze_result_t reserveCache(size_t cacheLevel, size_t cacheReservationSize) = 0;
|
||||
virtual ze_result_t setCacheAdvice(void *ptr, size_t regionSize, ze_cache_ext_region_t cacheRegion) = 0;
|
||||
virtual ze_result_t imageGetProperties(const ze_image_desc_t *desc, ze_image_properties_t *pImageProperties) = 0;
|
||||
|
||||
@@ -74,6 +74,13 @@ void DeviceImp::setDriverHandle(DriverHandle *driverHandle) {
|
||||
this->driverHandle = driverHandle;
|
||||
}
|
||||
|
||||
ze_result_t DeviceImp::getStatus() {
|
||||
if (this->resourcesReleased) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
ze_result_t DeviceImp::submitCopyForP2P(ze_device_handle_t hPeerDevice, ze_bool_t *value) {
|
||||
DeviceImp *pPeerDevice = static_cast<DeviceImp *>(Device::fromHandle(hPeerDevice));
|
||||
uint32_t peerRootDeviceIndex = pPeerDevice->getNEODevice()->getRootDeviceIndex();
|
||||
|
||||
@@ -31,6 +31,7 @@ class CacheReservation;
|
||||
|
||||
struct DeviceImp : public Device {
|
||||
DeviceImp();
|
||||
ze_result_t getStatus() override;
|
||||
ze_result_t submitCopyForP2P(ze_device_handle_t hPeerDevice, ze_bool_t *value);
|
||||
MOCKABLE_VIRTUAL ze_result_t queryFabricStats(DeviceImp *pPeerDevice, uint32_t &latency, uint32_t &bandwidth);
|
||||
ze_result_t canAccessPeer(ze_device_handle_t hPeerDevice, ze_bool_t *value) override;
|
||||
|
||||
Reference in New Issue
Block a user