Skip to content

Commit ed395be

Browse files
authored
Merge pull request #892 from callumfare/fix_l0_adapter_ddi
[L0] Add missing loader interfaces to L0 adapter
2 parents 886e593 + b29c580 commit ed395be

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

source/adapters/level_zero/ur_interface_loader.cpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,41 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetUSMExpProcAddrTable(
390390
pDdiTable->pfnPitchedAllocExp = urUSMPitchedAllocExp;
391391
return UR_RESULT_SUCCESS;
392392
}
393+
394+
UR_DLLEXPORT ur_result_t UR_APICALL urGetVirtualMemProcAddrTable(
395+
ur_api_version_t version, ///< [in] API version requested
396+
ur_virtual_mem_dditable_t
397+
*pDdiTable ///< [in,out] pointer to table of DDI function pointers
398+
) {
399+
auto retVal = validateProcInputs(version, pDdiTable);
400+
if (UR_RESULT_SUCCESS != retVal) {
401+
return retVal;
402+
}
403+
404+
pDdiTable->pfnFree = nullptr;
405+
pDdiTable->pfnGetInfo = nullptr;
406+
pDdiTable->pfnGranularityGetInfo = nullptr;
407+
pDdiTable->pfnMap = nullptr;
408+
pDdiTable->pfnReserve = nullptr;
409+
pDdiTable->pfnSetAccess = nullptr;
410+
pDdiTable->pfnUnmap = nullptr;
411+
412+
return retVal;
413+
}
414+
415+
UR_DLLEXPORT ur_result_t UR_APICALL urGetPhysicalMemProcAddrTable(
416+
ur_api_version_t version, ///< [in] API version requested
417+
ur_physical_mem_dditable_t
418+
*pDdiTable ///< [in,out] pointer to table of DDI function pointers
419+
) {
420+
auto retVal = validateProcInputs(version, pDdiTable);
421+
if (UR_RESULT_SUCCESS != retVal) {
422+
return retVal;
423+
}
424+
425+
pDdiTable->pfnCreate = nullptr;
426+
pDdiTable->pfnRelease = nullptr;
427+
pDdiTable->pfnRetain = nullptr;
428+
429+
return retVal;
430+
}

0 commit comments

Comments
 (0)