Skip to content

Commit 1af684c

Browse files
committed
Trying mcmodel=medium to fix the failure in CMake static build
1 parent 43f4b4e commit 1af684c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ else()
176176
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
177177
endif()
178178
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
179+
if(USE_CUDA)
180+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcmodel=medium")
181+
endif()
179182
endif()
180183

181184
if(NOT mxnet_LINKER_LIBS)

0 commit comments

Comments
 (0)