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

FwdPort of "1.x-Backport Add cmake flag USE_FATBIN_COMPRESSION, ON by default (#19123) (#19158)" #19175

Merged
merged 2 commits into from
Sep 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ endif()
add_subdirectory("3rdparty/mshadow")

if(USE_CUDA AND USE_FATBIN_COMPRESSION)
string(APPEND CMAKE_CUDA_FLAGS "--fatbin-options -compress-all ")
message("-- CUDA: Adding NVCC options: --fatbin-options -compress-all ")
string(APPEND CMAKE_CUDA_FLAGS " --fatbin-options --compress-all")
message("-- CUDA: Adding NVCC options: --fatbin-options --compress-all")
endif()
if(UNIX)
string(APPEND CMAKE_CUDA_FLAGS " ${CUDA_ARCH_FLAGS_SPACES}")
Expand Down Expand Up @@ -710,7 +710,7 @@ elseif(MSVC)
COMMAND gen_warp $<TARGET_FILE:mxnet_${mxnet_first_arch}> WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/ DEPENDS $<TARGET_FILE:mxnet_${mxnet_first_arch}>)
else(USE_SPLIT_ARCH_DLL)
string(REPLACE ";" " " NVCC_FLAGS_ARCH "${NVCC_FLAGS_ARCH}")
set(CMAKE_CUDA_FLAGS " ${CUDA_ARCH_FLAGS_SPACES}")
string(APPEND CMAKE_CUDA_FLAGS " ${CUDA_ARCH_FLAGS_SPACES}")
add_library(mxnet SHARED ${SOURCE})
target_link_libraries(mxnet PUBLIC mshadow)
target_compile_options(
Expand Down