Google Code Block

2018年4月24日

Switch CUDA between (8.0 / 9.0 / 9.1) quickly with bash script

Download bash script : switch_cuda.sh


#!/bin/bash
echo "------------- Current Cuda Version -------------"
nvcc --version
NVCC_VER="$(nvcc --version)"
NVCC_VER_D=$(echo $NVCC_VER | cut -d',' -f 3,4)
echo ""
echo "Cuda ="$NVCC_VER_D
V91="V9.1"
V90="V9.0"
V80="V8.0"
current_ver=""
if [[ $NVCC_VER_D == *"$V90"* ]]; then
read -p "Switch to (8.0 / 9.1) ? " tar_cuda_ver
current_ver="9.0"
elif [[ $NVCC_VER_D == *"$V80"* ]]; then
read -p "Switch to (9.0 / 9.1) ? " tar_cuda_ver
current_ver="8.0"
elif [[ $NVCC_VER_D == *"$V91"* ]]; then
read -p "Switch to (8.0 / 9.0) ? " tar_cuda_ver
current_ver="9.1"
fi
CUDA_PATH="/usr/local/cuda-"$tar_cuda_ver
if [ -d $CUDA_PATH ]; then
full_tar_ver=V$tar_cuda_ver
if [[ $NVCC_VER_D == *"$full_tar_ver"* ]]; then
echo "You are already in use of Cuda"$NVCC_VER_D
else
echo "Switching to Cuda "$full_tar_ver" ..."
sudo ln -sfn $CUDA_PATH /usr/local/cuda
echo "Switch to Cuda" $tar_cuda_ver " Success !!"
fi
else
echo "Incorrect Cuda Version "$tar_cuda_ver
fi
echo ""
echo "------------- Current Cuda Version -------------"
nvcc --version


ps. Tensorflow Version Sheet
VersioncuDNNCUDA
tensorflow_gpu-1.7.079
tensorflow_gpu-1.6.079
tensorflow_gpu-1.5.079
tensorflow_gpu-1.4.068
tensorflow_gpu-1.3.068
tensorflow_gpu-1.2.05.18
tensorflow_gpu-1.1.05.18
tensorflow_gpu-1.0.05.18

2018年4月9日

Setting up Sclite for Linux ( sclite Version: 2.10, SCTK Version: 1.3 )

Download the prebuilt Sclite 2.10 binary for linux
(Build Environment : Ubuntu 16.04 @ x86_64)

or Build Sclite
1. Go to the SCTK website and download SCKT
sctk-2.4.10-20151007-1312Z.tar.bz2

2. Extract and build
make config
make all

3. Test Sclite
sclite -h csrnab.hyp -r csrnab.ref -i wsj

sclite -h tests.hyp -r tests.ref -i spu_id

4. Success :)


Reference

  1. NIST:https://www.nist.gov/itl/iad/mig/tools
  2. Sclite Commandline Options http://www1.icsi.berkeley.edu/Speech/docs/sctk-1.2/options.htm#options_name_0
  3. Sclite Intro http://www1.icsi.berkeley.edu/Speech/docs/sctk-1.2/sclite.htm
  4. Speech Recognition – Setting up sclite word alignment:http://mariangemarcano.blogspot.tw/2012/09/speech-recognition-setting-up-sclite.html
  5. using slcite:http://troylee2008.blogspot.tw/2010/03/using-sclite.html
  6. How to compile and install NIST Scoring Toolkit (SCTK) on Red Hat Enterprise Linux (RHEL) 7.2 http://ellismis.com/2016/10/15/how-to-compile-and-install-nist-scoring-toolkit-sctk-on-red-hat-enterprise-linux-rhel-7-2/