Skip to content

Commit

Permalink
Merge pull request #37 from uxlfoundation/main
Browse files Browse the repository at this point in the history
Pull the changes from main
  • Loading branch information
Vika-F authored Jan 8, 2025
2 parents bb3c50f + ad57656 commit 8bd25ea
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 86 deletions.
50 changes: 0 additions & 50 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,56 +376,6 @@ jobs:
condition: failed()
continueOnError: true

- job: 'LinuxMakeGNU_OpenBLAS_x86'
timeoutInMinutes: 0
variables:
release.dir: '__release_lnx_gnu'
platform.type : 'lnx32e'
OPENBLAS_CACHE_DIR: $(Pipeline.Workspace)/openblas-x86_64-gnu
pool:
vmImage: '$(VM_IMAGE)'
steps:
- script: |
.ci/env/apt.sh dev-base
displayName: 'apt-get and conda install'
- script: |
.ci/scripts/describe_system.sh
displayName: 'System info'
- task: Cache@2
inputs:
key: '"gcc" | "x86_64" | "openblas" | "$(OPENBLAS_VERSION)" | "$(VM_IMAGE)" | "ILP64"'
path: $(OPENBLAS_CACHE_DIR)
cacheHitVar: OPENBLAS_RESTORED
- script: |
.ci/env/openblas.sh --target-arch x86_64 --prefix $(OPENBLAS_CACHE_DIR) --version $(OPENBLAS_VERSION)
displayName: 'Build OpenBLAS'
condition: ne(variables.OPENBLAS_RESTORED, 'true')
- script: |
.ci/scripts/build.sh --compiler gnu --optimizations avx2 --target daal --backend-config ref --conda-env ci-env --blas-dir $(OPENBLAS_CACHE_DIR)
displayName: 'make daal'
- script: |
.ci/scripts/build.sh --compiler gnu --optimizations avx2 --target onedal_c --backend-config ref --blas-dir $(OPENBLAS_CACHE_DIR)
displayName: 'make onedal_c'
- task: PublishPipelineArtifact@1
inputs:
artifactName: '$(platform.type) OpenBLAS build'
targetPath: '$(Build.Repository.LocalPath)/$(release.dir)'
displayName: 'Upload build artifacts'
continueOnError: true
- script: |
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler gnu --interface daal/cpp --build-system cmake --backend ref
displayName: 'daal/cpp examples'
- script: |
.ci/scripts/test.sh --test-kind examples --build-dir $(release.dir) --compiler gnu --interface oneapi/cpp --build-system cmake --backend ref
displayName: 'oneapi/cpp examples'
- task: PublishPipelineArtifact@1
inputs:
artifactName: '$(platform.type) fail'
targetPath: '$(Build.Repository.LocalPath)/$(release.dir)'
displayName: 'Uploading on fail'
condition: failed()
continueOnError: true

- job: 'LinuxMakeDPCPP'
timeoutInMinutes: 0
variables:
Expand Down
12 changes: 6 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ Then, install the necessary dependencies from the appropriate channels with `con

```shell
conda install -y \
-c https://software.repos.intel.com/python/conda/ \ `# Intel's repository`
-c conda-forge \ `# conda-forge, for tools like 'make'`
make python>=3.9 \ `# used by the build system`
dpcpp-cpp-rt dpcpp_linux-64 intel-sycl-rt \ `# Intel compiler packages`
tbb tbb-devel \ `# required TBB packages`
mkl mkl-devel mkl-static mkl-dpcpp mkl-devel-dpcpp \ `# required MKL packages`
-c https://software.repos.intel.com/python/conda/ `# Intel's repository` \
-c conda-forge `# for tools like 'make'` \
make python>=3.9 `# used by the build system` \
dpcpp-cpp-rt dpcpp_linux-64 intel-sycl-rt `# Intel compiler packages` \
tbb tbb-devel `# required TBB packages` \
mkl mkl-devel mkl-static mkl-dpcpp mkl-devel-dpcpp `# required MKL packages` \
cmake `# required to build the examples only`
```

Expand Down
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ onedal_repo(

http_archive(
name = "catch2",
url = "https://github.com/catchorg/Catch2/archive/v3.7.1.tar.gz",
sha256 = "c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c",
strip_prefix = "Catch2-3.7.1",
url = "https://github.com/catchorg/Catch2/archive/v3.8.0.tar.gz",
sha256 = "1ab2de20460d4641553addfdfe6acd4109d871d5531f8f519a52ea4926303087",
strip_prefix = "Catch2-3.8.0",
)

http_archive(
name = "fmt",
url = "https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz",
sha256 = "6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f",
strip_prefix = "fmt-11.0.2",
url = "https://github.com/fmtlib/fmt/archive/11.1.1.tar.gz",
sha256 = "482eed9efbc98388dbaee5cb5f368be5eca4893456bb358c18b7ff71f835ae43",
strip_prefix = "fmt-11.1.1",
build_file = "@onedal//dev/bazel/deps:fmt.tpl.BUILD",
)
14 changes: 14 additions & 0 deletions cpp/daal/include/algorithms/covariance/covariance_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@ class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis<batch>
_hpar = other.daal::algorithms::Analysis<batch>::_hpar;
}

/**
* Copy-assignment operator for an algorithm for correlation or variance-covariance matrix computation
* \param[in] other An algorithm to be used as the source to initialize the input objects
* and parameters of the algorithm
*/
BatchImpl & operator=(const BatchImpl & other)
{
input = other.input;
parameter = other.parameter;
initialize();
_hpar = other.daal::algorithms::Analysis<batch>::_hpar;
return *this;
}

/**
* Returns the structure that contains correlation or variance-covariance matrix
* \return Structure that contains the computed matrix
Expand Down
7 changes: 7 additions & 0 deletions cpp/daal/include/algorithms/covariance/covariance_online.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ class DAAL_EXPORT OnlineImpl : public daal::algorithms::Analysis<online>
* and parameters of the algorithm
*/
OnlineImpl(const OnlineImpl & other) : input(other.input), parameter(other.parameter) { initialize(); }
OnlineImpl & operator=(const OnlineImpl & other)
{
input = other.input;
parameter = other.parameter;
initialize();
return *this;
}

virtual ~OnlineImpl() {}

Expand Down
26 changes: 18 additions & 8 deletions cpp/daal/include/algorithms/covariance/covariance_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ namespace interface1
class DAAL_EXPORT InputIface : public daal::algorithms::Input
{
public:
InputIface(size_t nElements) : daal::algorithms::Input(nElements) {}
InputIface(const InputIface & other) : daal::algorithms::Input(other) {}
InputIface(size_t nElements);
InputIface(const InputIface & other);
InputIface & operator=(const InputIface & other);
virtual size_t getNumberOfFeatures() const = 0;
virtual ~InputIface() {}
virtual ~InputIface();
};

/**
Expand All @@ -139,9 +140,10 @@ class DAAL_EXPORT Input : public InputIface
{
public:
Input();
Input(const Input & other) : InputIface(other) {}
Input(const Input & other);
Input & operator=(const Input & other);

virtual ~Input() {}
virtual ~Input();

/**
* Returns number of columns in the input data set
Expand Down Expand Up @@ -279,6 +281,12 @@ struct DAAL_EXPORT OnlineParameter : public Parameter
*/
OnlineParameter(const OnlineParameter & other);

/**
* Copy-assignment operator for parameters of the Covariance Online algorithm
* \param[in] other Parameters of the Covariance Online algorithm
*/
OnlineParameter & operator=(const OnlineParameter & other);

/**
* Check the correctness of the %OnlineParameter object
*/
Expand Down Expand Up @@ -380,7 +388,8 @@ class DAAL_EXPORT DistributedInput<step1Local> : public Input
{
public:
DistributedInput() : Input() {}
DistributedInput(const DistributedInput & other) : Input(other) {}
DistributedInput(const DistributedInput & other) = default;
DistributedInput & operator=(const DistributedInput & other) = default;

virtual ~DistributedInput() {}
};
Expand All @@ -395,9 +404,10 @@ class DAAL_EXPORT DistributedInput<step2Master> : public InputIface
{
public:
DistributedInput();
DistributedInput(const DistributedInput & other) : InputIface(other) {}
DistributedInput(const DistributedInput & other);
DistributedInput & operator=(const DistributedInput & other);

virtual ~DistributedInput() {}
virtual ~DistributedInput();

/**
* Returns number of columns in the input data set
Expand Down
4 changes: 4 additions & 0 deletions cpp/daal/include/algorithms/distance/correlation_distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface<batch>
BatchContainer(daal::services::Environment::env * daalEnv);
/** Default destructor */
~BatchContainer();
/** Delete copy-constructor and copy-assignment constructor to follow the rule of three */
BatchContainer(const BatchContainer &) = delete;
BatchContainer & operator=(const BatchContainer &) = delete;

/**
* Computes the result of the correlation distance algorithm in the batch processing mode
*/
Expand Down
4 changes: 4 additions & 0 deletions cpp/daal/include/algorithms/distance/cosine_distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface<batch>
BatchContainer(daal::services::Environment::env * daalEnv);
/** Default constructor */
~BatchContainer();
/** Delete copy-constructor and copy-assignment constructor to follow the rule of three */
BatchContainer(const BatchContainer &) = delete;
BatchContainer & operator=(const BatchContainer &) = delete;

/**
* Computes the result of the cosine distance algorithm in the batch processing mode
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ class Batch : public daal::algorithms::quality_metric::Batch
input.set(eigenvalues, other.input.get(eigenvalues));
}

~Batch() = default;

/**
* Returns the method of the algorithm
* \return Method of the algorithm
Expand Down
2 changes: 2 additions & 0 deletions cpp/daal/include/algorithms/pca/pca_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ class DAAL_EXPORT Input : public InputIface
public:
Input();
Input(const Input & other);
Input & operator=(const Input & other);

virtual ~Input() {};

Expand Down Expand Up @@ -556,6 +557,7 @@ class DistributedInput<correlationDense> : public InputIface
public:
DAAL_EXPORT DistributedInput();
DAAL_EXPORT DistributedInput(const DistributedInput & other);
DAAL_EXPORT DistributedInput operator=(const DistributedInput & other);

/**
* Sets input objects for the PCA on the second step in the distributed processing mode
Expand Down
9 changes: 9 additions & 0 deletions cpp/daal/src/algorithms/covariance/covariance_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ namespace covariance
{
namespace interface1
{

InputIface::InputIface(size_t nElements) : daal::algorithms::Input(nElements) {}
InputIface::InputIface(const InputIface & other) = default;
InputIface & InputIface::operator=(const InputIface & other) = default;
InputIface::~InputIface() = default;

Input::Input() : InputIface(lastInputId + 1) {}
Input::Input(const Input & other) = default;
Input & Input::operator=(const Input & other) = default;
Input::~Input() {}

/**
* Returns number of columns in the input data set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ OnlineParameter::OnlineParameter() : Parameter() {}
* Constructs parameters of the Covariance Online algorithm by copying another parameters of the Covariance Online algorithm
* \param[in] other Parameters of the Covariance Online algorithm
*/
OnlineParameter::OnlineParameter(const OnlineParameter & other) : Parameter(other) {}
OnlineParameter::OnlineParameter(const OnlineParameter & other) = default;

/**
* Copy-assignment operator for parameters of the Covariance Online algorithm
* \param[in] other Parameters of the Covariance Online algorithm
*/
OnlineParameter & OnlineParameter::operator=(const OnlineParameter & other) = default;

/**
* Check the correctness of the %OnlineParameter object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ DistributedInput<step2Master>::DistributedInput() : InputIface(lastMasterInputId
Argument::set(partialResults, DataCollectionPtr(new DataCollection()));
}

DistributedInput<step2Master>::DistributedInput(const DistributedInput & other) = default;
DistributedInput<step2Master> & DistributedInput<step2Master>::operator=(const DistributedInput & other) = default;
DistributedInput<step2Master>::~DistributedInput() = default;

size_t DistributedInput<step2Master>::getNumberOfFeatures() const
{
DataCollectionPtr collectionOfPartialResults = staticPointerCast<DataCollection, SerializationIface>(Argument::get(partialResults));
Expand Down
2 changes: 1 addition & 1 deletion cpp/daal/src/algorithms/pca/pca_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ InputIface::InputIface(const InputIface & other) : daal::algorithms::Input(other

Input::Input() : InputIface(lastInputDatasetId + 1) {};
Input::Input(const Input & other) : InputIface(other) {}

Input & Input::operator=(const Input & other) = default;
/**
* Returns the input object of the PCA algorithm
* \param[in] id Identifier of the input object
Expand Down
1 change: 1 addition & 0 deletions cpp/daal/src/algorithms/pca/pca_result_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ResultImpl : public data_management::DataCollection
bool isWhitening;
ResultImpl(const size_t n) : DataCollection(n), isWhitening(false) {}
ResultImpl(const ResultImpl & o) : DataCollection(o), isWhitening(o.isWhitening) {}
ResultImpl & operator=(const ResultImpl & o) = default;
virtual ~ResultImpl() {};

/**
Expand Down
6 changes: 0 additions & 6 deletions cpp/oneapi/dal/backend/primitives/blas/test/gemv_dpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ class gemv_test : public te::float_algo_fixture<std::tuple_element_t<0, Param>>
using gemv_types = COMBINE_TYPES((float, double), (c_order, f_order));

TEMPLATE_LIST_TEST_M(gemv_test, "ones matrix gemv on small sizes", "[gemv][small]", gemv_types) {
// TODO: ensure gemv issue is resolved and remove skip
SKIP_IF(true);

// DPC++ GEMV from micro MKL libs is not supported on GPU
SKIP_IF(this->get_policy().is_cpu());

Expand All @@ -162,9 +159,6 @@ TEMPLATE_LIST_TEST_M(gemv_test, "ones matrix gemv on small sizes", "[gemv][small
}

TEMPLATE_LIST_TEST_M(gemv_test, "ones matrix gemv on medium sizes", "[gemv][small]", gemv_types) {
// TODO: ensure gemv issue is resolved and remove skip
SKIP_IF(true);

// DPC++ GEMV from micro MKL libs is not supported on GPU
SKIP_IF(this->get_policy().is_cpu());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ TEMPLATE_LIST_TEST_M(select_flagged_test,
"select flagged",
"[select flagged]",
select_flagged_types) {
// TODO: Fix problem with incorrect number of total sum on CPU
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
std::int64_t elem_count = GENERATE_COPY(2, 15, 16000);

Expand All @@ -240,8 +238,6 @@ TEMPLATE_LIST_TEST_M(select_flagged_index_test,
"select flagged index",
"[select flagged]",
select_flagged_index_types) {
// TODO: Fix problem with incorrect number of total sum on CPU
SKIP_IF(this->get_policy().is_cpu());
SKIP_IF(this->not_float64_friendly());
std::int64_t elem_count = GENERATE_COPY(2, 15, 16000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ TEMPLATE_LIST_TEST_M(selection_by_rows_test,
"selection indexed rows",
"[block select][small]",
selection_types) {
SKIP_IF(true);
SKIP_IF(this->not_float64_friendly());
this->generate();
this->check_full();
Expand Down
2 changes: 1 addition & 1 deletion dev/docker/onedal-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#===============================================================================

FROM ubuntu:24.04@sha256:77d57fd89366f7d16615794a5b53e124d742404e20f035c22032233f1826bd6a
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab

ARG workdirectory="/sources/oneDAL"
WORKDIR ${workdirectory}
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ idna==3.10
imagesize==1.4.1
importlib-metadata==8.5.0
importlib-resources==6.4.5
Jinja2==3.1.4
Jinja2==3.1.5
lxml==5.3.0
MarkupSafe==3.0.2
packaging==24.2
Expand All @@ -27,7 +27,7 @@ Sphinx==8.1.3
sphinx-book-theme==1.1.3
sphinx-notfound-page==1.0.4
sphinx-prompt==1.9.0
Sphinx-Substitution-Extensions==2024.10.17
Sphinx-Substitution-Extensions==2025.1.2
sphinx-tabs==3.4.7
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
Expand Down

0 comments on commit 8bd25ea

Please sign in to comment.