From 1a97e58ffa40962dd49d1baf67d66418a6450089 Mon Sep 17 00:00:00 2001 From: Fan Date: Thu, 15 Aug 2019 16:47:47 +0800 Subject: [PATCH] add comments for the tricky block matrix multiplication --- src/operator/numpy/linalg/np_gesvd-inl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/operator/numpy/linalg/np_gesvd-inl.h b/src/operator/numpy/linalg/np_gesvd-inl.h index efcc65ae3f47..7ce3078dae66 100644 --- a/src/operator/numpy/linalg/np_gesvd-inl.h +++ b/src/operator/numpy/linalg/np_gesvd-inl.h @@ -236,6 +236,7 @@ struct gesvd_backward { // G3: gemm::op(tempM, V, dA, DType(1.0), DType(1.0), false, false, s); + // dA <- dot(UT, dA). Loop over (k, m, m) blocks to avoid large temporary memory for (int i = 0; i < n; i += m) { int ncols = n - i < m ? n - i : m; Tensor t = Tensor(dA.dptr_ + i,