Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit b09090c

Browse files
committed
C++17 for CUDA code
1 parent d889bdc commit b09090c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

3rdparty/mshadow/make/mshadow.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ PS_LIB = $(addprefix $(PS_PATH)/build/, libps.a libps_main.a) \
172172
$(addprefix $(PS_THIRD_PATH)/lib/, libgflags.a libzmq.a libprotobuf.a \
173173
libglog.a libz.a libsnappy.a)
174174
# -L$(PS_THIRD_PATH)/lib -lgflags -lzmq -lprotobuf -lglog -lz -lsnappy
175-
MSHADOW_NVCCFLAGS += --std=c++14
175+
MSHADOW_NVCCFLAGS += --std=c++17
176176
else
177177
MSHADOW_CFLAGS+= -DMSHADOW_DIST_PS=0
178178
endif

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ endif
131131
# -L/usr/local/lib
132132

133133
ifeq ($(DEBUG), 1)
134-
NVCCFLAGS += -std=c++14 -Xcompiler -D_FORCE_INLINES -g -G -O0 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS)
134+
NVCCFLAGS += -std=c++17 -Xcompiler -D_FORCE_INLINES -g -G -O0 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS)
135135
else
136-
NVCCFLAGS += -std=c++14 -Xcompiler -D_FORCE_INLINES -O3 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS)
136+
NVCCFLAGS += -std=c++17 -Xcompiler -D_FORCE_INLINES -O3 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS)
137137
endif
138138

139139
# CFLAGS for segfault logger
@@ -693,7 +693,7 @@ build/libtransposerowsp_lib.so:
693693
build/libcustomop_gpu_lib.so:
694694
@mkdir -p $(@D)
695695
$(NVCC) -shared -std=c++11 -Xcompiler -fPIC example/extensions/lib_custom_op/relu_lib.cu -o /dev/null -I include/mxnet
696-
$(NVCC) -shared -std=c++14 -Xcompiler -fPIC example/extensions/lib_custom_op/relu_lib.cu -o $@ -I include/mxnet
696+
$(NVCC) -shared -std=c++17 -Xcompiler -fPIC example/extensions/lib_custom_op/relu_lib.cu -o $@ -I include/mxnet
697697
build/libsubgraph_lib.so:
698698
@mkdir -p $(@D)
699699
$(CXX) -shared -fPIC -std=c++11 example/extensions/lib_subgraph/subgraph_lib.cc -o /dev/null -I include/mxnet

src/common/cuda/rtc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ CUfunction get_function(const std::string &code,
147147

148148
std::string gpu_arch_arg = "--gpu-architecture=compute_" + std::to_string(sm_arch);
149149
const char *opts[] = {gpu_arch_arg.c_str(),
150-
"--std=c++11"};
150+
"--std=c++14"};
151151
const std::string kernel_name_demangled = kernel_name;
152152
NVRTC_CALL(nvrtcAddNameExpression(program, (kernel_name_demangled).c_str()));
153153

0 commit comments

Comments
 (0)