feature: initial support for zeCommandListHostSynchronize

Related-To: LOCI-4191

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2023-05-12 08:18:01 +00:00
committed by Compute-Runtime-Automation
parent fb306c8ffe
commit 6de77dbfdc
10 changed files with 151 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -36,6 +36,12 @@ ze_result_t zeDeviceSystemBarrier(
return L0::Device::fromHandle(hDevice)->systemBarrier();
}
ze_result_t ZE_APICALL zeCommandListHostSynchronize(
ze_command_list_handle_t hCommandList,
uint64_t timeout) {
return L0::CommandList::fromHandle(hCommandList)->hostSynchronize(timeout);
}
} // namespace L0
extern "C" {
@@ -74,4 +80,12 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceSystemBarrier(
return L0::zeDeviceSystemBarrier(
hDevice);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListHostSynchronize(
ze_command_list_handle_t hCommandList,
uint64_t timeout) {
return L0::zeCommandListHostSynchronize(
hCommandList,
timeout);
}
}

View File

@@ -339,6 +339,7 @@ zeGetCommandListProcAddrTable(
pDdiTable->pfnAppendWriteGlobalTimestamp = L0::zeCommandListAppendWriteGlobalTimestamp;
pDdiTable->pfnAppendMemoryCopyFromContext = L0::zeCommandListAppendMemoryCopyFromContext;
pDdiTable->pfnAppendQueryKernelTimestamps = L0::zeCommandListAppendQueryKernelTimestamps;
pDdiTable->pfnHostSynchronize = L0::zeCommandListHostSynchronize;
driverDdiTable.coreDdiTable.CommandList = *pDdiTable;
if (driverDdiTable.enableTracing) {
pDdiTable->pfnAppendBarrier = zeCommandListAppendBarrierTracing;