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

Fix linalg_potri and linalg_potrf operators for large tensor. #18752

Merged
merged 9 commits into from
Jul 24, 2020
2 changes: 1 addition & 1 deletion src/operator/tensor/la_op-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using namespace mshadow;
// Copies lower/upper triangular part to upper/lower, i.e. to the opposite side.
struct CopyTriangularToOppositeSide {
template<typename DType>
MSHADOW_XINLINE static void Map(int i, int matrix_size, int stride, DType* data, bool to_lower) {
MSHADOW_XINLINE static void Map(int i, size_t matrix_size, int stride, DType* data, bool to_lower) {
josephevans marked this conversation as resolved.
Show resolved Hide resolved
// Below computation works even when we are dealing with a batch of matrices.
const int row((i % matrix_size) / stride), col(i % stride);
josephevans marked this conversation as resolved.
Show resolved Hide resolved
if (row > col) {
Expand Down