Skip to content

Instantly share code, notes, and snippets.

@BrightXiaoHan
Created September 11, 2023 01:38
Show Gist options
  • Save BrightXiaoHan/682936114d476abaf2d5957fa0ca8712 to your computer and use it in GitHub Desktop.
Save BrightXiaoHan/682936114d476abaf2d5957fa0ca8712 to your computer and use it in GitHub Desktop.
Compile CTranslate2 in conda environment

X86

conda install cmake make gxx_linux-64 gcc_linux-64

intel mkl

conda install -c intel mkl-devel mkl-static onednn-devel-cpu-iomp

cuda

conda install -c nvidia cuda-cudart-dev cuda-nvcc libcurand-dev libcublas-dev cudnn=8.1

compile

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-msse4.1" -DBUILD_CLI=OFF -DWITH_DNNL=ON -DOPENMP_RUNTIME=COMP -DWITH_CUDA=ON -DWITH_CUDNN=ON -DCUDA_DYNAMIC_LOADING=ON -DCUDA_NVCC_FLAGS="-Xfatbin=-compress-all" -DCUDA_ARCH_LIST="Common" -DCMAKE_INSTALL_PREFIX=(pwd)/release ..
make -j 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment