This file contains utilities for analyzing and checking computations, which are used in the optimization code. More...
Go to the source code of this file.
Classes | |
struct | CommandAttributes |
class | ComputationVariables |
This class relates the matrices and sub-matrices in the computation to imaginary "variables", such that we can think of the operations as operating on sets of individual variables, and we can then do analysis that lets us do optimization. More... | |
struct | Access |
struct | MatrixAccesses |
struct | Analyzer |
This struct exists to set up various pieces of analysis; it helps avoid the repetition of code where we compute all these things in sequence. More... | |
class | ComputationAnalysis |
This class performs various kinds of specific analysis on top of what class Analyzer gives you immediately. More... | |
struct | CheckComputationOptions |
class | ComputationChecker |
Namespaces | |
kaldi | |
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference: | |
kaldi::nnet3 | |
Enumerations | |
enum | AccessType { kReadAccess, kWriteAccess, kReadWriteAccess } |
Functions | |
void | PrintCommandAttributes (std::ostream &os, const std::vector< CommandAttributes > &attributes) |
This function is to be used in debugging; it produces human-readable output. More... | |
void | ComputeVariableAccesses (const ComputationVariables &variables, const std::vector< CommandAttributes > &command_attributes, std::vector< std::vector< Access > > *variable_accesses) |
After the command-level attributes have been computed, this function organizes them per variable (see class ComputationVariables for how a variable is defined; it is part of a matrix). More... | |
void | ComputeMatrixAccesses (const Nnet &nnet, const NnetComputation &computation, const ComputationVariables &variables, const std::vector< CommandAttributes > &command_attributes, std::vector< MatrixAccesses > *matrix_accesses) |
This function organizes information in the CommandAttributes in a way that is convenient to access per matrix. More... | |
void | PrintMatrixAccesses (std::ostream &os, const std::vector< MatrixAccesses > &matrix_accesses) |
This function is to be used in debugging; it produces human-readable output. More... | |
void | ComputeMatrixToSubmatrix (const NnetComputation &computation, std::vector< std::vector< int32 > > *mat_to_submat) |
This function computes a vector 'mat_to_submat', indexed by matrix index, such that (*mat_to_submat)[m] is a list of all the submatrix indexes that refer to matrix m. More... | |
int32 | MaxMemoryUsage (const NnetComputation &computation) |
Returns the total memory, in bytes, used by the computation (just the temporary memory, not counting the memory used by the nnet itself). More... | |
void | ComputeCommandAttributes (const Nnet &nnet, const NnetComputation &computation, const ComputationVariables &vars, std::vector< CommandAttributes > *attributes) |
void | GetCommandsOfType (const NnetComputation &computation, CommandType t, std::vector< int32 > *command_indexes) |
This utility function works out from a computation, the command-indexes of the commands of the given type. More... | |
void | CheckComputation (const Nnet &nnet, const NnetComputation &computation, bool check_rewrite=false) |
This is a convenience interface for class ComputationChecker. More... | |
int64 | GetMaxMemoryUse (const NnetComputation &computation) |
This file contains utilities for analyzing and checking computations, which are used in the optimization code.
Definition in file nnet-analyze.h.