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/17 08:01:16 UTC

[GitHub] [incubator-mxnet] mseth10 opened a new pull request #18744: add linalg large matrix tests

mseth10 opened a new pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744


   ## Description ##
   Add large matrix tests for the following linear algebra ops: det, inverse, trsm, trmm


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459758058



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       an alternative would be to test (1,large,large) plus (2,small,small). I still think testing (2,large,large) is too time consuming




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] ChaiBapchya edited a comment on pull request #18744: [v1.x] add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
ChaiBapchya edited a comment on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663652172


   Also I don't see a `out.backward()` invocation. How are the gradients been tested? @mseth10 


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #18744: add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663182487


   @access2rohit please review


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664057824


   Jenkins CI successfully triggered : [unix-gpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] access2rohit commented on pull request #18744: add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
access2rohit commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663186518


   > The nightly large tensor tests are already broken: http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/NightlyTestsForBinaries/detail/master/752/pipeline/96
   > 
   > Adding more tests may not help. Should they be fixed and enabled as part of the PR runs? As this will become a default feature, I don't think testing nightly is sufficient (especially as the test only runs 30min).
   
   @leezu This is currently for MXnet1.x branch and not master. For master more tests will be added. In the meantime since we are removing NDarray's completely it makes sense to disabled them from nightly.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459755856



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       yes, this is for invoking the batch version of the same operator




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ChaiBapchya commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663652172


   Also I don't see a out.backward() invocation. How are the gradients been tested? @mseth10 


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459761072



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       yes




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663918134


   I see missing shape checks ... rest LGTM!


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664035888


   Jenkins CI successfully triggered : [unix-gpu]


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663292307


   @access2rohit made the changes, can you please approve


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459757005



##########
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:
       (1,70k,70k) should invoke the batch version of the operator just (2,70k,70k), and essentially the batch version is just iterating the first dimension and calling the single-matrix version of the operator. The latter will take 2x time which is in my case > 40 mins. Given the number of operators that can be a huge waste




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459703909



##########
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:
       I would think so. But to say 100% we would probably need to use GDB to see which function it steps into. In my case tho there is only operator for batch_syrk, not single-matrix syrk




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] access2rohit edited a comment on pull request #18744: [v1.x] add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
access2rohit edited a comment on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663918134


   I see missing shape checks, can you add them? ... rest LGTM!


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459693091



##########
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:
       @Zha0q1 good idea. Does adding an additional dimension effectively calls all the batch functions we wish to test i.e., there is no difference between the functions called for (1,70k,70k) vs (2,70k,70k) ?




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r460454769



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,76 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def batchify(mat):
+        mat_np = mat.asnumpy()
+        return nd.array([mat_np, mat_np])
+
+    def check_diag(mat, val):
+        for i in range(LARGE_SQ_X):
+            assert mat[i, i] == val
+
+    def check_batch_diag(mat, val):
+        check_diag(mat[0], val)
+        check_diag(mat[1], val)
+
+    def run_det(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = det(inp)
+        return inp.grad, out
+
+    def run_inverse(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = inverse(inp)
+        return inp.grad, out
+
+    def run_trmm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trmm(inp, inp)
+        return inp.grad, out
+
+    def run_trsm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trsm(inp, inp)

Review comment:
       Added namespace




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663941177


   LGTM thanks Manu for the tweaks


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459672273



##########
File path: tests/nightly/test_large_array.py
##########
@@ -37,6 +37,7 @@
 LARGE_X = 100000000
 SMALL_X = 100
 SMALL_Y = 50
+LARGE_SQ_X = 80000

Review comment:
       Can we make this  70k instead that will still lead to 4.9 Billion elements and still greater then 4.3 Billion elements. This way it will take little less time 




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663997058


   > I see missing shape checks, can you add them? ... rest LGTM!
   
   Added shape checks. Can you please approve? @access2rohit 


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664035682


   > @mseth10 Did you run the tests again after making these changes ? Did they all pass ?
   
   Yes @access2rohit 


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459766439



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def get_large_identity_mat():

Review comment:
       done




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] leezu commented on pull request #18744: add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
leezu commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-660245190


   The nightly large tensor tests are already broken: http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/NightlyTestsForBinaries/detail/master/752/pipeline/96
   
   Adding more tests may not help. Should they be fixed and enabled as part of the PR runs? As this will become a default feature, I don't think testing nightly is sufficient (especially as the test only runs 30min).


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459754090



##########
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:
       @mseth10  and @Zha0q1  atleast run it for 2 batches. (2,70k,70k) would be better




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663914422


   > Also I don't see a `out.backward()` invocation. How are the gradients been tested? @mseth10
   
   Added backward invocation @ChaiBapchya 


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459794393



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       added batch test for (2,x,x)




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #18744: add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-659942900


   Hey @mseth10 , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [windows-gpu, centos-cpu, sanity, unix-cpu, miscellaneous, edge, website, windows-cpu, centos-gpu, unix-gpu, clang]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ChaiBapchya commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r460144619



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,76 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def batchify(mat):
+        mat_np = mat.asnumpy()
+        return nd.array([mat_np, mat_np])
+
+    def check_diag(mat, val):
+        for i in range(LARGE_SQ_X):
+            assert mat[i, i] == val
+
+    def check_batch_diag(mat, val):
+        check_diag(mat[0], val)
+        check_diag(mat[1], val)
+
+    def run_det(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = det(inp)
+        return inp.grad, out
+
+    def run_inverse(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = inverse(inp)
+        return inp.grad, out
+
+    def run_trmm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trmm(inp, inp)
+        return inp.grad, out
+
+    def run_trsm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trsm(inp, inp)

Review comment:
       I don't see `trsm`/`inverse`/`det`/`trmm` or any of these ops being imported from `mx.nd.linalg` namespace.
   How is it being accessed? Do these tests work? Can you please paste the results?




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 edited a comment on pull request #18744: [v1.x] add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
mseth10 edited a comment on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663914361


   All unit tests pass. Here are the results using pytest:
   
   ```
   >>> pytest tests/nightly/test_large_array.py::test_linalg
   ================================================================================= test session starts =================================================================================
   platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
   rootdir: /home/ubuntu/incubator-mxnet
   plugins: remotedata-0.3.2, openfiles-0.4.0, astropy-header-0.1.2, hypothesis-5.8.3, arraydiff-0.3, doctestplus-0.5.0
   collected 1 item                                                                                                                                                                      
   
   tests/nightly/test_large_array.py .                                                                                                                                             [100%]
   
   ================================================================================== warnings summary ===================================================================================
   python/mxnet/contrib/onnx/mx2onnx/_op_translations.py:67
     /home/ubuntu/incubator-mxnet/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py:67: DeprecationWarning: invalid escape sequence \(
       tuple_re = re.compile('\([0-9L|,| ]+\)')
   
   /home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12
     /home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
       from imp import find_module, load_module, acquire_lock, release_lock
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   ===================================================================== 1 passed, 2 warnings in 8859.56s (2:27:39) ======================================================================
   ```


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459756628



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       Atleast run it 2 times. Make it (2,x,x) then so we know multiple batches are indeed running and check 1 value within each batch section




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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,80000,80000)




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459755438



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       I didn't understand the purpose does it convert your tensor (x,x) -> (1,x,x) ?




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459755438



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       i didn't understand the purpose does it make yoour tensor (x,x) -> (1,x,x)

##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       I didn't understand the purpose does it make yoour tensor (x,x) -> (1,x,x)




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459680608



##########
File path: tests/nightly/test_large_array.py
##########
@@ -37,6 +37,7 @@
 LARGE_X = 100000000
 SMALL_X = 100
 SMALL_Y = 50
+LARGE_SQ_X = 80000

Review comment:
       done!




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] access2rohit edited a comment on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
access2rohit edited a comment on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664024126


   @mseth10 Did you run the tests again after making these changes ? Did they all pass ?


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664057813


   @mxnet-bot run ci [unix-gpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664035879


    @mxnet-bot run ci [unix-gpu]


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459756628



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       Atleast run it 2 times. Make it (2,x,x) then 




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ChaiBapchya commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r460149896



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,76 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def batchify(mat):
+        mat_np = mat.asnumpy()
+        return nd.array([mat_np, mat_np])
+
+    def check_diag(mat, val):
+        for i in range(LARGE_SQ_X):
+            assert mat[i, i] == val
+
+    def check_batch_diag(mat, val):
+        check_diag(mat[0], val)
+        check_diag(mat[1], val)
+
+    def run_det(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = det(inp)
+        return inp.grad, out
+
+    def run_inverse(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = inverse(inp)
+        return inp.grad, out
+
+    def run_trmm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trmm(inp, inp)
+        return inp.grad, out
+
+    def run_trsm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trsm(inp, inp)

Review comment:
       You can run these tests with
   ```
   pytest tests/nightly/test_large_array.py::<insert function_name>
   ```




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459794244



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,74 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def batchify(mat):
+        return nd.array([mat.asnumpy()])
+
+    def check_diag(mat, val):
+        for i in range(LARGE_SQ_X):
+            assert mat[i, i] == val
+
+    def check_batch_diag(mat, val):
+        check_diag(mat[0], val)
+
+    def run_det(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = det(inp)
+        return inp.grad, out
+
+    def run_inverse(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = inverse(inp)
+        return inp.grad, out
+
+    def run_trmm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trmm(inp, inp)
+        return inp.grad, out
+
+    def run_trsm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trsm(inp, inp)
+        return inp.grad, out
+
+    A = get_large_identity_mat(LARGE_SQ_X)

Review comment:
       done




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] ChaiBapchya commented on pull request #18744: add linalg large matrix tests

Posted by GitBox <gi...@apache.org>.
ChaiBapchya commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-662114715


   1.x edge pipeline will be fixed in this cherrypick https://github.com/apache/incubator-mxnet/pull/18742
   It includes #18713 that solves the cuda issue in nvidia jetson.
   Once my PR is merged, pl rebase.
   
   Ofcourse, we have to decide if LT tests are to be included in per CI test alongside nightly.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459777209



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       @mseth10 That's the whole point, since we are testing for Large Tensors. @Zha0q1 (2, small, small) is not our use case to be tested in the first place 




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459778048



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,74 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def batchify(mat):
+        return nd.array([mat.asnumpy()])
+
+    def check_diag(mat, val):
+        for i in range(LARGE_SQ_X):
+            assert mat[i, i] == val
+
+    def check_batch_diag(mat, val):
+        check_diag(mat[0], val)
+
+    def run_det(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = det(inp)
+        return inp.grad, out
+
+    def run_inverse(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = inverse(inp)
+        return inp.grad, out
+
+    def run_trmm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trmm(inp, inp)
+        return inp.grad, out
+
+    def run_trsm(inp):
+        inp.attach_grad()
+        with mx.autograd.record():
+            out = trsm(inp, inp)
+        return inp.grad, out
+
+    A = get_large_identity_mat(LARGE_SQ_X)

Review comment:
       
   
   You need to import it in this file now, since you have moved it to test_utils.py
   




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] access2rohit commented on pull request #18744: [v1.x] add large matrix tests for linalg ops: det, inverse, trsm, trmm

Posted by GitBox <gi...@apache.org>.
access2rohit commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-664024126


   @mseth10 Did you run the tests again ?


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#issuecomment-663914361


   Here are the test results:
   
   ```
   >>> pytest tests/nightly/test_large_array.py::test_linalg
   ================================================================================= test session starts =================================================================================
   platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
   rootdir: /home/ubuntu/incubator-mxnet
   plugins: remotedata-0.3.2, openfiles-0.4.0, astropy-header-0.1.2, hypothesis-5.8.3, arraydiff-0.3, doctestplus-0.5.0
   collected 1 item                                                                                                                                                                      
   
   tests/nightly/test_large_array.py .                                                                                                                                             [100%]
   
   ================================================================================== warnings summary ===================================================================================
   python/mxnet/contrib/onnx/mx2onnx/_op_translations.py:67
     /home/ubuntu/incubator-mxnet/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py:67: DeprecationWarning: invalid escape sequence \(
       tuple_re = re.compile('\([0-9L|,| ]+\)')
   
   /home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12
     /home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
       from imp import find_module, load_module, acquire_lock, release_lock
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   ===================================================================== 1 passed, 2 warnings in 8859.56s (2:27:39) ======================================================================
   ```


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459708065



##########
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:
       yeah, I checked the code. It just loops over the first dimension, so should be the same




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459764052



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ 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(mat):

Review comment:
       @access2rohit checking values is not the time consuming step here. We will hardly save time by just checking for a single value. The major time taking step is the operator itself, which runs twice for the same input in case of (2,x,x). 




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
access2rohit commented on a change in pull request #18744:
URL: https://github.com/apache/incubator-mxnet/pull/18744#discussion_r459754766



##########
File path: tests/nightly/test_large_array.py
##########
@@ -1168,6 +1169,80 @@ def check_correctness(mxnet_op, numpy_op, atol=1e-3):
     check_binary_broadcast()
 
 
+def test_linalg():
+    def get_large_identity_mat():

Review comment:
       this is a helper function can we move it to test_utils.py like this: https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/test_utils.py#L381
   




----------------------------------------------------------------
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