Skip to content

Commit

Permalink
Merge branch 'uxlfoundation:main' into dev/asolovev_knn_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Dec 3, 2024
2 parents 8d103c1 + 4c848ef commit 7cc577d
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 51 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ env:
jobs:
build_lnx:
name: oneDAL Linux nightly build
if: github.repository == 'oneapi-src/oneDAL'
if: github.repository == 'uxlfoundation/oneDAL'
runs-on: ubuntu-24.04
timeout-minutes: 120

steps:
- name: Checkout oneDAL
uses: actions/checkout@v4
with:
repository: oneapi-src/oneDAL
- name: Install DPC++
run: .ci/env/apt.sh dpcpp
- name: Install MKL
Expand Down Expand Up @@ -84,15 +82,13 @@ jobs:

build_win:
name: oneDAL Windows nightly build
if: github.repository == 'oneapi-src/oneDAL'
if: github.repository == 'uxlfoundation/oneDAL'
runs-on: windows-2022
timeout-minutes: 120

steps:
- name: Checkout oneDAL
uses: actions/checkout@v4
with:
repository: oneapi-src/oneDAL
- name: Install DPC++
shell: cmd
run: |
Expand Down
10 changes: 9 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ is available as an alternative to the manual setup.
4. Set up MKL:

_Note: if you used the general oneAPI setvars script from a Base Toolkit installation, this step will not be necessary as oneMKL will already have been set up._

Download and install [Intel(R) oneMKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html).
Set the environment variables for for Intel(R) oneMKL. For example:

Expand Down Expand Up @@ -149,7 +149,15 @@ It is possible to build oneDAL libraries with selected set of algorithms and/or

make -f makefile daal PLAT=win32e CORE.ALGORITHMS.CUSTOM=low_order_moments REQCPU=avx2 -j16

On **Linux\*** it is possible to build debug version of oneDAL or the version that allows to do kernel profiling using <ittnotify.h>.

- To build debug version of oneDAL, run:

make -f makefile daal oneapi_c PLAT=lnx32e REQDBG=yes

- To build oneDAL with kernel profiling information, run:

make -f makefile daal oneapi_c PLAT=lnx32e REQPROFILE=yes

---
**NOTE:** Built libraries are located in the `__release_{os_name}[_{compiler_name}]/daal` directory.
Expand Down
15 changes: 14 additions & 1 deletion cpp/daal/include/algorithms/algorithm_container_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class AlgorithmContainerIface
class AlgorithmContainerIfaceImpl : public AlgorithmContainerIface
{
public:
AlgorithmContainerIfaceImpl() = default;
AlgorithmContainerIfaceImpl(const AlgorithmContainerIfaceImpl &) = delete;
AlgorithmContainerIfaceImpl & operator=(const AlgorithmContainerIfaceImpl & other) = delete;

/**
* Default constructor
* \param[in] daalEnv Pointer to the structure that contains information about the environment
Expand Down Expand Up @@ -97,6 +101,10 @@ template <ComputeMode mode>
class AlgorithmContainer : public AlgorithmContainerIfaceImpl
{
public:
AlgorithmContainer() = default;
AlgorithmContainer(const AlgorithmContainer &) = delete;
AlgorithmContainer<mode> & operator=(const AlgorithmContainer<mode> & other) = delete;

/**
* Default constructor
* \param[in] daalEnv Pointer to the structure that contains information about the environment
Expand Down Expand Up @@ -152,11 +160,16 @@ template <ComputeMode mode>
class AlgorithmContainerImpl : public AlgorithmContainer<mode>
{
public:
AlgorithmContainerImpl(const AlgorithmContainerImpl &) = delete;
AlgorithmContainer<mode> & operator=(const AlgorithmContainer<mode> & other) = delete;

/**
* Default constructor
* \param[in] daalEnv Pointer to the structure that contains information about the environment
*/
AlgorithmContainerImpl(daal::services::Environment::env * daalEnv = 0) : AlgorithmContainer<mode>(daalEnv), _in(0), _pres(0), _res(0), _par(0) {}
AlgorithmContainerImpl(daal::services::Environment::env * daalEnv = 0)
: AlgorithmContainer<mode>(daalEnv), _in(0), _pres(0), _res(0), _par(0), _hpar(0)
{}

virtual ~AlgorithmContainerImpl() {}

Expand Down
7 changes: 7 additions & 0 deletions cpp/daal/include/algorithms/algorithm_container_base_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ template <>
class AlgorithmContainer<batch> : public AlgorithmContainerIfaceImpl
{
public:
AlgorithmContainer() = default;
AlgorithmContainer(const AlgorithmContainer &) = delete;
AlgorithmContainer<batch> & operator=(const AlgorithmContainer<batch> & other) = delete;

/**
* Default constructor
* \param[in] daalEnv Pointer to the structure that contains information about the environment
Expand Down Expand Up @@ -91,6 +95,9 @@ class AlgorithmContainerImpl<batch> : public AlgorithmContainer<batch>
public:
DAAL_NEW_DELETE();

AlgorithmContainerImpl(const AlgorithmContainerImpl &) = delete;
AlgorithmContainerImpl<batch> & operator=(const AlgorithmContainerImpl<batch> & other) = delete;

/**
* Default constructor
* \param[in] daalEnv Pointer to the structure that contains information about the environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class DAAL_EXPORT InputAlgorithmsCollection

virtual ~InputAlgorithmsCollection();

InputAlgorithmsCollection(InputAlgorithmsCollection & other) = delete;

InputAlgorithmsCollection & operator=(InputAlgorithmsCollection & other) = delete;

/**
* Returns a reference to SharedPtr for a stored object with a given key if an object with such key is registered
* \param[in] k Key value
Expand Down
26 changes: 26 additions & 0 deletions cpp/daal/src/externals/service_profiler.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,31 @@ namespace daal
{
namespace internal
{
#ifdef ONEDAL_KERNEL_PROFILER

ProfilerTask::ProfilerTask(const char * taskName) : _taskName(taskName)
{
_handle = __itt_string_handle_create(taskName);

__itt_task_begin(Profiler::getDomain(), __itt_null, __itt_null, _handle);
}

ProfilerTask::~ProfilerTask()
{
Profiler::endTask(_taskName);
}

ProfilerTask Profiler::startTask(const char * taskName)
{
return ProfilerTask(taskName);
}

void Profiler::endTask(const char * taskName)
{
__itt_task_end(Profiler::getDomain());
}

#else
ProfilerTask Profiler::startTask(const char * taskName)
{
return ProfilerTask(taskName);
Expand All @@ -34,6 +59,7 @@ ProfilerTask::~ProfilerTask()
{
Profiler::endTask(_taskName);
}
#endif

} // namespace internal
} // namespace daal
69 changes: 67 additions & 2 deletions cpp/daal/src/externals/service_profiler.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,99 @@
#ifndef __SERVICE_PROFILER_H__
#define __SERVICE_PROFILER_H__

#ifdef ONEDAL_KERNEL_PROFILER
/* Here if oneDAL kernel profiling is enabled in the build */
#include <ittnotify.h>
#endif

#define DAAL_ITTNOTIFY_CONCAT2(x, y) x##y
#define DAAL_ITTNOTIFY_CONCAT(x, y) DAAL_ITTNOTIFY_CONCAT2(x, y)

#define DAAL_ITTNOTIFY_UNIQUE_ID __LINE__

#define DAAL_ITTNOTIFY_SCOPED_TASK(name) \
daal::internal::ProfilerTask DAAL_ITTNOTIFY_CONCAT(__profiler_taks__, DAAL_ITTNOTIFY_UNIQUE_ID) = daal::internal::Profiler::startTask(#name);
daal::internal::ProfilerTask DAAL_ITTNOTIFY_CONCAT(__profiler_task__, DAAL_ITTNOTIFY_UNIQUE_ID) = daal::internal::Profiler::startTask(#name);

namespace daal
{
namespace internal
{
/**
* Defines a logical unit of work to be tracked by performance profilier.
*/
class ProfilerTask
{
public:
/**
* Constructs a task with a given name.
* \param[in] taskName Name of the task.
*/
ProfilerTask(const char * taskName);
~ProfilerTask();

private:
const char * _taskName;
#ifdef ONEDAL_KERNEL_PROFILER
/* Here if oneDAL kernel profiling is enabled */
__itt_string_handle * _handle; /* The task string handle */
__itt_domain * _domain; /* Pointer to the domain of the task */
#endif
};

// This class is a stub in the library. Its redefinition will be in Bechmarks
/**
* Global performance profiler.
*
* By default this class is a stub in the library and its redefinition will be in C++ Bechmarks.
* If oneDAL kernel profiling is enabled, the profiler uses Task API from <ittnotify.h>
*/
class Profiler
{
public:
/**
* Start the task to be profiled.
* \param[in] taskName Name of the task.
*/
static ProfilerTask startTask(const char * taskName);

/**
* Start the task to profile.
* \param[in] taskName Name of the task.
*/
static void endTask(const char * taskName);

#ifdef ONEDAL_KERNEL_PROFILER
/* Here if oneDAL kernel profiling is enabled */

/**
* Get pointer to a global profiler state.
* \return Pointer to a global profiler state.
*/
static Profiler * getInstance()
{
static Profiler instance;
return &instance;
}

/**
* Get pointer to the ITT domain associated with the profiler.
* \return Pointer to the ITT domain.
*/
static __itt_domain * getDomain()
{
return (getInstance())->_domain;
}

private:
/**
* Construct the profiler.
*/
Profiler()
{
_domain = __itt_domain_create("oneDAL");
}
~Profiler() {}
__itt_domain * _domain; /* Pointer to the ITT domain */
#endif
};

} // namespace internal
Expand Down
2 changes: 2 additions & 0 deletions cpp/oneapi/dal/detail/global_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class global_context : public global_context_iface {
public:
static const global_context_iface& get_global_context();

virtual ~global_context() = default;

global_context(const global_context& ctx) = delete;
global_context& operator=(const global_context& ctx) = delete;

Expand Down
4 changes: 4 additions & 0 deletions cpp/oneapi/dal/detail/profiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class profiler_task {
#endif
~profiler_task();

profiler_task(profiler_task& other) = delete;

profiler_task& operator=(profiler_task& other) = delete;

private:
const char* task_name_;
#ifdef ONEDAL_DATA_PARALLEL
Expand Down
2 changes: 2 additions & 0 deletions cpp/oneapi/dal/detail/threading.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ class scoped_lock {
}
scoped_lock(const scoped_lock &) = delete;
scoped_lock(scoped_lock &&) = delete;
scoped_lock &operator=(scoped_lock &other) = delete;
scoped_lock &operator=(scoped_lock &&other) = delete;
~scoped_lock() {
mutex_.unlock();
}
Expand Down
2 changes: 1 addition & 1 deletion deploy/pkg-config/pkg-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ includedir=${{prefix}}/include
#info
Name: oneDAL
Description: Intel(R) oneAPI Data Analytics Library
Version: 2025.1
Version: 2025.2
URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onedal.html
#Link line
Libs: {libs}
Expand Down
2 changes: 1 addition & 1 deletion dev/bazel/config/config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _declare_onedal_config_impl(repo_ctx):
substitutions = {
"%{auto_cpu}": auto_cpu,
"%{version_major}": "2025",
"%{version_minor}": "1",
"%{version_minor}": "2",
"%{version_update}": "0",
"%{version_build}": utils.datestamp(repo_ctx),
"%{version_buildrev}": "work",
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen/doxygen_conf_cpp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "C++ API Reference for Intel(R) oneAPI Data Analytics L
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "2025.1"
PROJECT_NUMBER = "2025.2"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen/doxygen_conf_cpp_examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "C++ API Reference for Intel(R) oneAPI Data Analytics L
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "2025.1"
PROJECT_NUMBER = "2025.2"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen/doxygen_conf_cpp_web.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "C++ API Reference for Intel(R) oneAPI Data Analytics L
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "2025.1"
PROJECT_NUMBER = "2025.2"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit 7cc577d

Please sign in to comment.