Commit 2ae4784d authored by Saeed SARFJOO's avatar Saeed SARFJOO
Browse files

update kaldi version

parent cb58f359
diff --git src/configure src/configure
index 277ab2e1c..a2f1c5bcd 100755
--- src/configure
+++ src/configure
@@ -1223,7 +1223,7 @@ elif [ "`uname`" == "Linux" ]; then
echo "Using Intel MKL as the linear algebra library."
(
cd probe; rm -f mkl-test;
- g++ mkl-test.cc -o mkl-test $MKL_COMPILE_LINE $MKL_LINK_LINE $THREADING_LINE $EXTRA_LIBS || exit 1
+ $CXX mkl-test.cc -o mkl-test $MKL_COMPILE_LINE $MKL_LINK_LINE $THREADING_LINE $EXTRA_LIBS || exit 1
test -f ./mkl-test || exit 1
./mkl-test || exit 1
cd ..
From f669d99fa7382edd76e7f42245309d68f66f1339 Mon Sep 17 00:00:00 2001
From: Milos Cernak <milos.cernak@idiap.ch>
Date: Wed, 15 Mar 2017 11:32:17 +0100
Subject: [PATCH] Patched makefiles for conda build
---
src/Makefile | 10 +--
src/configure | 2 +-
src/gmmbin/Makefile | 3 +-
src/gmmbin/global-gmm-adapt-map.cc | 95 ++++++++++++++++++++
src/gmmbin/gmm-compute-likes-gmmubm.cc | 156 +++++++++++++++++++++++++++++++++
src/makefiles/default_rules.mk | 2 +-
6 files changed, 260 insertions(+), 8 deletions(-)
create mode 100755 src/gmmbin/global-gmm-adapt-map.cc
create mode 100755 src/gmmbin/gmm-compute-likes-gmmubm.cc
diff --git a/src/Makefile b/src/Makefile
index 52b2326..2757699 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,14 +8,14 @@ SHELL := /bin/bash
SUBDIRS = base matrix util feat tree thread gmm transform \
fstext hmm lm decoder lat kws cudamatrix nnet \
bin fstbin gmmbin fgmmbin featbin \
- nnetbin latbin sgmm2 sgmm2bin nnet2 nnet3 chain nnet3bin nnet2bin kwsbin \
- ivector ivectorbin online2 online2bin lmbin chainbin
+ nnetbin latbin sgmm2 sgmm2bin nnet2 nnet3 chain nnet2bin kwsbin \
+ ivector ivectorbin online2 lmbin chainbin
MEMTESTDIRS = base matrix util feat tree thread gmm transform \
fstext hmm lm decoder lat nnet kws chain \
bin fstbin gmmbin fgmmbin featbin \
- nnetbin latbin sgmm2 nnet2 nnet3 nnet2bin nnet3bin sgmm2bin kwsbin \
- ivector ivectorbin online2 online2bin lmbin
+ nnetbin latbin sgmm2 nnet2 nnet3 nnet2bin sgmm2bin kwsbin \
+ ivector ivectorbin online2 lmbin
CUDAMEMTESTDIR = cudamatrix
@@ -150,7 +150,7 @@ $(EXT_SUBDIRS) : mklibdir ext_depend
# this is necessary for correct parallel compilation
#1)The tools depend on all the libraries
-bin fstbin gmmbin fgmmbin sgmm2bin featbin nnetbin nnet2bin nnet3bin chainbin latbin ivectorbin lmbin kwsbin online2bin: \
+bin fstbin gmmbin fgmmbin sgmm2bin featbin nnetbin nnet2bin chainbin latbin ivectorbin lmbin kwsbin: \
base matrix util feat tree thread gmm transform sgmm2 fstext hmm \
lm decoder lat cudamatrix nnet nnet2 nnet3 ivector chain kws online2
diff --git a/src/configure b/src/configure
index a4f3ce1..277ab2e 100755
index b94731da9..e7dc9dbb3 100755
--- a/src/configure
+++ b/src/configure
@@ -1031,7 +1031,7 @@ check_compiler $CXX
@@ -424,7 +424,7 @@ function configure_cuda {
;;
esac
if [ $GCC_VER_NUM -ge $MIN_UNSUPPORTED_GCC_VER_NUM ]; then
- failure "CUDA $CUDA_VERSION does not support $CXX (g++-$GCC_VER).
+ echo "CUDA $CUDA_VERSION does not support $CXX (g++-$GCC_VER).
You need g++ < $MIN_UNSUPPORTED_GCC_VER."
fi
fi
@@ -1022,7 +1022,7 @@ check_compiler $CXX
echo "# Base configuration" >> kaldi.mk
echo >> kaldi.mk
if $dynamic_kaldi ; then
......@@ -59,23 +20,32 @@ index a4f3ce1..277ab2e 100755
echo "KALDI_FLAVOR := dynamic" >> kaldi.mk
echo "KALDILIBDIR := $KALDILIBDIR" >> kaldi.mk
fi
@@ -1209,7 +1209,7 @@ elif [ "`uname`" == "Linux" ]; then
echo "Using Intel MKL as the linear algebra library."
(
cd probe; rm -f mkl-test;
- g++ mkl-test.cc -o mkl-test $MKL_COMPILE_LINE $MKL_LINK_LINE $THREADING_LINE $EXTRA_LIBS || exit 1
+ $CXX mkl-test.cc -o mkl-test $MKL_COMPILE_LINE $MKL_LINK_LINE $THREADING_LINE $EXTRA_LIBS || exit 1
test -f ./mkl-test || exit 1
./mkl-test || exit 1
cd ..
diff --git a/src/gmmbin/Makefile b/src/gmmbin/Makefile
index 7adb8bd..b2a9ea4 100644
index 82d10abe9..004c0eef3 100644
--- a/src/gmmbin/Makefile
+++ b/src/gmmbin/Makefile
@@ -28,7 +28,8 @@ BINFILES = gmm-init-mono gmm-est gmm-acc-stats-ali gmm-align \
@@ -26,7 +26,8 @@ BINFILES = gmm-init-mono gmm-est gmm-acc-stats-ali gmm-align \
gmm-est-fmllr-raw gmm-est-fmllr-raw-gpost gmm-global-init-from-feats \
gmm-global-info gmm-latgen-faster-regtree-fmllr gmm-est-fmllr-global \
gmm-acc-mllt-global gmm-transform-means-global gmm-global-get-post \
- gmm-global-gselect-to-post gmm-global-est-lvtln-trans
+ gmm-global-gselect-to-post gmm-global-est-lvtln-trans \
- gmm-global-gselect-to-post gmm-global-est-lvtln-trans gmm-init-biphone
+ gmm-global-gselect-to-post gmm-global-est-lvtln-trans gmm-init-biphone \
+ global-gmm-adapt-map gmm-compute-likes-gmmubm
OBJFILES =
diff --git a/src/gmmbin/global-gmm-adapt-map.cc b/src/gmmbin/global-gmm-adapt-map.cc
new file mode 100755
index 0000000..8344d82
new file mode 100644
index 000000000..c670b1d3e
--- /dev/null
+++ b/src/gmmbin/global-gmm-adapt-map.cc
@@ -0,0 +1,95 @@
......@@ -174,9 +144,10 @@ index 0000000..8344d82
+ return -1;
+ }
+}
\ No newline at end of file
diff --git a/src/gmmbin/gmm-compute-likes-gmmubm.cc b/src/gmmbin/gmm-compute-likes-gmmubm.cc
new file mode 100755
index 0000000..593f325
new file mode 100644
index 000000000..010b2b923
--- /dev/null
+++ b/src/gmmbin/gmm-compute-likes-gmmubm.cc
@@ -0,0 +1,156 @@
......@@ -283,7 +254,7 @@ index 0000000..593f325
+ if (gselect_rspecifier != "") {
+ if (!gselect_reader.HasKey(key)) {
+ KALDI_WARN << "No gselect information for utterance " << key;
+ num_err++;
+ num_err;
+ continue;
+ }
+ const std::vector<std::vector<int32> > &gselect =
......@@ -292,11 +263,11 @@ index 0000000..593f325
+ KALDI_WARN << "gselect information for utterance " << key
+ << " has wrong size " << gselect.size() << " vs. "
+ << file_frames;
+ num_err++;
+ num_err;
+ continue;
+ }
+
+ for (int32 i = 0; i < file_frames; i++) {
+ for (int32 i = 0; i < file_frames; i) {
+ SubVector<BaseFloat> data(mat, i);
+ const std::vector<int32> &this_gselect = gselect[i];
+ int32 gselect_size = this_gselect.size();
......@@ -309,21 +280,21 @@ index 0000000..593f325
+ likesUBM(i) = loglikesUBM.LogSumExp();
+ }
+ } else { // no gselect..
+ for (int32 i = 0; i < file_frames; i++){
+ for (int32 i = 0; i < file_frames; i){
+ likes(i) = dgmm.LogLikelihood(mat.Row(i));
+ likesUBM(i) = dubm.LogLikelihood(mat.Row(i));
+ }
+
+ }
+
+ tot_like += likes.Sum();
+ tot_frames += file_frames;
+ tot_like = likes.Sum();
+ tot_frames = file_frames;
+ if (average)
+ average_likes_writer.Write(key, (likes.Sum() - likesUBM.Sum())/ file_frames);
+ //average_likes_writer.Write(key, (likes.Sum())/ file_frames);
+ else
+ likes_writer.Write(key, likes);
+ num_done++;
+ num_done;
+ }
+ KALDI_LOG << "Done " << num_done << " files; " << num_err
+ << " with errors.";
......@@ -336,19 +307,17 @@ index 0000000..593f325
+ return -1;
+ }
+}
\ No newline at end of file
diff --git a/src/makefiles/default_rules.mk b/src/makefiles/default_rules.mk
index 34abd90..0f0d980 100644
index 7af6497ab..dac42bcd5 100644
--- a/src/makefiles/default_rules.mk
+++ b/src/makefiles/default_rules.mk
@@ -36,7 +36,7 @@ ifeq ($(shell uname), Darwin)
else ifeq ($(shell uname), Linux)
# Building shared library from static (static was compiled with -fPIC)
@@ -43,7 +43,7 @@ $(LIBFILE): $(LIBNAME).a
else ifeq ($(shell uname), Linux)
# Building shared library from static (static was compiled with -fPIC)
$(CXX) -shared -o $@ -Wl,--no-undefined -Wl,--as-needed -Wl,-soname=$@,--whole-archive $(LIBNAME).a -Wl,--no-whole-archive $(LDFLAGS) $(LDLIBS)
- rm -f $(KALDILIBDIR)/$@; ln -s $(shell pwd)/$@ $(KALDILIBDIR)/$@
+ rm -f $(KALDILIBDIR)/$@; cp -f $(shell pwd)/$@ $(KALDILIBDIR)/$@
else # Platform not supported
- ln -sf $(shell pwd)/$@ $(KALDILIBDIR)/$@
+ cp $(shell pwd)/$@ $(KALDILIBDIR)/$@
else # Platform not supported
$(error Dynamic libraries not supported on this platform. Run configure with --static flag.)
endif
--
2.1.4
endif
{% set name = "kaldi" %}
{% set version = "2017.03.13" %}
{% set git_rev = "1a4dbf6be118e4967cf4efd510811ef72cdfee3d" %}
{% set version = "1:5.5.164" %}
{% set git_rev = "ca32c4e2bd77544c4ad4aa0bba25f0b812ea1a61" %}
package:
name: {{ name }}
......@@ -11,7 +11,6 @@ source:
git_rev: {{ git_rev }}
patches:
- conda-kaldi.patch
- 0001-mkl-cxx.patch
build:
number: 3
......@@ -19,7 +18,7 @@ build:
requires_features:
blas: {{ blas_impl }}
run_exports:
- {{ pin_subpackage(name, max_pin='x.x.x') }}
- {{ pin_subpackage(name, max_pin='x.x') }}
requirements:
build:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment