46 lines
2.1 KiB
Diff
46 lines
2.1 KiB
Diff
|
https://github.com/alphacep/kaldi/pull/5
|
||
|
From 5f70761ecdf497cf55ca730187ab6ab38589ef0f Mon Sep 17 00:00:00 2001
|
||
|
From: John Gebbie <me@johngebbie.com>
|
||
|
Date: Sat, 3 Dec 2022 17:59:32 +0000
|
||
|
Subject: [PATCH] Add OPENBLAS_NO_F2C math library option
|
||
|
|
||
|
---
|
||
|
src/configure | 10 +++++++---
|
||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/configure b/src/configure
|
||
|
index ed62daa5017..1d78489d55e 100755
|
||
|
--- a/src/configure
|
||
|
+++ b/src/configure
|
||
|
@@ -834,7 +834,7 @@ auto_lib= # Deduced lib name, used when $MATHLIB is not set.
|
||
|
|
||
|
# Validate the (optionally) provided MATHLIB value.
|
||
|
case $MATHLIB in
|
||
|
- ''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK) : ;;
|
||
|
+ ''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK|OPENBLAS_NO_F2C) : ;;
|
||
|
*) failure "Unknown --mathlib='${MATHLIB}'. Supported libs: ATLAS CLAPACK MKL OPENBLAS" ;;
|
||
|
esac
|
||
|
|
||
|
@@ -1301,7 +1301,7 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
|
||
|
esac >> kaldi.mk
|
||
|
|
||
|
echo "Successfully configured for Linux with OpenBLAS from $OPENBLASROOT"
|
||
|
- elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
|
||
|
+ elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ] || [ "$MATHLIB" == "OPENBLAS_NO_F2C" ]; then
|
||
|
if [[ ! $OPENBLASROOT ]]; then
|
||
|
# Either the user specified --mathlib=OPENBLAS or we've autodetected the
|
||
|
# system where OpenBLAS is the preferred option (the parser for
|
||
|
@@ -1345,7 +1345,11 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
|
||
|
OPENBLASINCDIR="/usr/include"
|
||
|
fi
|
||
|
echo "Your math library seems to be OpenBLAS from $OPENBLASROOT. Configuring appropriately."
|
||
|
- OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
|
||
|
+ if [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
|
||
|
+ OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
|
||
|
+ else
|
||
|
+ OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a"
|
||
|
+ fi
|
||
|
echo "OPENBLASINC = $OPENBLASINCDIR" >> kaldi.mk
|
||
|
echo "OPENBLASLIBS = $OPENBLASLIBS" >> kaldi.mk
|
||
|
echo >> kaldi.mk
|