Alien-XGBoost
view release on metacpan or search on metacpan
xgboost/cub/common.mk view on Meta::CPAN
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
#-------------------------------------------------------------------------------
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
CUB_DEPS = $(call rwildcard, $(CUB_DIR),*.cuh) \
$(CUB_DIR)common.mk
( run in 0.603 second using v1.01-cache-2.11-cpan-140bd7fdf52 )