Skip to content

Commit

Permalink
[ML-125][GPU] Update for Kmeans and PCA
Browse files Browse the repository at this point in the history
  • Loading branch information
xwu99 authored Sep 22, 2021
1 parent 7803d8c commit c7fbb98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mllib-dal/src/assembly/assembly-cpu-gpu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<file>
<source>${env.TBBROOT}/lib/intel64/gcc4.8/${tbb.lib}</source>
<outputDirectory>lib</outputDirectory>
<destName>libtbb.so.2</destName>
<destName>libtbb.so.12</destName>
</file>
<file>
<source>${env.TBBROOT}/lib/intel64/gcc4.8/${tbb.malloc.lib}</source>
Expand Down
2 changes: 2 additions & 0 deletions mllib-dal/src/main/native/GPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ sycl::device getAssignedGPU(ccl::communicator &comm, int size, int rankId,

auto gpu_selected = gpu_indices[local_rank % n_gpu];
std::cout << "GPU selected for current rank: " << gpu_selected << std::endl;

// In case gpu_selected index is larger than number of GPU SYCL devices
auto rank_gpu = gpus[gpu_selected % gpus.size()];

return rank_gpu;
Expand Down
2 changes: 1 addition & 1 deletion mllib-dal/src/main/native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LIBS_COMMON := -L$(CCL_ROOT)/lib -lccl \
ifeq ($(PLATFORM_PROFILE),CPU_ONLY_PROFILE)
LIBS := $(LIBS_COMMON)
else ifeq ($(PLATFORM_PROFILE),CPU_GPU_PROFILE)
LIBS := "$(LIBS_COMMON) -l:libonedal_sycl.a"
LIBS := $(LIBS_COMMON) -l:libonedal_sycl.a
endif

CPP_SRCS += \
Expand Down

0 comments on commit c7fbb98

Please sign in to comment.