Alien-XGBoost
view release on metacpan or search on metacpan
xgboost/cub/common.mk view on Meta::CPAN
SM_DEF += -DSM110
TEST_ARCH = 110
endif
ifeq (100, $(findstring 100, $(SM_ARCH)))
SM_TARGETS += -gencode=arch=compute_10,code=\"sm_10,compute_10\"
SM_DEF += -DSM100
TEST_ARCH = 100
endif
# [cdp=<0|1>] CDP enable option (default: no)
ifeq ($(cdp), 1)
DEFINES += -DCUB_CDP
CDP_SUFFIX = cdp
NVCCFLAGS += -rdc=true -lcudadevrt
else
CDP_SUFFIX = nocdp
endif
# [force32=<0|1>] Device addressing mode option (64-bit device pointers by default)
ifeq ($(force32), 1)
CPU_ARCH = -m32
CPU_ARCH_SUFFIX = i386
else
CPU_ARCH = -m64
CPU_ARCH_SUFFIX = x86_64
NPPI = -lnppi
endif
# [abi=<0|1>] CUDA ABI option (enabled by default)
ifneq ($(abi), 0)
ABI_SUFFIX = abi
else
NVCCFLAGS += -Xptxas -abi=no
ABI_SUFFIX = noabi
endif
# [open64=<0|1>] Middle-end compiler option (nvvm by default)
ifeq ($(open64), 1)
NVCCFLAGS += -open64
PTX_SUFFIX = open64
else
PTX_SUFFIX = nvvm
endif
# [verbose=<0|1>] Verbose toolchain output from nvcc option
ifeq ($(verbose), 1)
NVCCFLAGS += -v
endif
# [keep=<0|1>] Keep intermediate compilation artifacts option
ifeq ($(keep), 1)
NVCCFLAGS += -keep
endif
# [debug=<0|1>] Generate debug mode code
ifeq ($(debug), 1)
NVCCFLAGS += -G
endif
#-------------------------------------------------------------------------------
# Compiler and compilation platform
#-------------------------------------------------------------------------------
CUB_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
NVCC = "$(shell which nvcc)"
ifdef nvccver
NVCC_VERSION = $(nvccver)
else
NVCC_VERSION = $(strip $(shell nvcc --version | grep release | sed 's/.*release //' | sed 's/,.*//'))
endif
# detect OS
OSUPPER = $(shell uname -s 2>/dev/null | tr [:lower:] [:upper:])
# Default flags: verbose kernel properties (regs, smem, cmem, etc.); runtimes for compilation phases
NVCCFLAGS += $(SM_DEF) -Xptxas -v -Xcudafe -\#
ifeq (WIN_NT, $(findstring WIN_NT, $(OSUPPER)))
# For MSVC
# Enable more warnings and treat as errors
NVCCFLAGS += -Xcompiler /W3 -Xcompiler /WX
# Disable excess x86 floating point precision that can lead to results being labeled incorrectly
NVCCFLAGS += -Xcompiler /fp:strict
# Help the compiler/linker work with huge numbers of kernels on Windows
NVCCFLAGS += -Xcompiler /bigobj -Xcompiler /Zm500
CC = cl
# Multithreaded runtime
NVCCFLAGS += -Xcompiler /MT
ifneq ($(force32), 1)
CUDART_CYG = "$(shell dirname $(NVCC))/../lib/Win32/cudart.lib"
else
CUDART_CYG = "$(shell dirname $(NVCC))/../lib/x64/cudart.lib"
endif
CUDART = "$(shell cygpath -w $(CUDART_CYG))"
else
# For g++
# Disable excess x86 floating point precision that can lead to results being labeled incorrectly
NVCCFLAGS += -Xcompiler -ffloat-store
CC = g++
ifneq ($(force32), 1)
CUDART = "$(shell dirname $(NVCC))/../lib/libcudart_static.a"
else
CUDART = "$(shell dirname $(NVCC))/../lib64/libcudart_static.a"
endif
endif
# Suffix to append to each binary
BIN_SUFFIX = sm$(SM_ARCH)_$(PTX_SUFFIX)_$(NVCC_VERSION)_$(ABI_SUFFIX)_$(CDP_SUFFIX)_$(CPU_ARCH_SUFFIX)
#-------------------------------------------------------------------------------
# Dependency Lists
( run in 0.466 second using v1.01-cache-2.11-cpan-f4a522933cf )