Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit ca99fdf

Browse files
committed
update comments and docs
1 parent 9826d25 commit ca99fdf

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/operator/linalg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void linalg_getri(const Tensor<xpu, 2, DType>& LU,
228228

229229
// Note that this function only implements GPU version with "getriBatched" in cuBLAS.
230230
// Unlike lapack routines in cpu, it is computed out-of-place, so the final matrix
231-
// inversion is stored in A.
231+
// inverse is stored in A.
232232
template<typename xpu, typename DType>
233233
void linalg_batch_getri(const Tensor<xpu, 3, DType>& A,
234234
const Tensor<xpu, 3, DType>& LU,
@@ -237,7 +237,7 @@ void linalg_batch_getri(const Tensor<xpu, 3, DType>& A,
237237

238238
//////////////////////////////// INVERSE ////////////////////////////////////////////
239239

240-
// CPU/GPU-versions of matrix inversion combining LAPACK function "getrf" and "getri"
240+
// CPU/GPU-versions of matrix inverse combining LAPACK function "getrf" and "getri"
241241
// Note that A = inverse(B)
242242
template<typename xpu, typename DType>
243243
void linalg_batch_inverse(const Tensor<xpu, 3, DType>& A,

src/operator/linalg_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ LINALG_GPU_BATCH_GETRI(DgetriBatched, double)
14291429

14301430
//////////////////////////////// INVERSE ////////////////////////////////////////////
14311431

1432-
// CPU/GPU-versions of matrix inversion combining LAPACK function "getrf" and "getri"
1432+
// CPU/GPU-versions of matrix inverse combining LAPACK function "getrf" and "getri"
14331433

14341434
// Note A = inverse(B)
14351435
#define LINALG_CPU_BATCH_INVERSE(xpu, DType) \
@@ -1490,7 +1490,7 @@ template<> inline \
14901490
void linalg_batch_inverse<xpu, DType>(const Tensor<xpu, 3, DType>& A, \
14911491
const Tensor<xpu, 3, DType>& B, \
14921492
const mxnet::OpContext& ctx) { \
1493-
LOG(FATAL) << "gpu matrix inversion requires CUDA version >= 8.0!"; \
1493+
LOG(FATAL) << "gpu matrix inverse requires CUDA version >= 8.0!"; \
14941494
}
14951495

14961496
#endif // CUDA_VERSION >= 8000
@@ -1552,7 +1552,7 @@ void linalg_batch_det_backward_helper<xpu, DType>(const Tensor<xpu, 3, DType>& L
15521552
const Tensor<xpu, 3, DType>& temp, \
15531553
const DType zero_det, \
15541554
const mxnet::OpContext& ctx) { \
1555-
LOG(FATAL) << "gpu matrix inversion requires CUDA version >= 8.0!"; \
1555+
LOG(FATAL) << "gpu matrix inverse requires CUDA version >= 8.0!"; \
15561556
}
15571557

15581558
#endif // CUDA_VERSION >= 8000

src/operator/tensor/la_op.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,11 +959,11 @@ for all inputs (batch mode).
959959
960960
Examples::
961961
962-
Single matrix inversion
962+
Single matrix determinant
963963
A = [[1., 4.], [2., 3.]]
964964
det(A) = [-5.]
965965
966-
Batch matrix inversion
966+
Batch matrix determinant
967967
A = [[[1., 4.], [2., 3.]],
968968
[[2., 3.], [1., 4.]]]
969969
det(A) = [-5., 5.]
@@ -1009,13 +1009,13 @@ for all inputs (batch mode).
10091009
10101010
Examples::
10111011
1012-
Single matrix inversion
1012+
Single matrix signed log determinant
10131013
A = [[2., 3.], [1., 4.]]
10141014
sign, logabsdet = slogdet(A)
10151015
sign = [1.]
10161016
logabsdet = [1.609438]
10171017
1018-
Batch matrix inversion
1018+
Batch matrix signed log determinant
10191019
A = [[[2., 3.], [1., 4.]],
10201020
[[1., 2.], [2., 4.]],
10211021
[[1., 2.], [4., 3.]]]

0 commit comments

Comments
 (0)