Skip to content

Commit

Permalink
Initial input for backend selection (uxlfoundation#2396)
Browse files Browse the repository at this point in the history
* Initial input for backend selection

* Update dev/make/cmplr.gnu.mkl.mk

Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>

* Update dev/make/cmplr.gnu.ref.mk

Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>

* Changed default backend to 'mkl'

* Buildable onedal_c

* Added clang support

* Update dev/make/cmplr.gnu.mkl.mk

Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>

* Update dev/make/cmplr.gnu.ref.mk

Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>

* Compiler fixes for icc, icx, vc plus clang-format

* Update dev/make/cmplr.clang.ref.mk

Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>

* adding support for selecting different math/rng/service backends in case of build with bazel

* fixed build issue with kmeans serialization

* Introducing backend_config param selection to build.sh

* Create openblas.sh

* Introduce CI build for BLAS backend

* adding execute permission on openblas.sh

* Update cpp/daal/src/externals/config_ref.h

Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com>

* Update cpp/daal/src/externals/config_ref.h

Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com>

* Addressed part of the comments

* Clang-format

* Turned off hyperthreadig for ref config in order to use TBB default number of threads

* Addressed more comments

* Macro fixed (APPLE)

* More changes in REF RNG

* Update build.sh

* Removed 'sed' from Makefile

* Update openblas.sh

* Removed config_template from BAZEL

* Removed backend_config_header from BAZEL

* Update openblas.sh

* Replaced safe function not supported by GNU

* Fixed bugs in ref backend for OpenBLAS build

* Fixed bugs in ref backend for OpenBLAS build uxlfoundation#2

* Reduced header file dependencies in REF backend; removed << operator for RNG (compiling issue)

* Update ci.yml

* Fixed export on symbols for OpenBLAS build

* export.def handling in bazel

* Update cpp/daal/src/externals/service_math_ref.h

Co-authored-by: Pavel Yakovlev <p_yak_11@mail.ru>

* Added libfgortran to REF build

* removed config_template auxiliary func

* Removed libgfortran for REF backend

* Fixed BACKEND incdirs for oneAPI; addressed some comments

* Removed unnecessary includes; fixed ifdef in _DECLAR_ files

* fixed omitted ifdef in _DECLAR_ files

* Clang-format

* Clang-format fix

* Added an option to move compression to exclude list for examples

* Excluded compression examples for all configurations

* revert some macros to __intel_compiler

* replase some more macros

* add NO_FORTRAN=1 to openblas.sh script

* Update cpp/daal/src/externals/service_service_ref.h

* Fixed missed fpk symbols for oneapi examples (REF backend)

* Update cpp/daal/src/externals/service_service_ref.h

Co-authored-by: Pavel Yakovlev <p_yak_11@mail.ru>

* Update cpp/daal/src/externals/service_service_ref.h

Co-authored-by: Pavel Yakovlev <p_yak_11@mail.ru>

* Fixed error message in oneapi

* exclude failed examples with ref backend

* exclude examples for oneapi/cpp ifaces

* exclude mpi examples for ref backend

* Apply suggestions from code review

* AVX512_MIC cleanup

* Fixed CI pipeline

* Added more includes for ONEAPI

* Update .ci/pipeline/ci.yml

* Switch to core count for blas build

* Update .ci/env/openblas.sh

* Adding _MKL suffix for job name

* Fixing daal4py job dependency

* Attempt to fix warnings

---------

Co-authored-by: Aleksey Grigorev <a.grigorev@yadro.com>
Co-authored-by: KulikovNikita <nikita.kulikov@intel.com>
Co-authored-by: a.maklaev <a.maklae@yadro.com>
Co-authored-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Co-authored-by: Victoriya Fedotova <viktoria.nn@gmail.com>
Co-authored-by: Pavel Yakovlev <p_yak_11@mail.ru>
Co-authored-by: Pavel Yakovlev <p.yakovlev@yadro.com>
  • Loading branch information
8 people committed Aug 29, 2023
1 parent a4b31cd commit da0b898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
3 changes: 1 addition & 2 deletions cpp/oneapi/dal/algo/decision_forest/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,7 @@ class descriptor : public detail::descriptor_base<Task> {
}

auto& set_seed(std::int64_t value) {
base_t::set_seed_impl(value);
return *this;
return base_t::set_seed(value);
}
};

Expand Down
18 changes: 2 additions & 16 deletions cpp/oneapi/dal/backend/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ inline sycl::event memcpy(sycl::queue& queue,
std::size_t size,
const event_vector& deps = {}) {
ONEDAL_ASSERT(size > 0);
ONEDAL_ASSERT(is_known_usm(queue, dest));
ONEDAL_ASSERT(is_known_usm(queue, src));
return queue.submit([&](sycl::handler& cgh) {
cgh.depends_on(deps);
cgh.memcpy(dest, src, size);
Expand All @@ -220,13 +218,7 @@ inline sycl::event memcpy_host2usm(sycl::queue& queue,
std::size_t size,
const event_vector& deps = {}) {
ONEDAL_ASSERT(is_known_usm(queue, dest_usm));

// TODO: Remove additional copy to host usm memory once
// bug in `copy` with the host memory is fixed
auto tmp_usm_host = make_unique_usm_host(queue, size);
memcpy(tmp_usm_host.get(), src_host, size);
memcpy(queue, dest_usm, tmp_usm_host.get(), size, deps).wait_and_throw();
return {};
return memcpy(queue, dest_usm, src_host, size, deps);
}

inline sycl::event memcpy_usm2host(sycl::queue& queue,
Expand All @@ -235,13 +227,7 @@ inline sycl::event memcpy_usm2host(sycl::queue& queue,
std::size_t size,
const event_vector& deps = {}) {
ONEDAL_ASSERT(is_known_usm(queue, src_usm));

// TODO: Remove additional copy to host usm memory once
// bug in `copy` with the host memory is fixed
auto tmp_usm_host = make_unique_usm_host(queue, size);
memcpy(queue, tmp_usm_host.get(), src_usm, size, deps).wait_and_throw();
memcpy(dest_host, tmp_usm_host.get(), size);
return {};
return memcpy(queue, dest_host, src_usm, size, deps);
}

/// Copies `count` number of elements from the USM-allocated array pointed to by `src`
Expand Down

0 comments on commit da0b898

Please sign in to comment.