Skip to content

Commit

Permalink
[ML-214] [GPU] use distributed covariance as the first step for PCA (#…
Browse files Browse the repository at this point in the history
…234)

* Migrate KMeans  daal to DPC++ (#209)

* 1. add JNI wrapper
2. modify compiler config
3. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add ci test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* java code style

Signed-off-by: minmingzhu <[email protected]>

* cpp code style

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update prepare-build-deps.sh

* add convert array, vector to homogentable

Signed-off-by: minmingzhu <[email protected]>

* 1. rollback ci config
2. remove CI test becaue homogentable only support GPU

Signed-off-by: minmingzhu <[email protected]>

* 1. update prepare-build-deps.sh

Signed-off-by: minmingzhu <[email protected]>

* remove ci GPU test

Signed-off-by: minmingzhu <[email protected]>

* 1. remove GPU CI test

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* 1. fix ci

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* fix comment

Signed-off-by: minmingzhu <[email protected]>

* Update build-jni.sh

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* fix link libze_loader.so.1

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci-local-dpc-test.sh

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update ci-local-dpc-test.sh

* Update GPU.cpp

* Update GPU.cpp

* Update ci-build-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update HomogenTableImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* update HomogenTable API

Signed-off-by: minmingzhu <[email protected]>

* update install-build-level-zero-deps-ubuntu.sh

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update run.sh

* Update build-jni.sh

* 1. Merge branch 'make_homogen_table' into convert_homogentable
2. update ci
3. add a new parameters for HomogenTable class

Signed-off-by: minmingzhu <[email protected]>

* Update pom.xml

* Update test.sh

* Update Makefile

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ConvertHomogenTableSuite.scala

* Update install-level-zero-ubuntu.sh

* Update install-level-zero-ubuntu.sh

* Update build.sh

* Update test.sh

* Update test.sh

* Update HomogenTableImpl.cpp

* Update install-build-deps-ubuntu.sh

* Update HomogenTableImpl.cpp

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-deps-ubuntu.sh

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update list-compute-devices.cpp

* Convert homogentable to array/vector/matrix (#4)

* 1. convert homogenTable to array/vector/matrix
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* Merge branch 'make_homogen_table' into convert_homogentable

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* Convert RDD[Vector]/RDD[LabeledPoint] to HomogenTable (#8)

* 1. convert rdd to HomogenTable
* 2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add empty homogentable

Signed-off-by: minmingzhu <[email protected]>

* Mirgate kmeans daal to DPC++ (#7)

Signed-off-by: minmingzhu <[email protected]>

* 1. Mirgate kmeans daal to DPC++
* 2. add unit test

* 1. move local host to distributed host
2. add cluster test
3. code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* Update ci-cluster-test.sh

* Update build.sh

* Update build.sh

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update com_intel_oap_mllib_OneDAL__.h

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update NaiveBayesResult.java

* 1. update code style
2. When using the Host/CPU device throws a fail

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update OneDAL.scala

Signed-off-by: minmingzhu <[email protected]>

* revert ALS.scala

* revert checkstyle.xml

* :Revert "revert checkstyle.xml"

This reverts commit 4f74bac.

* disable cluster test for gpu

* disable cluster test for gpu

* nit

Co-authored-by: minmingz <[email protected]>
Co-authored-by: Wu, Xiaochang <[email protected]>

* Migrate pca daal to DPC++ (#223)

* 1. add JNI wrapper
2. modify compiler config
3. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add ci test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* java code style

Signed-off-by: minmingzhu <[email protected]>

* cpp code style

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update prepare-build-deps.sh

* add convert array, vector to homogentable

Signed-off-by: minmingzhu <[email protected]>

* 1. rollback ci config
2. remove CI test becaue homogentable only support GPU

Signed-off-by: minmingzhu <[email protected]>

* 1. update prepare-build-deps.sh

Signed-off-by: minmingzhu <[email protected]>

* remove ci GPU test

Signed-off-by: minmingzhu <[email protected]>

* 1. remove GPU CI test

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* 1. fix ci

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* fix comment

Signed-off-by: minmingzhu <[email protected]>

* Update build-jni.sh

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* fix link libze_loader.so.1

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci-local-dpc-test.sh

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update ci-local-dpc-test.sh

* Update GPU.cpp

* Update GPU.cpp

* Update ci-build-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update HomogenTableImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* update HomogenTable API

Signed-off-by: minmingzhu <[email protected]>

* update install-build-level-zero-deps-ubuntu.sh

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update run.sh

* Update build-jni.sh

* 1. Merge branch 'make_homogen_table' into convert_homogentable
2. update ci
3. add a new parameters for HomogenTable class

Signed-off-by: minmingzhu <[email protected]>

* Update pom.xml

* Update test.sh

* Update Makefile

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ConvertHomogenTableSuite.scala

* Update install-level-zero-ubuntu.sh

* Update install-level-zero-ubuntu.sh

* Update build.sh

* Update test.sh

* Update test.sh

* Update HomogenTableImpl.cpp

* Update install-build-deps-ubuntu.sh

* Update HomogenTableImpl.cpp

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-deps-ubuntu.sh

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update list-compute-devices.cpp

* Convert homogentable to array/vector/matrix (#4)

* 1. convert homogenTable to array/vector/matrix
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* Merge branch 'make_homogen_table' into convert_homogentable

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* Convert RDD[Vector]/RDD[LabeledPoint] to HomogenTable (#8)

* 1. convert rdd to HomogenTable
* 2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add empty homogentable

Signed-off-by: minmingzhu <[email protected]>

* Mirgate kmeans daal to DPC++ (#7)

Signed-off-by: minmingzhu <[email protected]>

* 1. Mirgate kmeans daal to DPC++
* 2. add unit test

* 1. move local host to distributed host
2. add cluster test
3. code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* Update ci-cluster-test.sh

* Update build.sh

* Update build.sh

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update com_intel_oap_mllib_OneDAL__.h

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update NaiveBayesResult.java

* 1. update code style
2. When using the Host/CPU device throws a fail

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update OneDAL.scala

Signed-off-by: minmingzhu <[email protected]>

* revert ALS.scala

* revert checkstyle.xml

* :Revert "revert checkstyle.xml"

This reverts commit 4f74bac.

* disable cluster test for gpu

* disable cluster test for gpu

* nit

* migrate cpa to DPC++

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update OutputHelpers.hpp

* update com_intel_oap_mllib_feature_PCADALImpl.h

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update PCADALImpl.scala

Signed-off-by: minmingzhu <[email protected]>

* 1. update function name and variable name

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update stayHomogenTablePtrToVector to saveHomogenTablePtrToVector

Signed-off-by: minmingzhu <[email protected]>

* change compute_device to ComputeDevice

Signed-off-by: minmingzhu <[email protected]>

Co-authored-by: minmingz <[email protected]>
Co-authored-by: Wu, Xiaochang <[email protected]>

* [ML-226] Migrate correlation daal to DPC++  (#215)

* 1. add JNI wrapper
2. modify compiler config
3. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add ci test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* java code style

Signed-off-by: minmingzhu <[email protected]>

* cpp code style

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update ci-local-test.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update install-build-deps-ubuntu.sh

* Update prepare-build-deps.sh

* add convert array, vector to homogentable

Signed-off-by: minmingzhu <[email protected]>

* 1. rollback ci config
2. remove CI test becaue homogentable only support GPU

Signed-off-by: minmingzhu <[email protected]>

* 1. update prepare-build-deps.sh

Signed-off-by: minmingzhu <[email protected]>

* remove ci GPU test

Signed-off-by: minmingzhu <[email protected]>

* 1. remove GPU CI test

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* 1. fix ci

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update header

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update ci conf

Signed-off-by: minmingzhu <[email protected]>

* fix comment

Signed-off-by: minmingzhu <[email protected]>

* Update build-jni.sh

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update test.sh

* Update test.sh

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* update test.sh

Signed-off-by: minmingzhu <[email protected]>

* fix link libze_loader.so.1

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci-local-dpc-test.sh

Signed-off-by: minmingzhu <[email protected]>

* update oneapi to 2022.1.2

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update Makefile

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps-gpu.sh

* Update prepare-build-deps.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update install-build-level-zero-deps-ubuntun.sh

* Update ci-local-dpc-test.sh

* Update GPU.cpp

* Update GPU.cpp

* Update ci-build-test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update HomogenTableImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* Update ci-local-dpc-test.sh

* update HomogenTable API

Signed-off-by: minmingzhu <[email protected]>

* update install-build-level-zero-deps-ubuntu.sh

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update ci-local-dpc-test.sh

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* update ci

Signed-off-by: minmingzhu <[email protected]>

* Update run.sh

* Update build-jni.sh

* 1. Merge branch 'make_homogen_table' into convert_homogentable
2. update ci
3. add a new parameters for HomogenTable class

Signed-off-by: minmingzhu <[email protected]>

* Update pom.xml

* Update test.sh

* Update Makefile

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ConvertHomogenTableSuite.scala

* Update install-level-zero-ubuntu.sh

* Update install-level-zero-ubuntu.sh

* Update build.sh

* Update test.sh

* Update test.sh

* Update HomogenTableImpl.cpp

* Update install-build-deps-ubuntu.sh

* Update HomogenTableImpl.cpp

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update install-build-deps-ubuntu.sh

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update list-compute-devices.cpp

* Convert homogentable to array/vector/matrix (#4)

* 1. convert homogenTable to array/vector/matrix
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* Merge branch 'make_homogen_table' into convert_homogentable

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* Convert RDD[Vector]/RDD[LabeledPoint] to HomogenTable (#8)

* 1. convert rdd to HomogenTable
* 2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* add empty homogentable

Signed-off-by: minmingzhu <[email protected]>

* Mirgate kmeans daal to DPC++ (#7)

Signed-off-by: minmingzhu <[email protected]>

* 1. Mirgate kmeans daal to DPC++
* 2. add unit test

* 1. migrate pca to DPC++
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* normalize data

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* 1. migrate correlation to DPC++ interface
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* 1. move local host to distributed host
2. add cluster test
3. code style

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update ci-cluster-test.sh

* Update ci-cluster-test.sh

* Update build.sh

* Update build.sh

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update OneDAL.cpp

* Update com_intel_oap_mllib_OneDAL__.h

* update code style

Signed-off-by: minmingzhu <[email protected]>

* Update NaiveBayesResult.java

* 1. update code style
2. When using the Host/CPU device throws a fail

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback code style

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rollback checkstyle.xml

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update OneDAL.scala

Signed-off-by: minmingzhu <[email protected]>

* revert ALS.scala

* revert checkstyle.xml

* :Revert "revert checkstyle.xml"

This reverts commit 4f74bac.

* disable cluster test for gpu

* disable cluster test for gpu

* nit

* migrate cpa to DPC++

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update OutputHelpers.hpp

* update com_intel_oap_mllib_feature_PCADALImpl.h

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update PCADALImpl.scala

Signed-off-by: minmingzhu <[email protected]>

* 1. update function name and variable name

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update stayHomogenTablePtrToVector to saveHomogenTablePtrToVector

Signed-off-by: minmingzhu <[email protected]>

* change compute_device to ComputeDevice

Signed-off-by: minmingzhu <[email protected]>

* 1. migrate pca to DPC++
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* normalize data

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* 1. migrate correlation to DPC++ interface
2. add unit test

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* Update prepare-build-deps-gpu.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* Update Makefile

* Update OutputHelpers.hpp

* Update PCAOneAPIImpl.cpp

* Update service.h

* update

Signed-off-by: minmingzhu <[email protected]>

* Update OneDAL.scala

* Update PCADALImpl.scala

* Update KmeansHomogenTableSuite.scala

* Update TestCommon.scala

* Update test.sh

* update

Signed-off-by: minmingzhu <[email protected]>

* fix comments

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

Signed-off-by: minmingzhu <[email protected]>
Co-authored-by: minmingz <[email protected]>
Co-authored-by: Wu, Xiaochang <[email protected]>

* [ML-227] Migrate moments daal to DPC++  (#229)

* add low order moments

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* rename unit filename

Signed-off-by: minmingzhu <[email protected]>

Signed-off-by: minmingzhu <[email protected]>

* used cov + precomputed pca

Signed-off-by: minmingzhu <[email protected]>

* update code style

Signed-off-by: minmingzhu <[email protected]>

* update PCAOneAPIImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update

Signed-off-by: minmingzhu <[email protected]>

* update PCADALImpl.scala

Signed-off-by: minmingzhu <[email protected]>

* update PCAImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* update PCAImpl.cpp

Signed-off-by: minmingzhu <[email protected]>

* Update GPU.cpp

* update

Signed-off-by: minmingzhu <[email protected]>

* Update mllib-dal/src/main/native/PCAImpl.cpp

* Update mllib-dal/src/main/native/PCAImpl.cpp

* update style

Signed-off-by: minmingzhu <[email protected]>

* retrigger checks

---------

Signed-off-by: minmingzhu <[email protected]>
Co-authored-by: minmingz <[email protected]>
Co-authored-by: Wu, Xiaochang <[email protected]>
  • Loading branch information
3 people authored Apr 13, 2023
1 parent 2f6b35c commit 7800f45
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
33 changes: 22 additions & 11 deletions mllib-dal/src/main/native/PCAImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#endif
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "oneapi/dal/algo/covariance.hpp"
#include "oneapi/dal/algo/pca.hpp"
#include "oneapi/dal/table/homogen.hpp"
#endif
Expand Down Expand Up @@ -192,30 +193,36 @@ static void doPCAOneAPICompute(JNIEnv *env, jint rankId, jlong pNumTabData,
const bool isRoot = (rankId == ccl_root);
homogen_table htable =
*reinterpret_cast<const homogen_table *>(pNumTabData);
const auto pca_desc = pca::descriptor{};

const auto cov_desc = covariance::descriptor{}.set_result_options(
covariance::result_options::cov_matrix);
auto queue = getQueue(device);
auto comm = preview::spmd::make_communicator<preview::spmd::backend::ccl>(
queue, executorNum, rankId, ipPort);
pca::train_input local_input{htable};

auto t1 = std::chrono::high_resolution_clock::now();
const auto result_train = preview::train(comm, pca_desc, local_input);
const auto result = preview::compute(comm, cov_desc, htable);
auto t2 = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
std::cout << "PCA (native): training step took " << duration / 1000
std::cout << "PCA (native): Covariance step took " << duration / 1000
<< " secs" << std::endl;
if (isRoot) {
std::cout << "Eigenvectors:\n"
<< result_train.get_eigenvectors() << std::endl;
std::cout << "Eigenvalues:\n"
<< result_train.get_eigenvalues() << std::endl;
using float_t = double;
using method_t = pca::method::precomputed;
using task_t = pca::task::dim_reduction;
using descriptor_t = pca::descriptor<float_t, method_t, task_t>;
const auto pca_desc = descriptor_t().set_deterministic(true);

auto t1 = std::chrono::high_resolution_clock::now();
const auto result_train =
train(queue, pca_desc, result.get_cov_matrix());
t2 = std::chrono::high_resolution_clock::now();
duration =
std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1)
.count();
std::cout << "PCA (native): rankid " << rankId
<< "; training step took " << duration / 1000
<< " secs in end. " << std::endl;
std::cout << "PCA (native): rankid " << rankId << "; Eigen step took "
<< duration / 1000 << " secs in end. " << std::endl;
// Return all eigenvalues & eigenvectors
// Get the class of the input object
jclass clazz = env->GetObjectClass(resultObj);
Expand All @@ -224,6 +231,10 @@ static void doPCAOneAPICompute(JNIEnv *env, jint rankId, jlong pNumTabData,
env->GetFieldID(clazz, "pcNumericTable", "J");
jfieldID explainedVarianceNumericTableField =
env->GetFieldID(clazz, "explainedVarianceNumericTable", "J");
std::cout << "Eigenvectors:\n"
<< result_train.get_eigenvectors() << std::endl;
std::cout << "Eigenvalues:\n"
<< result_train.get_eigenvalues() << std::endl;

HomogenTablePtr eigenvectors =
std::make_shared<homogen_table>(result_train.get_eigenvectors());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ class PCADALImpl(val k: Int,
}

private[mllib] def getPrincipleComponentsFromOneAPI(table: HomogenTable,
k: Int,
device: Common.ComputeDevice): DenseMatrix = {
k: Int,
device: Common.ComputeDevice): DenseMatrix = {
val numRows = table.getRowCount.toInt
val numCols = table.getColumnCount.toInt
require(k <= numRows, "k should be less or equal to row number")
Expand Down

0 comments on commit 7800f45

Please sign in to comment.