@@ -73,6 +73,7 @@ Configuration options:
73
73
--cudatk-dir=DIR CUDA toolkit directory
74
74
--cuda-arch=FLAGS Override the default CUDA_ARCH flags. See:
75
75
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-examples.
76
+ --debug-level=N Use assertion level 0 (disabled), 1, or 2 [default=1]
76
77
--double-precision Build with BaseFloat set to double if yes [default=no],
77
78
mostly useful for testing purposes.
78
79
--static-fst Build with static OpenFst libraries [default=no]
@@ -739,6 +740,7 @@ ENV_LDFLAGS=$LDFLAGS
739
740
ENV_LDLIBS=$LDLIBS
740
741
741
742
# Default configuration
743
+ debug_level=1
742
744
double_precision=false
743
745
dynamic_kaldi=false
744
746
use_cuda=true
771
773
static_math=false;
772
774
static_fst=false;
773
775
shift ;;
776
+ --debug-level=* )
777
+ GetSwitchValueOrDie debug_level " $1 "
778
+ shift ;;
774
779
--double-precision)
775
780
double_precision=true;
776
781
shift ;;
901
906
esac
902
907
done
903
908
909
+ case " $debug_level " in
910
+ [012]) ;;
911
+ * ) failure " Invalid value --debug-level=$debug_level . Supported values are 0, 1, and 2." ;;
912
+ esac
913
+
904
914
# The idea here is that if you change the configuration options from using
905
915
# CUDA to not using it, or vice versa, we want to recompile all parts of the
906
916
# code that may use a GPU. Touching this file is a way to force this.
@@ -1033,6 +1043,7 @@ if $dynamic_kaldi ; then
1033
1043
echo " KALDI_FLAVOR := dynamic" >> kaldi.mk
1034
1044
echo " KALDILIBDIR := $KALDILIBDIR " >> kaldi.mk
1035
1045
fi
1046
+ echo " DEBUG_LEVEL = $debug_level " >> kaldi.mk
1036
1047
if $double_precision ; then
1037
1048
echo " DOUBLE_PRECISION = 1" >> kaldi.mk
1038
1049
else
0 commit comments