[GPU-Plugin] Support for building to specific GPU architectures (#2390)

* Support for builing gpu-plugins to specific GPU architectures
1. Option GPU_COMPUTE_VER exposed from both Makefile and CMakeLists.txt
2. updater_gpu documentation updated accordingly

* Re-introduced GPU_COMPUTE_VER option in the cmake flow.
This seems to fix the compile-time, rdc=true and copy-constructor related
errors seen and discussed in PR #2390.
This commit is contained in:
Thejaswi
2017-06-13 03:21:38 +05:30
committed by Rory Mitchell
parent 65d2513714
commit 34dfe2f6de
3 changed files with 32 additions and 29 deletions

View File

@@ -93,12 +93,12 @@ endif
CFLAGS += $(OPENMP_FLAGS)
# for using GPUs
COMPUTE ?= 60 35
GPU_COMPUTE_VER ?= 50 52 60 61
NVCC = nvcc
INCLUDES = -Iinclude -I$(DMLC_CORE)/include -I$(RABIT)/include
INCLUDES += -I$(CUB_PATH)
INCLUDES += -I$(GTEST_PATH)/include
CODE = $(foreach ver,$(COMPUTE),-gencode arch=compute_$(ver),code=sm_$(ver))
CODE = $(foreach ver,$(GPU_COMPUTE_VER),-gencode arch=compute_$(ver),code=sm_$(ver))
NVCC_FLAGS = --std=c++11 $(CODE) $(INCLUDES) -lineinfo --expt-extended-lambda
NVCC_FLAGS += -Xcompiler=$(OPENMP_FLAGS) -Xcompiler=-fPIC
ifeq ($(PLUGIN_UPDATER_GPU),ON)