Revert "remove TC_MALLOC from optional dependencies (#840)"

This reverts commit 096c48e51c.
This commit is contained in:
Marcin Junczys-Dowmunt 2021-04-08 07:30:38 +00:00
parent c29cc83dc4
commit bfa6180033
4 changed files with 18 additions and 4 deletions

View File

@ -35,7 +35,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Moved FBGEMM pointer to commit c258054 for gcc 9.3+ fix
- Remove TC_MALLOC as an optional build depdendency. Doesn't seem to actually do anything anymore.
- Change compile options a la -DCOMPILE_CUDA_SM35 to -DCOMPILE_KEPLER, -DCOMPILE_MAXWELL,
-DCOMPILE_PASCAL, -DCOMPILE_VOLTA, -DCOMPILE_TURING and -DCOMPILE_AMPERE
- Disable -DCOMPILE_KEPLER, -DCOMPILE_MAXWELL by default.

View File

@ -420,6 +420,18 @@ if(USE_STATIC_LIBS)
endif()
endif()
###############################################################################
# Find Tcmalloc
if(NOT WIN32)
find_package(Tcmalloc)
if(Tcmalloc_FOUND)
include_directories(${Tcmalloc_INCLUDE_DIR})
set(EXT_LIBS ${EXT_LIBS} ${Tcmalloc_LIBRARIES})
else(Tcmalloc_FOUND)
message(WARNING "Cannot find TCMalloc library. Continuing.")
endif(Tcmalloc_FOUND)
endif()
###############################################################################
# Find BLAS library
if(COMPILE_CPU)

View File

@ -1,2 +1 @@
v1.10.14

View File

@ -74,9 +74,13 @@ if(USE_SENTENCEPIECE)
if(NOT GENERATE_MARIAN_INSTALL_TARGETS)
set(SPM_ENABLE_SHARED OFF CACHE BOOL "Builds shared libaries in addition to static libraries." FORCE)
endif()
set(SPM_ENABLE_TCMALLOC ON CACHE BOOL "Enable TCMalloc if available.")
# disable TCMALLOC for SentencePiece
set(SPM_ENABLE_TCMALLOC OFF CACHE BOOL "Enable TCMalloc if available." FORCE)
if(USE_STATIC_LIBS)
set(SPM_TCMALLOC_STATIC ON CACHE BOOL "Link static library of TCMALLOC." FORCE)
else(USE_STATIC_LIBS)
set(SPM_TCMALLOC_STATIC OFF CACHE BOOL "Link static library of TCMALLOC.")
endif(USE_STATIC_LIBS)
add_subdirectory(./sentencepiece)
include_directories(./sentencepiece)