[GPU-Plugin] Multi-GPU gpu_id bug fixes for grow_gpu_hist and grow_gpu methods, and additional documentation for the gpu plugin. (#2463)
This commit is contained in:
committed by
Rory Mitchell
parent
91dae84a00
commit
6b287177c8
15
Makefile
15
Makefile
@@ -96,7 +96,7 @@ endif
|
||||
CFLAGS += $(OPENMP_FLAGS)
|
||||
|
||||
# for using GPUs
|
||||
GPU_COMPUTE_VER ?= 50 52 60 61
|
||||
GPU_COMPUTE_VER ?= 35 50 52 60 61
|
||||
NVCC = nvcc
|
||||
INCLUDES = -Iinclude -I$(DMLC_CORE)/include -I$(RABIT)/include
|
||||
INCLUDES += -I$(CUB_PATH)
|
||||
@@ -106,14 +106,13 @@ NVCC_FLAGS = --std=c++11 $(CODE) $(INCLUDES) -lineinfo --expt-extended-lambda
|
||||
NVCC_FLAGS += -Xcompiler=$(OPENMP_FLAGS) -Xcompiler=-fPIC
|
||||
ifeq ($(PLUGIN_UPDATER_GPU),ON)
|
||||
CUDA_ROOT = $(shell dirname $(shell dirname $(shell which $(NVCC))))
|
||||
INCLUDES += -I$(CUDA_ROOT)/include
|
||||
LDFLAGS += -L$(CUDA_ROOT)/lib64 -lcudart
|
||||
INCLUDES += -I$(CUDA_ROOT)/include -Inccl/src/
|
||||
LDFLAGS += -L$(CUDA_ROOT)/lib64 -lcudart -lcudadevrt -Lnccl/build/lib/ -lnccl_static -lm -ldl -lrt
|
||||
endif
|
||||
|
||||
# specify tensor path
|
||||
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck java pylint
|
||||
|
||||
|
||||
all: lib/libxgboost.a $(XGBOOST_DYLIB) xgboost
|
||||
|
||||
$(DMLC_CORE)/libdmlc.a: $(wildcard $(DMLC_CORE)/src/*.cc $(DMLC_CORE)/src/*/*.cc)
|
||||
@@ -143,7 +142,7 @@ build/%.o: src/%.cc
|
||||
$(CXX) -c $(CFLAGS) $< -o $@
|
||||
|
||||
# order of this rule matters wrt %.cc rule below!
|
||||
build_plugin/%.o: plugin/%.cu
|
||||
build_plugin/%.o: plugin/%.cu build_nccl
|
||||
@mkdir -p $(@D)
|
||||
$(NVCC) -c $(NVCC_FLAGS) $< -o $@
|
||||
|
||||
@@ -152,6 +151,11 @@ build_plugin/%.o: plugin/%.cc
|
||||
$(CXX) $(CFLAGS) -MM -MT build_plugin/$*.o $< >build_plugin/$*.d
|
||||
$(CXX) -c $(CFLAGS) $< -o $@
|
||||
|
||||
build_nccl:
|
||||
@mkdir -p build/include
|
||||
cd build/include ; ln -sf ../../nccl/src/nccl.h .
|
||||
cd nccl ; make -j ; cd ..
|
||||
|
||||
# The should be equivalent to $(ALL_OBJ) except for build/cli_main.o
|
||||
amalgamation/xgboost-all0.o: amalgamation/xgboost-all0.cc
|
||||
$(CXX) -c $(CFLAGS) $< -o $@
|
||||
@@ -173,6 +177,7 @@ jvm-packages/lib/libxgboost4j.so: jvm-packages/xgboost4j/src/native/xgboost4j.cp
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CFLAGS) $(JAVAINCFLAGS) -shared -o $@ $(filter %.cpp %.o %.a, $^) $(LDFLAGS)
|
||||
|
||||
|
||||
xgboost: $(CLI_OBJ) $(ALL_DEP)
|
||||
$(CXX) $(CFLAGS) -o $@ $(filter %.o %.a, $^) $(LDFLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user