MatrixAccesses Struct Reference

#include <nnet-analyze.h>

Collaboration diagram for MatrixAccesses:

Public Member Functions

 MatrixAccesses ()
 

Public Attributes

int32 allocate_command
 Index of the command that allocates the matrix (which will be of type kAllocMatrix or kSwapMatrix), or -1 if the command doesn't exist (e.g. More...
 
int32 deallocate_command
 Index of the command that deallocates the matrix (which will be of type kDeallocMatrix or kSwapMatrix), or -1 if never gets deallocated (e.g. More...
 
std::vector< Accessaccesses
 Records the indexes of commands that access the matrix, and the type (read, read/write, write). More...
 
bool is_input
 true if this matrix is an input to the computation (i.e. More...
 
bool is_output
 true if this matrix is an output of the computation (i.e. More...
 

Detailed Description

Definition at line 249 of file nnet-analyze.h.

Constructor & Destructor Documentation

◆ MatrixAccesses()

MatrixAccesses ( )
inline

Definition at line 271 of file nnet-analyze.h.

References kaldi::nnet3::ComputeMatrixAccesses(), and kaldi::nnet3::PrintMatrixAccesses().

272  is_input(false), is_output(false) { }
bool is_output
true if this matrix is an output of the computation (i.e.
Definition: nnet-analyze.h:270
int32 deallocate_command
Index of the command that deallocates the matrix (which will be of type kDeallocMatrix or kSwapMatrix...
Definition: nnet-analyze.h:257
int32 allocate_command
Index of the command that allocates the matrix (which will be of type kAllocMatrix or kSwapMatrix)...
Definition: nnet-analyze.h:253
bool is_input
true if this matrix is an input to the computation (i.e.
Definition: nnet-analyze.h:267

Member Data Documentation

◆ accesses

std::vector<Access> accesses

Records the indexes of commands that access the matrix, and the type (read, read/write, write).

It will be sorted on command index with only one record per command. Note: a write to only a part of the matrix (i.e. a submatrix that isn't the whole thing) will be recorded as an access of type read/write. Input commands are considered writes, but allocation and swap commands (which do not set up any values) are not.

Definition at line 264 of file nnet-analyze.h.

Referenced by ComputationChecker::CheckComputationCompression(), ComputationChecker::CheckComputationMatrixAccesses(), kaldi::nnet3::MatrixIsUnused(), kaldi::nnet3::MoveSizingCommands(), kaldi::nnet3::PrintMatrixAccesses(), kaldi::nnet3::RemoveCommandsForUnusedMatrix(), and kaldi::nnet3::RemoveUnnecessaryZeroing().

◆ allocate_command

int32 allocate_command

Index of the command that allocates the matrix (which will be of type kAllocMatrix or kSwapMatrix), or -1 if the command doesn't exist (e.g.

it is an input).

Definition at line 253 of file nnet-analyze.h.

Referenced by ComputationChecker::CheckComputationMatrixAccesses(), kaldi::nnet3::MoveSizingCommands(), kaldi::nnet3::PrintMatrixAccesses(), and kaldi::nnet3::RemoveCommandsForUnusedMatrix().

◆ deallocate_command

int32 deallocate_command

Index of the command that deallocates the matrix (which will be of type kDeallocMatrix or kSwapMatrix), or -1 if never gets deallocated (e.g.

it is an output).

Definition at line 257 of file nnet-analyze.h.

Referenced by ComputationChecker::CheckComputationMatrixAccesses(), kaldi::nnet3::MoveSizingCommands(), kaldi::nnet3::PrintMatrixAccesses(), and kaldi::nnet3::RemoveCommandsForUnusedMatrix().

◆ is_input

bool is_input

true if this matrix is an input to the computation (i.e.

either an input-value or an output-deriv).

Definition at line 267 of file nnet-analyze.h.

Referenced by ComputationChecker::CheckComputationMatrixAccesses(), kaldi::nnet3::MatrixIsUnused(), VariableMergingOptimizer::MayBeMerged(), and DerivativeTimeLimiter::PruneMatrices().

◆ is_output

bool is_output

true if this matrix is an output of the computation (i.e.

either an output-value or an input-deriv).

Definition at line 270 of file nnet-analyze.h.

Referenced by kaldi::nnet3::MatrixIsUnused(), VariableMergingOptimizer::MayBeMerged(), DerivativeTimeLimiter::PruneMatrices(), and kaldi::nnet3::RemoveUnnecessaryZeroing().


The documentation for this struct was generated from the following file: