Implement support for zeDeviceGetGlobalTimestamps

Related-To: LOCI-1933

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
This commit is contained in:
Aravind Gopalakrishnan
2021-03-11 13:43:05 -08:00
committed by Compute-Runtime-Automation
parent 3c6d026d7b
commit 7764ac44ae
7 changed files with 132 additions and 1 deletions

View File

@ -219,6 +219,7 @@ zeGetDeviceProcAddrTable(
pDdiTable->pfnCanAccessPeer = zeDeviceCanAccessPeer;
pDdiTable->pfnGetStatus = zeDeviceGetStatus;
pDdiTable->pfnGetExternalMemoryProperties = zeDeviceGetExternalMemoryProperties;
pDdiTable->pfnGetGlobalTimestamps = zeDeviceGetGlobalTimestamps;
driver_ddiTable.core_ddiTable.Device = *pDdiTable;
if (driver_ddiTable.enableTracing) {
pDdiTable->pfnGet = zeDeviceGet_Tracing;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -114,3 +114,11 @@ zeDeviceGetStatus(
ze_device_handle_t hDevice) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetGlobalTimestamps(
ze_device_handle_t hDevice,
uint64_t *hostTimestamp,
uint64_t *deviceTimestamp) {
return L0::Device::fromHandle(hDevice)->getGlobalTimestamps(hostTimestamp, deviceTimestamp);
}