Skip to content

Commit 21e7c46

Browse files
committed
Add merge fixes for adapters third bump
1 parent 461d7b7 commit 21e7c46

File tree

21 files changed

+95
-36
lines changed

21 files changed

+95
-36
lines changed

include/ur_print.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include <bitset>
1818
#include <ostream>
1919

20-
namespace ur {
21-
namespace print {
2220
namespace details {
2321
template <typename T>
2422
struct is_handle : std::false_type {};
@@ -15865,7 +15863,6 @@ inline ur_result_t printPtr(std::ostream &os, const T *ptr) {
1586515863
return UR_RESULT_SUCCESS;
1586615864
}
1586715865
} // namespace details
15868-
} // namespace print
1586915866

1587015867
namespace extras {
1587115868
///////////////////////////////////////////////////////////////////////////////
@@ -15876,8 +15873,6 @@ namespace extras {
1587615873
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1587715874
/// - `NULL == params`
1587815875
UR_APIEXPORT inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os, ur_function_t function, const void *params) {
15879-
using namespace print;
15880-
1588115876
if (!params) {
1588215877
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
1588315878
}
@@ -16441,6 +16436,5 @@ UR_APIEXPORT inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os,
1644116436
return UR_RESULT_SUCCESS;
1644216437
}
1644316438
} // namespace extras
16444-
} // namespace ur
1644516439

1644616440
#endif /* UR_PRINT_HPP */

scripts/templates/print.hpp.mako

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ def findMemberType(_item):
108108
%endif
109109
</%def>
110110

111-
namespace ${x} {
112-
namespace print {
113111
## API functions declarations #################################################
114112
namespace details {
115113
template <typename T> struct is_handle : std::false_type {};
@@ -436,7 +434,6 @@ template <typename T> inline ${x}_result_t printPtr(std::ostream &os, const T *p
436434
return ${X}_RESULT_SUCCESS;
437435
}
438436
} // namespace details
439-
} // namespace print
440437

441438
namespace extras {
442439
///////////////////////////////////////////////////////////////////////////////
@@ -447,8 +444,6 @@ namespace extras {
447444
/// - ::${X}_RESULT_ERROR_INVALID_NULL_POINTER
448445
/// - `NULL == params`
449446
${X}_APIEXPORT inline ${x}_result_t ${X}_APICALL printFunctionParams(std::ostream &os, ur_function_t function, const void *params) {
450-
using namespace print;
451-
452447
if (!params) {
453448
return ${X}_RESULT_ERROR_INVALID_NULL_POINTER;
454449
}
@@ -466,6 +461,5 @@ ${X}_APIEXPORT inline ${x}_result_t ${X}_APICALL printFunctionParams(std::ostrea
466461
return ${X}_RESULT_SUCCESS;
467462
}
468463
} // namespace extras
469-
} // namespace ${x}
470464

471465
#endif /* ${X}_PRINT_HPP */

source/adapters/adapter.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ EXPORTS
1313
urGetPhysicalMemProcAddrTable
1414
urGetPlatformProcAddrTable
1515
urGetProgramProcAddrTable
16+
urGetProgramExpProcAddrTable
1617
urGetQueueProcAddrTable
1718
urGetSamplerProcAddrTable
1819
urGetUSMProcAddrTable

source/adapters/adapter.map.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
urGetPhysicalMemProcAddrTable;
1414
urGetPlatformProcAddrTable;
1515
urGetProgramProcAddrTable;
16+
urGetProgramExpProcAddrTable;
1617
urGetQueueProcAddrTable;
1718
urGetSamplerProcAddrTable;
1819
urGetUSMProcAddrTable;

source/adapters/cuda/ur_interface_loader.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,20 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable(
412412
return UR_RESULT_SUCCESS;
413413
}
414414

415+
UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
416+
ur_api_version_t version, ur_program_exp_dditable_t *pDdiTable) {
417+
auto result = validateProcInputs(version, pDdiTable);
418+
if (UR_RESULT_SUCCESS != result) {
419+
return result;
420+
}
421+
422+
pDdiTable->pfnBuildExp = nullptr;
423+
pDdiTable->pfnCompileExp = nullptr;
424+
pDdiTable->pfnLinkExp = nullptr;
425+
426+
return UR_RESULT_SUCCESS;
427+
}
428+
415429
#if defined(__cplusplus)
416430
} // extern "C"
417431
#endif

source/adapters/hip/ur_interface_loader.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,20 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable(
366366
return UR_RESULT_SUCCESS;
367367
}
368368

369+
UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
370+
ur_api_version_t version, ur_program_exp_dditable_t *pDdiTable) {
371+
auto result = validateProcInputs(version, pDdiTable);
372+
if (UR_RESULT_SUCCESS != result) {
373+
return result;
374+
}
375+
376+
pDdiTable->pfnBuildExp = nullptr;
377+
pDdiTable->pfnCompileExp = nullptr;
378+
pDdiTable->pfnLinkExp = nullptr;
379+
380+
return UR_RESULT_SUCCESS;
381+
}
382+
369383
#if defined(__cplusplus)
370384
} // extern "C"
371385
#endif

source/adapters/level_zero/ur_interface_loader.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,20 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable(
458458

459459
return UR_RESULT_SUCCESS;
460460
}
461+
462+
UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
463+
ur_api_version_t version, ur_program_exp_dditable_t *pDdiTable) {
464+
auto result = validateProcInputs(version, pDdiTable);
465+
if (UR_RESULT_SUCCESS != result) {
466+
return result;
467+
}
468+
469+
pDdiTable->pfnBuildExp = nullptr;
470+
pDdiTable->pfnCompileExp = nullptr;
471+
pDdiTable->pfnLinkExp = nullptr;
472+
473+
return UR_RESULT_SUCCESS;
474+
}
461475
#if defined(__cplusplus)
462476
} // extern "C"
463477
#endif

source/adapters/native_cpu/ur_interface_loader.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,4 +401,18 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable(
401401

402402
return UR_RESULT_SUCCESS;
403403
}
404+
405+
UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
406+
ur_api_version_t version, ur_program_exp_dditable_t *pDdiTable) {
407+
auto result = validateProcInputs(version, pDdiTable);
408+
if (UR_RESULT_SUCCESS != result) {
409+
return result;
410+
}
411+
412+
pDdiTable->pfnBuildExp = nullptr;
413+
pDdiTable->pfnCompileExp = nullptr;
414+
pDdiTable->pfnLinkExp = nullptr;
415+
416+
return UR_RESULT_SUCCESS;
417+
}
404418
} // extern "C"

source/adapters/opencl/event.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ urEventSetCallback(ur_event_handle_t hEvent, ur_execution_info_t execStatus,
220220

221221
cl_int CallbackType = 0;
222222
switch (execStatus) {
223-
case UR_EXECUTION_INFO_EXECUTION_INFO_SUBMITTED:
223+
case UR_EXECUTION_INFO_SUBMITTED:
224224
CallbackType = CL_SUBMITTED;
225225
break;
226-
case UR_EXECUTION_INFO_EXECUTION_INFO_RUNNING:
226+
case UR_EXECUTION_INFO_RUNNING:
227227
CallbackType = CL_RUNNING;
228228
break;
229-
case UR_EXECUTION_INFO_EXECUTION_INFO_COMPLETE:
229+
case UR_EXECUTION_INFO_COMPLETE:
230230
CallbackType = CL_COMPLETE;
231231
break;
232232
default:

source/adapters/opencl/ur_interface_loader.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,19 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable(
403403
return UR_RESULT_SUCCESS;
404404
}
405405

406+
UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
407+
ur_api_version_t version, ur_program_exp_dditable_t *pDdiTable) {
408+
auto result = validateProcInputs(version, pDdiTable);
409+
if (UR_RESULT_SUCCESS != result) {
410+
return result;
411+
}
412+
413+
pDdiTable->pfnBuildExp = nullptr;
414+
pDdiTable->pfnCompileExp = nullptr;
415+
pDdiTable->pfnLinkExp = nullptr;
416+
417+
return UR_RESULT_SUCCESS;
418+
}
406419
#if defined(__cplusplus)
407420
} // extern "C"
408421
#endif

0 commit comments

Comments
 (0)