You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/07/23 19:50:06 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #18744: [v1.x] add linalg large matrix tests

Zha0q1 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459688649



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,83 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def get_large_identity_mat():
+        A = nd.zeros((LARGE_SQ_X, LARGE_SQ_X))
+        for i in range(LARGE_SQ_X):
+            A[i,i] = 1
+        return A
+
+    def batchify(A):
+        A_np = A.asnumpy()
+        B = nd.array([A_np, A_np])

Review comment:
       instead of duplicating the matrix maybe you can just add an additional dimension by [A_np]. In my test I originally did [matrix1, matrix2] but this effectively doubled the runtime so in the end I used just [matrix] with shape (1,8000,8000)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org