diff options
Diffstat (limited to 'src/cudamatrix/cu-rand.h')
-rw-r--r-- | src/cudamatrix/cu-rand.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cudamatrix/cu-rand.h b/src/cudamatrix/cu-rand.h index 2c8204b6b..d999d6707 100644 --- a/src/cudamatrix/cu-rand.h +++ b/src/cudamatrix/cu-rand.h | |||
@@ -66,6 +66,15 @@ class CuRand { | |||
66 | #endif | 66 | #endif |
67 | } | 67 | } |
68 | 68 | ||
69 | // CAUTION. | ||
70 | // For the versions of these functions that output to a CuMatrix (as opposed to | ||
71 | // CuMatrixBase), the random numbers depend on the stride, and the stride | ||
72 | // is not guaranteed to be consistent for the same dimension of matrix | ||
73 | // (it usually will be, but not when memory is nearly exhausted). So | ||
74 | // for applications where consistency is essential, either use the versions | ||
75 | // of these function that accept CuMatrixBase, or initialize your matrix | ||
76 | // with the kStrideEqualNumCols argument to ensure consistent stride. | ||
77 | |||
69 | /// Fill with uniform [0..1] floats, | 78 | /// Fill with uniform [0..1] floats, |
70 | void RandUniform(CuMatrixBase<Real> *tgt); | 79 | void RandUniform(CuMatrixBase<Real> *tgt); |
71 | void RandUniform(CuMatrix<Real> *tgt); | 80 | void RandUniform(CuMatrix<Real> *tgt); |
@@ -89,4 +98,3 @@ class CuRand { | |||
89 | } // namsepace | 98 | } // namsepace |
90 | 99 | ||
91 | #endif // KALDI_CUDAMATRIX_CU_RAND_H_ | 100 | #endif // KALDI_CUDAMATRIX_CU_RAND_H_ |
92 | |||