Skip to content

Commit 5e2e218

Browse files
Alcpzmartygrant
authored andcommitted
[SYCL][NATIVECPU] Fixed missing changes from latest UR version (#10658)
This PR fixes some errors while building the Native CPU plugin: Updated urPlatformGet signature Added missing function urAdapterGetLastError
1 parent 7f2f12e commit 5e2e218

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

sycl/plugins/unified_runtime/ur/adapters/native_cpu/adapter.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===---------------- runtime.cpp - Native CPU Adapter --------------------===//
1+
//===---------------- adapter.cpp - Native CPU Adapter --------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -44,6 +44,13 @@ UR_APIEXPORT ur_result_t UR_APICALL urAdapterRetain(ur_adapter_handle_t) {
4444
return UR_RESULT_SUCCESS;
4545
}
4646

47+
UR_APIEXPORT ur_result_t UR_APICALL urAdapterGetLastError(
48+
ur_adapter_handle_t, const char **ppMessage, int32_t *pError) {
49+
*ppMessage = ErrorMessage;
50+
*pError = ErrorMessageCode;
51+
return UR_RESULT_SUCCESS;
52+
}
53+
4754
UR_APIEXPORT ur_result_t UR_APICALL urAdapterGetInfo(ur_adapter_handle_t,
4855
ur_adapter_info_t propName,
4956
size_t propSize,

sycl/plugins/unified_runtime/ur/adapters/native_cpu/platform.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <iostream>
1616

1717
UR_APIEXPORT ur_result_t UR_APICALL
18-
urPlatformGet(uint32_t NumEntries, ur_platform_handle_t *phPlatforms,
19-
uint32_t *pNumPlatforms) {
18+
urPlatformGet(ur_adapter_handle_t *, uint32_t, uint32_t NumEntries,
19+
ur_platform_handle_t *phPlatforms, uint32_t *pNumPlatforms) {
2020

2121
UR_ASSERT(pNumPlatforms || phPlatforms, UR_RESULT_ERROR_INVALID_VALUE);
2222

0 commit comments

Comments
 (0)