From 9081abc352cdef9e14eb37ca4f00f3fc6b5f1711 Mon Sep 17 00:00:00 2001 From: Anatoly Volkov Date: Wed, 18 Sep 2024 10:56:28 -0700 Subject: [PATCH 1/2] Add deps to at_device function --- .../dal/backend/primitives/objective_function/logloss_dpc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp b/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp index e3dce105dbc..e0907a6516f 100644 --- a/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp +++ b/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp @@ -44,7 +44,7 @@ sycl::event compute_probabilities(sycl::queue& q, auto fill_event = fill(q, probabilities, Float(1), deps); using oneapi::dal::backend::operator+; - Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l) : 0; // Poor perfomance + Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance ndview param_suf = fit_intercept ? parameters.get_slice(1, p + 1) : parameters; sycl::event gemv_event; @@ -87,7 +87,7 @@ sycl::event compute_probabilities_sparse(sycl::queue& q, const std::int64_t p = parameters.get_dimension(0) - (fit_intercept ? 1 : 0); auto fill_event = fill(q, probabilities, Float(1), deps); - Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l) : 0; // Poor perfomance + Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance ndview param_suf = fit_intercept ? parameters.get_slice(1, p + 1) : parameters; sycl::event gemv_event; From 469062a1bb24d6f3d527fdaf5335a3b0996eb14c Mon Sep 17 00:00:00 2001 From: Anatoly Volkov Date: Thu, 19 Sep 2024 04:57:29 -0700 Subject: [PATCH 2/2] Clang-format --- .../backend/primitives/objective_function/logloss_dpc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp b/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp index e0907a6516f..6e9d726e998 100644 --- a/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp +++ b/cpp/oneapi/dal/backend/primitives/objective_function/logloss_dpc.cpp @@ -44,7 +44,8 @@ sycl::event compute_probabilities(sycl::queue& q, auto fill_event = fill(q, probabilities, Float(1), deps); using oneapi::dal::backend::operator+; - Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance + Float w0 = + fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance ndview param_suf = fit_intercept ? parameters.get_slice(1, p + 1) : parameters; sycl::event gemv_event; @@ -87,7 +88,8 @@ sycl::event compute_probabilities_sparse(sycl::queue& q, const std::int64_t p = parameters.get_dimension(0) - (fit_intercept ? 1 : 0); auto fill_event = fill(q, probabilities, Float(1), deps); - Float w0 = fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance + Float w0 = + fit_intercept ? parameters.get_slice(0, 1).at_device(q, 0l, deps) : 0; // Poor perfomance ndview param_suf = fit_intercept ? parameters.get_slice(1, p + 1) : parameters; sycl::event gemv_event;