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/10/07 22:01:45 UTC

[GitHub] [incubator-mxnet] Zha0q1 opened a new pull request #19313: Numpy vstack large tensor fix

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


   This pr fixes vstack against large tensors
   
   local run:
   ```
   ubuntu@ip-172-31-38-169:~/incubator-mxnet$ pytest tests/nightly/test_np_large_array.py::test_vstack
   /home/ubuntu/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
     return f(*args, **kwds)
   /home/ubuntu/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
     return f(*args, **kwds)
   /home/ubuntu/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
     return f(*args, **kwds)
   ================================================ 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, 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:92
     /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:92: DeprecationWarning: invalid escape sequence \ 
       '''
   
   tests/nightly/test_np_large_array.py:1231
     /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:1231: DeprecationWarning: invalid escape sequence \ 
       '''
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   ===================================== 1 passed, 2 warnings in 518.22s (0:08:38) ======
   ```


----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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


   Jenkins CI successfully triggered : [centos-gpu, unix-cpu]


----------------------------------------------------------------
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] sandeep-krishnamurthy merged pull request #19313: Numpy vstack large tensor fix

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


   


----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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


   @mxnet-bot run ci [centos-gpu, unix-cpu]


----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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


   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, sanity, miscellaneous, clang, unix-cpu, centos-cpu, edge, unix-gpu, centos-gpu, windows-cpu, windows-gpu]
   *** 
   _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] mxnet-bot commented on pull request #19313: Numpy vstack large tensor fix

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


   Jenkins CI successfully triggered : [centos-gpu, unix-cpu]


----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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






----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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



##########
File path: tests/nightly/test_np_large_array.py
##########
@@ -1874,3 +1873,24 @@ def test_cross():
     assert inp.grad[0, 0] == 1 and inp.grad[0, 1] == -1 and inp.grad[0, 2] == 0
     assert inp.grad[-1, 0] == 5 and inp.grad[-1, 1] == -4 and inp.grad[-1, 2] == -1
 
+
+@use_np
+def test_vstack():
+    inp1 = np.zeros((INT_OVERFLOW, 1))
+    inp2 = np.ones((INT_OVERFLOW, 1))
+    inp1.attach_grad()
+    inp2.attach_grad()
+    with mx.autograd.record():
+        out1 = np.vstack((inp1, inp2))
+        out1.backward()
+    assert out1.shape == (DOUBLE_INT_OVERFLOW, 1)
+    assert out1[INT_OVERFLOW-1, 0] == 0 and out1[-1, 0] == 1
+    assert inp1.grad.shape == inp1.shape
+    assert inp1.grad[-1, -1] == 1
+    with mx.autograd.record():
+        out2 = np.vstack((inp1.flatten(), inp2.flatten()))
+        out2.backward()
+    assert out2.shape == (2, INT_OVERFLOW)
+    assert out2[0, -1] == 0 and out2[1, -1] == 1
+    assert inp2.grad.shape == inp2.shape
+    assert inp2.grad[-1, -1] == 1

Review comment:
       New line ?




----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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


   Jenkins CI successfully triggered : [unix-cpu]


----------------------------------------------------------------
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 #19313: Numpy vstack large tensor fix

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


   @access2rohit @mseth10 can you 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] Zha0q1 commented on pull request #19313: Numpy vstack large tensor fix

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


   @mxnet-bot run ci [unix-cpu]


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