File Reference
#include <iostream>
#include <vector>
#include <cstdlib>
#include "base/kaldi-common.h"
#include "util/common-utils.h"
#include "cudamatrix/cu-matrix.h"
#include "cudamatrix/cu-vector.h"
#include "cudamatrix/cu-math.h"
Include dependency graph for

Go to the source code of this file.


 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:


template<typename Real >
std::string NameOf ()
template<typename Real >
void TestCuVectorSoftmax (int32 dim)
template<typename Real >
void TestCuVectorSum (int32 dim)
template<typename Real , typename OtherReal >
void TestCuVectorCopyFromVec (int32 dim)
template<typename Real >
void TestCuVectorVecVecOne (int32 dim)
template<typename Real >
void TestCuVectorAddDiagMatMat (int32 dim, MatrixTransposeType transN, MatrixTransposeType transO)
template<typename Real >
void TestCuVectorAddDiagMat2OnVariousShapes (int32 dim, MatrixTransposeType trans)
template<typename Real >
void TestCuVectorAddDiagMat2 (int32 dim, MatrixTransposeType trans)
template<typename Real >
void TestCuVectorAddRowSumMat (int32 dim, MatrixTransposeType trans)
template<typename Real >
void TestCuVectorAddColSumMat (int32 dim, MatrixTransposeType trans)
template<typename Real >
void TestCuVectorApplyFloor (int32 dim)
template<typename Real >
void TestCuVectorApplyFloorNoCount (int32 dim)
template<typename Real >
void TestCuVectorApplyCeiling (int32 dim)
template<typename Real >
void TestCuVectorApplyCeilingNoCount (int32 dim)
template<typename Real >
void TestCuVectorAddDiagMatMatShape (int32 num_rows, int32 num_cols, MatrixTransposeType transM, MatrixTransposeType transN)
template<typename Real >
void CudaVectorSpeedTest ()
int main ()

Function Documentation

◆ main()

int main ( )

Definition at line 471 of file

References KALDI_LOG, KALDI_WARN, and kaldi::SetVerboseLevel().

471  {
473  //Select the GPU
474 #if HAVE_CUDA == 1
475  CuDevice::Instantiate().SelectGpuId("yes"); //-2 .. automatic selection
476 #endif
478  kaldi::CudaVectorSpeedTest<float>();
479 #if HAVE_CUDA == 1
480  if (CuDevice::Instantiate().DoublePrecisionSupported()) {
481  kaldi::CudaVectorSpeedTest<double>();
482  } else {
483  KALDI_WARN << "Double precision not supported";
484  }
485 #else
486  kaldi::CudaVectorSpeedTest<double>();
487 #endif
488  KALDI_LOG << "Tests succeeded.";
489 }
void SetVerboseLevel(int32 i)
This should be rarely used, except by programs using Kaldi as library; command-line programs set the ...
Definition: kaldi-error.h:64
#define KALDI_WARN
Definition: kaldi-error.h:150
#define KALDI_LOG
Definition: kaldi-error.h:153