Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
minmingzhu committed Oct 18, 2024
1 parent b429512 commit 4487b66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mllib-dal/src/main/native/GPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ sycl::queue getAssignedGPU(const ComputeDevice device, jint *gpu_indices);

sycl::queue getQueue(const ComputeDevice device);

std::vector<sycl::device> get_gpus();
std::vector<sycl::device> get_gpus();
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class KmeansHomogenTableSuite extends FunctionsSuite with Logging {
val result = new KMeansResult();
val centroids = kmeansDAL.cKMeansOneapiComputeWithInitCenters(0, dataTable.getcObejct(), sourceData.length, sourceData(0).length, centroidsTable.getcObejct(),10, 0.001,
5, 1, 1, TestCommon.getComputeDevice.ordinal(), gpuIndices, result);
val resultVectors = OneDAL.homogenTableToVectors(OneDAL.makeHomogenTable(centroids), TestCommon.getComputeDevice);
val resultVectors = OneDAL.homogenTableToVectors(OneDAL.makeHomogenTable(centroids));
assertArrayEquals(TestCommon.convertArray(expectCentroids), TestCommon.convertArray(resultVectors), 0.000001)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class SummarizerHomogenTableSuite extends FunctionsSuite with Logging{
val gpuIndices = Array(0)
val result = new SummarizerResult()
summarizerDAL.cSummarizerTrainDAL(0, dataTable.getcObejct(), sourceData.length, sourceData(0).length, 1, 1, Common.ComputeDevice.HOST.ordinal(), gpuIndices, result)
val meanTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMeanNumericTable), Common.ComputeDevice.HOST)
val varianceTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getVarianceNumericTable), Common.ComputeDevice.HOST)
val minimumTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMinimumNumericTable), Common.ComputeDevice.HOST)
val maximumTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMaximumNumericTable), Common.ComputeDevice.HOST)
val meanTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMeanNumericTable))
val varianceTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getVarianceNumericTable))
val minimumTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMinimumNumericTable))
val maximumTable = OneDAL.homogenTable1xNToVector(OneDAL.makeHomogenTable(result.getMaximumNumericTable))

assertArrayEquals(expectMean , meanTable.toArray, 0.000001)
assertArrayEquals(expectVariance, varianceTable.toDense.values, 0.000001)
Expand Down

0 comments on commit 4487b66

Please sign in to comment.