Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: enabling oneDPL and sort primitive refactoring #3046

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
65d9322
init adding dpl
Alexandr-Solovev Jan 16, 2025
f8028b7
fixes for dpl
Alexandr-Solovev Jan 20, 2025
0b553e8
minor fix
Alexandr-Solovev Jan 21, 2025
2a91928
minor fix
Alexandr-Solovev Jan 21, 2025
ab367c0
minor fix for dpl from toolkit
Alexandr-Solovev Jan 22, 2025
e053cdf
minor fix for script
Alexandr-Solovev Jan 22, 2025
3f1a6fe
minor fixes
Alexandr-Solovev Jan 22, 2025
700cd10
minor fix
Alexandr-Solovev Jan 22, 2025
809760f
minor fix
Alexandr-Solovev Jan 22, 2025
d01ea31
minor fix for dpl
Alexandr-Solovev Jan 22, 2025
064bb12
fix correct link
Alexandr-Solovev Jan 22, 2025
6e3587d
minor fixes
Alexandr-Solovev Jan 22, 2025
0d9edd6
Merge branch 'uxlfoundation:main' into dev/asolovev_radix_sort_opt
Alexandr-Solovev Jan 23, 2025
a60eb07
minor fix
Alexandr-Solovev Jan 23, 2025
16c8f6c
minor fix
Alexandr-Solovev Jan 23, 2025
91410dc
Merge branch 'uxlfoundation:main' into dev/asolovev_radix_sort_opt
Alexandr-Solovev Feb 5, 2025
8fd11bb
fixes
Alexandr-Solovev Feb 5, 2025
bf9d31f
fixes for memory
Alexandr-Solovev Feb 7, 2025
4575642
reduce memory usage
Alexandr-Solovev Feb 7, 2025
16b1ca5
optimizations
Alexandr-Solovev Feb 10, 2025
09995cf
fixes for tree_order
Alexandr-Solovev Feb 10, 2025
0ecfd35
initial internal dispatcher
Alexandr-Solovev Feb 10, 2025
94b260b
fixes
Alexandr-Solovev Feb 11, 2025
5bdd54f
minor fixes
Alexandr-Solovev Feb 14, 2025
e7f4066
Merge branch 'main' into dev/asolovev_radix_sort_opt
Alexandr-Solovev Feb 20, 2025
aaa4546
fixes
Alexandr-Solovev Feb 20, 2025
a7cfed8
add fraction checker
Alexandr-Solovev Feb 21, 2025
b450d82
minor fixes
Alexandr-Solovev Feb 21, 2025
24cf250
fixes
Alexandr-Solovev Feb 21, 2025
2f397cf
fixes
Alexandr-Solovev Feb 21, 2025
caf932e
fixes for dpl install
Alexandr-Solovev Feb 25, 2025
cb66c3f
minor fixes
Alexandr-Solovev Feb 27, 2025
6f64de2
fixes for memory usage
Alexandr-Solovev Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ ccl_repo(
]
)

load("@onedal//dev/bazel/deps:dpl.bzl", "dpl_repo")
dpl_repo(
name = "dpl",
root_env_var = "DPL_ROOT",
urls = [
"https://files.pythonhosted.org/packages/95/f6/18f78cb933e01ecd9e99d37a10da4971a795fcfdd1d24640799b4050fdbb/onedpl_devel-2022.7.1-py2.py3-none-manylinux_2_28_x86_64.whl",
],
sha256s = [
"3b270999d2464c5151aa0e7995dda9e896d072c75069ccee1efae9dc56bdc417",
],
strip_prefixes = [
"onedpl_devel-2022.7.1.data/data",
],
)

load("@onedal//dev/bazel/deps:mkl.bzl", "mkl_repo")
mkl_repo(
name = "mkl",
Expand Down
2 changes: 2 additions & 0 deletions cpp/daal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ daal_module(
"@config//:backend_ref": [
":public_includes",
"@openblas//:headers",
"@dpl//:headers",
],
"//conditions:default": [
":public_includes",
"@mkl//:headers",
"@dpl//:headers",
],
}),
)
Expand Down
1 change: 1 addition & 0 deletions cpp/oneapi/dal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dal_module(
],
dpc_deps = [
"@mkl//:mkl_dpc",
"@dpl//:headers",
],
)

Expand Down
341 changes: 77 additions & 264 deletions cpp/oneapi/dal/backend/primitives/sort/sort_dpc.cpp

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion cpp/oneapi/dal/backend/primitives/sort/test/sort_dpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "oneapi/dal/test/engine/math.hpp"
#include "oneapi/dal/backend/primitives/sort/sort.hpp"

#include <oneapi/dpl/experimental/kernel_templates>

namespace oneapi::dal::backend::primitives::test {

namespace te = dal::test::engine;
Expand Down Expand Up @@ -201,7 +203,7 @@ TEMPLATE_LIST_TEST_M(sort_with_indices_test,
sort_indices_types) {
SKIP_IF(this->get_policy().is_cpu());

std::int64_t elem_count = GENERATE_COPY(2, 10000);
std::int64_t elem_count = GENERATE_COPY(100, 1000, 10000, 100000, 10000000);

auto [val, ind] = this->allocate_arrays(elem_count);
this->fill_uniform(val, -25., 25.);
Expand Down
27 changes: 27 additions & 0 deletions dev/bazel/deps/dpl.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#===============================================================================
# Copyright 2025 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

load("@onedal//dev/bazel:repos.bzl", "repos")

dpl_repo = repos.prebuilt_libs_repo_rule(
includes = [
"include",
],
libs = [
"lib",
],
build_template = "@onedal//dev/bazel/deps:dpl.tpl.BUILD",
)
7 changes: 7 additions & 0 deletions dev/bazel/deps/dpl.tpl.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package(default_visibility = ["//visibility:public"])

cc_library(
name = "headers",
hdrs = glob(["include/**/**/*"]),
includes = [ "include" ],
)
9 changes: 7 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ ifeq ($(REQPROFILE), yes)
VTUNESDK.LIBS_A := $(if $(OS_is_lnx), $(VTUNESDK.libia)/libittnotify.a,)
endif


#=============================== oneDPL folders ======================================

ONEDPL.include := $(DPL_ROOT)/include

#===============================================================================
# Release library names
#===============================================================================
Expand Down Expand Up @@ -447,7 +452,7 @@ CORE.srcdirs := $(CORE.SERV.srcdir) $(CORE.srcdir) \
$(CPPDIR.daal)/src/data_management

CORE.incdirs.common := $(RELEASEDIR.include) $(CPPDIR.daal) $(WORKDIR)
CORE.incdirs.thirdp := $(daaldep.math_backend.incdir) $(VTUNESDK.include) $(TBBDIR.include)
CORE.incdirs.thirdp := $(daaldep.math_backend.incdir) $(VTUNESDK.include) $(ONEDPL.include) $(TBBDIR.include)
CORE.incdirs := $(CORE.incdirs.common) $(CORE.incdirs.thirdp)

$(info CORE.incdirs: $(CORE.incdirs))
Expand Down Expand Up @@ -565,7 +570,7 @@ PARAMETERS.tmpdir_a.dpc := $(WORKDIR)/parameters_dpc_static
PARAMETERS.tmpdir_y.dpc := $(WORKDIR)/parameters_dpc_dynamic

ONEAPI.incdirs.common := $(CPPDIR)
ONEAPI.incdirs.thirdp := $(CORE.incdirs.common) $(daaldep.math_backend_oneapi.incdir) $(VTUNESDK.include) $(TBBDIR.include)
ONEAPI.incdirs.thirdp := $(CORE.incdirs.common) $(daaldep.math_backend_oneapi.incdir) $(VTUNESDK.include) $(ONEDPL.include) $(TBBDIR.include)
ONEAPI.incdirs := $(ONEAPI.incdirs.common) $(CORE.incdirs.thirdp) $(ONEAPI.incdirs.thirdp)

ONEAPI.dispatcher_cpu = $(WORKDIR)/oneapi/dal/_dal_cpu_dispatcher_gen.hpp
Expand Down
Loading