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/12/02 21:04:59 UTC

[GitHub] [incubator-mxnet] Zha0q1 opened a new pull request #19617: large tensor tests batch 6

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


   These tests are dependent on ilp64 blas so we need to merge https://github.com/apache/incubator-mxnet/pull/19174 first


----------------------------------------------------------------
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 merged pull request #19617: large tensor tests batch 6

Posted by GitBox <gi...@apache.org>.
Zha0q1 merged pull request #19617:
URL: https://github.com/apache/incubator-mxnet/pull/19617


   


----------------------------------------------------------------
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 #19617: large tensor tests batch 6

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


   tests are verified locally, sample result:
   
   ```
   ubuntu@ip-172-31-38-169:~/myspace$ pytest tests/nightly/test_np_large_array.py::test_dot
   =============================================== test session starts ===============================================
   platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
   rootdir: /home/ubuntu/myspace, inifile: pytest.ini
   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_np_large_array.py .                                                                      [100%]
   
   ================================================ warnings summary =================================================
   tests/nightly/test_np_large_array.py:91
     /home/ubuntu/myspace/tests/nightly/test_np_large_array.py:91: DeprecationWarning: invalid escape sequence \ 
       '''
   
   tests/nightly/test_np_large_array.py:1321
     /home/ubuntu/myspace/tests/nightly/test_np_large_array.py:1321: DeprecationWarning: invalid escape sequence \ 
       '''
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   ========================================= 1 passed, 2 warnings in 15.38s =========================================
   ```


----------------------------------------------------------------
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 #19617: large tensor tests batch 6

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



##########
File path: tests/nightly/test_np_large_array.py
##########
@@ -2345,3 +2355,209 @@ def test_insert():
     assert out[0, 1] == 1 and out[-1, 1] == 2
     assert out2[1] == 5 and out2[2] == 6
     assertRaises(MXNetError, np.insert, arr=inp3, obj=np.array([2, 2], dtype=np.int64), values=np.array([5, 6]))
+
+
+@use_np
+def test_moveaxis():
+    inp = np.zeros((2, 1, INT_OVERFLOW))
+    inp[0, 0, -1], inp[1, 0, -1] = 1, 2
+    inp.attach_grad()
+    with mx.autograd.record():
+        out = np.moveaxis(inp, 2, 0)
+        out.backward()
+    assert out.shape == (INT_OVERFLOW, 2, 1)
+    assert out[-1, 0, 0] == 1 and out[-1, 1, 0] == 2
+    assert inp.grad.shape == inp.shape
+    assert inp.grad[-1, -1, -1] == 1
+
+
+@use_np
+def test_newaxis():
+    inp = np.zeros((2, INT_OVERFLOW))
+    inp[-1, -1] = 1
+    out1 = inp[np.newaxis, :, :]
+    assert out1.shape == (1, 2, INT_OVERFLOW)
+    assert out1[0, -1, -1] == 1
+    out1 = out1[:, :, :, np.newaxis]
+    assert out1.shape == (1, 2, INT_OVERFLOW, 1)
+    assert out1[0, -1, -1, 0] == 1
+
+
+@use_np
+def test_triu_indices():
+    N = 2**16
+    data = np.triu_indices(N, 1)
+    assert data[0].shape == (((1 + (N-1)) * (N-1) / 2), )
+    assert data[0][-1] == N - 2 and data[1][-1] == N - 1
+
+
+@use_np
+def test_triu_indices_from():
+    N = 2**16
+    arr = np.zeros((N, N))
+    data = np.triu_indices_from(arr, 1)
+    assert data[0].shape == (((1 + (N-1)) * (N-1) / 2), )
+    assert data[0][-1] == N - 2 and data[1][-1] == N - 1
+
+
+@use_np
+def test_empty():
+    data = np.empty((2, INT_OVERFLOW), dtype='float64')
+    data = data + 1
+    assert data.shape == (2, INT_OVERFLOW)
+    assert data[-1, -1] == 1
+
+
+@use_np
+def test_shape_reshape():
+    inp = np.zeros((2, INT_OVERFLOW))
+    inp[0, -1] = 1
+    npx.waitall()

Review comment:
       And here ?




----------------------------------------------------------------
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 #19617: large tensor tests batch 6

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



##########
File path: tests/nightly/test_np_large_array.py
##########
@@ -2345,3 +2355,210 @@ def test_insert():
     assert out[0, 1] == 1 and out[-1, 1] == 2
     assert out2[1] == 5 and out2[2] == 6
     assertRaises(MXNetError, np.insert, arr=inp3, obj=np.array([2, 2], dtype=np.int64), values=np.array([5, 6]))
+
+
+@use_np
+def test_moveaxis():
+    inp = np.zeros((2, 1, INT_OVERFLOW))
+    inp[0, 0, -1], inp[1, 0, -1] = 1, 2
+    inp.attach_grad()
+    with mx.autograd.record():
+        out = np.moveaxis(inp, 2, 0)
+        out.backward()
+    assert out.shape == (INT_OVERFLOW, 2, 1)
+    assert out[-1, 0, 0] == 1 and out[-1, 1, 0] == 2
+    assert inp.grad.shape == inp.shape
+    assert inp.grad[-1, -1, -1] == 1
+
+
+@use_np
+def test_newaxis():
+    inp = np.zeros((2, INT_OVERFLOW))
+    inp[-1, -1] = 1
+    out1 = inp[np.newaxis, :, :]
+    assert out1.shape == (1, 2, INT_OVERFLOW)
+    assert out1[0, -1, -1] == 1
+    out1 = out1[:, :, :, np.newaxis]
+    assert out1.shape == (1, 2, INT_OVERFLOW, 1)
+    assert out1[0, -1, -1, 0] == 1
+
+
+@use_np
+def test_triu_indices():
+    N = 2**16
+    data = np.triu_indices(N, 1)
+    assert data[0].shape == (((1 + (N-1)) * (N-1) / 2), )
+    assert data[0][-1] == N - 2 and data[1][-1] == N - 1
+
+
+@use_np
+def test_triu_indices_from():
+    N = 2**16
+    arr = np.zeros((N, N))
+    data = np.triu_indices_from(arr, 1)
+    assert data[0].shape == (((1 + (N-1)) * (N-1) / 2), )
+    assert data[0][-1] == N - 2 and data[1][-1] == N - 1
+
+
+@use_np
+def test_empty():
+    data = np.empty((2, INT_OVERFLOW), dtype='float64')
+    data = data + 1
+    assert data.shape == (2, INT_OVERFLOW)
+    assert data[-1, -1] == 1
+
+
+@use_np
+def test_shape_reshape():
+    inp = np.zeros((2, INT_OVERFLOW))
+    inp[0, -1] = 1
+    npx.waitall()
+    assert np.shape(inp) == (2, INT_OVERFLOW)
+    out = np.reshape(inp, (INT_OVERFLOW, 2))
+    npx.waitall()

Review comment:
       why do we need waitall() here ?




----------------------------------------------------------------
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 #19617: large tensor tests batch 6

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


   Hey @Zha0q1 , 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**: [website, centos-gpu, unix-gpu, sanity, windows-gpu, miscellaneous, unix-cpu, clang, centos-cpu, windows-cpu, edge]
   *** 
   _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