PSA: I just enabled OPENBLAS, but I had to disable both MKL and DNNL to do it. Please let me know how that goes.
Search Criteria
Package Details: ctranslate2 4.5.0-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/ctranslate2.git (read-only, click to copy) |
---|---|
Package Base: | ctranslate2 |
Description: | A C++ library for efficient inference with Transformer models. |
Upstream URL: | https://opennmt.net/CTranslate2 |
Licenses: | MIT |
Provides: | libctranslate2.so |
Submitter: | yochananmarqos |
Maintainer: | yochananmarqos |
Last Packager: | yochananmarqos |
Votes: | 2 |
Popularity: | 0.066357 |
First Submitted: | 2023-12-10 15:32 (UTC) |
Last Updated: | 2024-10-24 19:00 (UTC) |
Dependencies (15)
- nlohmann-json (nlohmann-json-gitAUR)
- onednn (onednn-gitAUR)
- cmake (cmake-gitAUR) (make)
- cuda (cuda11.1AUR, cuda-12.2AUR, cuda12.0AUR, cuda11.4AUR, cuda11.4-versionedAUR, cuda12.0-versionedAUR) (make)
- gcc13 (make)
- git (git-gitAUR, git-glAUR) (make)
- intel-oneapi-mkl (intel-oneapi-hpckitAUR, intel-oneapi-basekit) (make)
- onednn (onednn-gitAUR) (make)
- openblas (openblas-lapackAUR) (make)
- pybind11 (pybind11-gitAUR) (make)
- python-build (make)
- python-installer (python-installer-gitAUR) (make)
- python-setuptools (make)
- python-wheel (make)
- cuda (cuda11.1AUR, cuda-12.2AUR, cuda12.0AUR, cuda11.4AUR, cuda11.4-versionedAUR, cuda12.0-versionedAUR) (optional)
Required by (1)
Sources (9)
- git+https://github.com/gabime/spdlog.git
- git+https://github.com/google/cpu_features.git
- git+https://github.com/google/googletest.git
- git+https://github.com/google/ruy.git
- git+https://github.com/jarro2783/cxxopts.git
- git+https://github.com/NVIDIA/cub.git
- git+https://github.com/NVIDIA/thrust.git
- git+https://github.com/OpenNMT/CTranslate2.git#tag=v4.5.0
- git+https://github.com/pytorch/cpuinfo.git
Latest Comments
yochananmarqos commented on 2024-10-24 19:03 (UTC)
AlD commented on 2024-06-04 20:53 (UTC)
Needs a patch like this for the time being:
diff --git a/PKGBUILD b/PKGBUILD
index 1b97483..b9ccaba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,7 @@ makedepends=(
'cmake'
'cuda'
# 'cudnn'
+ 'gcc13'
'git'
'intel-oneapi-mkl'
'onednn'
@@ -87,6 +88,7 @@ build() {
# Enabling both WITH_DNNL and WITH_OPENBLAS is broken
# https://github.com/OpenNMT/CTranslate2/issues/1294
+ export CC=gcc-13 CXX=g++-13
cmake -B build -S CTranslate2 \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
arzeth commented on 2024-04-27 18:55 (UTC) (edited on 2024-04-27 22:36 (UTC) by arzeth)
First, there should be -DWITH_CUDNN="${WITH_CUDNN:-OFF}" \\
otherwise there's a warning. Probably the same with WITH_OPENBLAS
.
Second, I had an error:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/amxtileintrin.h(42): error: identifier "__builtin_ia32_ldtilecfg" is undefined
because of https://github.com/gcc-mirror/gcc/commit/2b3ecdf4fb13471b69d80583e10c5baedfe84d7c in gcc 13.2.1 which changed 2 lines.
So I had to use 13.2.0's amxtileintrin.h
sudo wget https://raw.githubusercontent.com/gcc-mirror/gcc/83ffe9cde7fe0b4deb0d1b54175fd9b19c38179c/gcc/config/i386/amxtileintrin.h -O /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/amxtileintrin.h.13.2.0 && \
sudo mv /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/amxtileintrin.h{,.13.2.1} && \
sudo ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/amxtileintrin.h{.13.2.0,}
Then I had the linking problem ("multiple definitions" in kernels{,_avx,_avx2,_avx512}.cc
), which I fixed by removing -march
from /etc/makepkg.conf
. But it compiled successfully with just -mtune=native
instead (BTW, -march=X
implies -mtune=X
).
Also I tuned -DCUDA_ARCH_LIST='Common'
to '7.5'
because /opt/cuda/extras/demo_suite/deviceQuery
says my GPU's "CUDA Capability version" is 7.5; this sped up compilation by ~30 minutes (Ryzen 5 2600), and saved 415 MiB of space.
wyrmku commented on 2024-04-10 22:09 (UTC)
if any parents of the build director has a space in it, fails with `/usr/bin/cc is not able to compile a simple test program.``
yochananmarqos commented on 2024-04-02 14:21 (UTC)
@acgtyrant: I'm not sure exactly why the tests fail, that's why they're disabled currently.
acgtyrant commented on 2024-04-02 06:36 (UTC)
Hello, I am trying to determine whether I built ctranslate2 with cuDNN succesfully. However after I added -DBUILD_TESTS='ON'
and uncommented the check function, a failure occured in check():
==> Starting check()...
/var/cache/private/pikaur/build/ctranslate2/PKGBUILD: line 125: ./tests/ctranslate2_test: No such file or directory
I appreciate your reading and help!
Pinned Comments
yochananmarqos commented on 2024-10-24 19:03 (UTC)
PSA: I just enabled OPENBLAS, but I had to disable both MKL and DNNL to do it. Please let me know how that goes.