From a4240a204ebb0ae93db2e7b23a5f2bc490221ea1 Mon Sep 17 00:00:00 2001 From: Matthew Michel Date: Fri, 10 Jan 2025 11:29:31 -0600 Subject: [PATCH] Update comment and add missing preprocessor guard Signed-off-by: Matthew Michel --- include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h | 2 ++ .../oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h index c8a1d55cce..db104d4106 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h @@ -1547,6 +1547,7 @@ __parallel_set_op(oneapi::dpl::__internal::__device_backend_tag __backend_tag, _ _Range1&& __rng1, _Range2&& __rng2, _Range3&& __result, _Compare __comp, _IsOpDifference __is_op_difference) { +#if _ONEDPL_COMPILER_KERNEL if (oneapi::dpl::__par_backend_hetero::__is_gpu_with_sg_32(__exec)) { auto __opt_return = __handle_sync_sycl_exception( @@ -1559,6 +1560,7 @@ __parallel_set_op(oneapi::dpl::__internal::__device_backend_tag __backend_tag, _ if (__opt_return) return __opt_return.value(); } +#endif return __parallel_set_scan(__backend_tag, std::forward<_ExecutionPolicy>(__exec), std::forward<_Range1>(__rng1), std::forward<_Range2>(__rng2), std::forward<_Range3>(__result), __comp, __is_op_difference); diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h index d9ffd09637..1dc37a2370 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_utils.h @@ -873,7 +873,7 @@ __handle_sync_sycl_exception(_Callable __caller, _Handler __handler) -> std::opt } catch (const sycl::exception& __e) { - // Handle the error and return an empty optional with the encountered error code. + // Handle the error and return an empty std::optional __handler(__e); return {}; }