Support for FabricEdge APIs

Related-To: LOCI-3377

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2022-09-20 09:09:12 +00:00
committed by Compute-Runtime-Automation
parent 553e194379
commit a93edd8620
24 changed files with 1046 additions and 28 deletions

View File

@ -247,6 +247,22 @@ zeGetDeviceProcAddrTable(
return result;
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeGetDeviceExpProcAddrTable(
ze_api_version_t version,
ze_device_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
pDdiTable->pfnGetFabricVertexExp = L0::zeDeviceGetFabricVertexExp;
driver_ddiTable.core_ddiTable.DeviceExp = *pDdiTable;
return result;
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeGetCommandQueueProcAddrTable(
ze_api_version_t version,
@ -646,3 +662,22 @@ zeGetFabricVertexExpProcAddrTable(
driver_ddiTable.core_ddiTable.FabricVertexExp = *pDdiTable;
return result;
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeGetFabricEdgeExpProcAddrTable(
ze_api_version_t version,
ze_fabric_edge_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driver_ddiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driver_ddiTable.version) > ZE_MINOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
pDdiTable->pfnGetExp = L0::zeFabricEdgeGetExp;
pDdiTable->pfnGetVerticesExp = L0::zeFabricEdgeGetVerticesExp;
pDdiTable->pfnGetPropertiesExp = L0::zeFabricEdgeGetPropertiesExp;
driver_ddiTable.core_ddiTable.FabricEdgeExp = *pDdiTable;
return result;
}