Skip to content

Commit f4d8b23

Browse files
committed
sandbox/dan2: Adding TODO items.
git-svn-id: https://svn.code.sf.net/p/kaldi/code/sandbox/dan2@3007 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
1 parent 2f29a0c commit f4d8b23

1 file changed

Lines changed: 30 additions & 4 deletions

File tree

src/TODO

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,37 @@
11

2-
(A)
3-
I have something else that would be useful for someone to do. I don't anymore want the function "CopyToMat", that copies from CUDA to regular matrix, to exist. I want the "CopyFromMat" function of Matrix to have this functionality. (it already exists but just calls CopyToMat; the implementation should be put directly in CopyFromMat, and the implementation should be done in cu-matrix.cc even though it's a member-function of MatrixBase<Real>.). The same change should be done in the other classes, e.g. vector, spmatrix, packedmatrix, tpmatrix, if applicable. Make sure the whole Kaldi project compiles and tests.
4-
5-
CopyToMat was originally introduced because I didn't want the Matrix classes to "know about" the cudamatrix/ directory, for dependency reasons, but I got around the problem by putting forward declarations of the Cu* classes in the matrix/ dir, and declaring the corresponding methods in the Matrix dir but implementing them in cudamatrix/. So now there is no need for CopyToMat.
2+
- To Matrix and CuMatrix, add a function
63

4+
(A)
5+
Need to improve the efficiency of
6+
(i) TraceMatMat (for CuMatrix)
7+
(ii) CuMatrix::AddDiagMatMat
8+
(iii) CuVector::Sum();
79

810
(B)
11+
12+
// Make a matrix symmetric by either copying the lower to upper triangle
13+
// copying upper to lower, taking the mean, or taking the mean and checking
14+
// it was already almost symmetric. You can test it by making sure that
15+
// it behaves the same as the SpMatrix CopyFromMat function, e.g. first
16+
// calling Symmetrize with a particular argument "t" and then creating an SpMatrix
17+
// from the matrix with kTakeMeanAndCheck, should give the same result as
18+
// initializing the SpMatrix with the original matrix and "t". kTakeMeanAndCheck
19+
// means set to the mean, but check they were approximately equal; see the SpMatrix
20+
// code for how to implement it (in fact, the code can be based on the same code
21+
// in SpMatrix::CopyFrommat).
22+
void Symmetrize(SpCopyType symmetrize_type);
23+
24+
// This function should call dsymm (it can, arbitrarily, add to the lower triangle),
25+
// and then Symmetrize(kTakeLower). Before calling dsymm we should check that
26+
// the original matrix is approximately symmetric: we can do #ifdef KALDI_PARANOID,
27+
// Symmetrize(kTakeMeanAndCheck). #endif.
28+
void SymmetricAddMatMat(Real alpha, const Matrix<Real> &A, MatrixTransposeType transA,
29+
const Matrix<Real> &B, MatrixTransposeType transB, Real beta);
30+
31+
32+
33+
34+
(C)
935
The functions in CuMath.h that say "this needs documentation" need documentation
1036
(i.e. comments saying what the functions do). Someone would need to look at
1137
the code and figure out what the functions do (it's not my code). Please look

0 commit comments

Comments
 (0)