Skip to content

Commit dca2aa6

Browse files
author
Jaime Arteaga
authored
[SYCL][UR] Some minor miscellaneous fixes (#9981)
Signed-off-by: Jaime Arteaga <[email protected]>
1 parent 41a20ca commit dca2aa6

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -616,11 +616,6 @@ inline pi_result piextPluginGetOpaqueData(void *opaque_data_param,
616616
return PI_ERROR_UNKNOWN;
617617
}
618618

619-
// Returns plugin specific backend option.
620-
// Current support is only for optimization options.
621-
// Return '-ze-opt-disable' for frontend_option = -O0.
622-
// Return '-ze-opt-level=1' for frontend_option = -O1 or -O2.
623-
// Return '-ze-opt-level=2' for frontend_option = -O3.
624619
inline pi_result piPluginGetBackendOption(pi_platform Platform,
625620
const char *FrontendOption,
626621
const char **PlatformOption) {
@@ -1940,11 +1935,11 @@ inline pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex,
19401935
return PI_SUCCESS;
19411936
}
19421937

1943-
inline pi_result piKernelSetArgPointer(pi_kernel kernel, pi_uint32 arg_index,
1944-
size_t arg_size, const void *arg_value) {
1945-
(void)arg_size;
1946-
auto hKernel = reinterpret_cast<ur_kernel_handle_t>(kernel);
1947-
HANDLE_ERRORS(urKernelSetArgPointer(hKernel, arg_index, arg_value));
1938+
inline pi_result piKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex,
1939+
size_t ArgSize, const void *ArgValue) {
1940+
std::ignore = ArgSize;
1941+
ur_kernel_handle_t UrKernel = reinterpret_cast<ur_kernel_handle_t>(Kernel);
1942+
HANDLE_ERRORS(urKernelSetArgPointer(UrKernel, ArgIndex, ArgValue));
19481943

19491944
return PI_SUCCESS;
19501945
}
@@ -2809,8 +2804,6 @@ inline pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle,
28092804
ur_context_handle_t UrContext =
28102805
reinterpret_cast<ur_context_handle_t>(Context);
28112806
ur_mem_handle_t *UrMem = reinterpret_cast<ur_mem_handle_t *>(Mem);
2812-
// TODO: Pass OwnNativeHandle to the output parameter
2813-
// while we get it in interface
28142807
ur_mem_native_properties_t Properties{};
28152808
Properties.isNativeHandleOwned = OwnNativeHandle;
28162809
HANDLE_ERRORS(urMemBufferCreateWithNativeHandle(UrNativeMem, UrContext,

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_platform.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,11 @@ ur_result_t ur_platform_handle_t_::populateDeviceCacheIfNeeded() {
545545
return UR_RESULT_SUCCESS;
546546
}
547547

548+
// Returns plugin specific backend option.
549+
// Current support is only for optimization options.
550+
// Return '-ze-opt-disable' for frontend_option = -O0.
551+
// Return '-ze-opt-level=1' for frontend_option = -O1 or -O2.
552+
// Return '-ze-opt-level=2' for frontend_option = -O3.
548553
UR_APIEXPORT ur_result_t UR_APICALL urPlatformGetBackendOption(
549554
ur_platform_handle_t Platform, ///< [in] handle of the platform instance.
550555
const char *FrontendOption, ///< [in] string containing the frontend option.

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_queue.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -618,12 +618,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueCreateWithNativeHandle(
618618
}
619619

620620
UR_APIEXPORT ur_result_t UR_APICALL urQueueFinish(
621-
ur_queue_handle_t hQueue ///< [in] handle of the queue to be finished.
621+
ur_queue_handle_t UrQueue ///< [in] handle of the queue to be finished.
622622
) {
623-
// _pi_queue *PiQueue = reinterpret_cast<_pi_queue *>(Queue);
624-
// ur_queue_handle_t UrQueue = PiQueue->UrQueue;
625-
ur_queue_handle_t_ *UrQueue = reinterpret_cast<ur_queue_handle_t_ *>(hQueue);
626-
627623
if (UrQueue->Device->ImmCommandListUsed) {
628624
// Lock automatically releases when this goes out of scope.
629625
std::scoped_lock<ur_shared_mutex> Lock(UrQueue->Mutex);

0 commit comments

Comments
 (0)