diff --git a/mllib-dal/src/main/native/KMeansDALImpl.cpp b/mllib-dal/src/main/native/KMeansDALImpl.cpp index 0cf151e72..a73d58111 100644 --- a/mllib-dal/src/main/native/KMeansDALImpl.cpp +++ b/mllib-dal/src/main/native/KMeansDALImpl.cpp @@ -28,6 +28,7 @@ using namespace std; using namespace daal; using namespace daal::algorithms; +using namespace daal::services; typedef double algorithmFPType; /* Algorithm floating-point type */ @@ -262,8 +263,18 @@ Java_com_intel_oap_mllib_clustering_KMeansDALImpl_cKMeansDALComputeWithInitCente daal::services::Environment::getInstance()->setDefaultExecutionContext( ctx); + using daal::data_management::internal::convertToSyclHomogen; + + Status st; + NumericTablePtr pSyclHomogen = convertToSyclHomogen(*pData, st); + if (!st.ok()) { + std::cout << "Failed to convert row merged table to SYCL homogen one" + << std::endl; + return 0L; + } + ret = doKMeansDALComputeWithInitCenters( - env, obj, rankId, comm, pData, centroids, cluster_num, tolerance, + env, obj, rankId, comm, pSyclHomogen, centroids, cluster_num, tolerance, iteration_num, executor_num, resultObj); env->ReleaseIntArrayElements(gpu_idx_array, gpu_indices, 0); diff --git a/mllib-dal/src/main/native/PCADALImpl.cpp b/mllib-dal/src/main/native/PCADALImpl.cpp index f84f3a122..03d09f261 100644 --- a/mllib-dal/src/main/native/PCADALImpl.cpp +++ b/mllib-dal/src/main/native/PCADALImpl.cpp @@ -28,6 +28,7 @@ using namespace std; using namespace daal; using namespace daal::algorithms; +using namespace daal::services; typedef double algorithmFPType; /* Algorithm floating-point type */ @@ -195,7 +196,17 @@ Java_com_intel_oap_mllib_feature_PCADALImpl_cPCATrainDAL( daal::services::Environment::getInstance()->setDefaultExecutionContext( ctx); - doPCADALCompute(env, obj, rankId, comm, pData, nBlocks, resultObj); + using daal::data_management::internal::convertToSyclHomogen; + + Status st; + NumericTablePtr pSyclHomogen = convertToSyclHomogen(*pData, st); + if (!st.ok()) { + std::cout << "Failed to convert row merged table to SYCL homogen one" + << std::endl; + return 0L; + } + + doPCADALCompute(env, obj, rankId, comm, pSyclHomogen, nBlocks, resultObj); env->ReleaseIntArrayElements(gpu_idx_array, gpu_indices, 0); } else