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/09 21:11:01 UTC

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

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


   This pr fixes numpy take against large tensors


----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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


   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**: [unix-cpu, windows-cpu, windows-gpu, sanity, centos-cpu, edge, centos-gpu, clang, unix-gpu, website, miscellaneous]
   *** 
   _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] Zha0q1 commented on pull request #19325: Numpy take large tensor fix

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


   @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] Zha0q1 merged pull request #19325: Numpy take large tensor fix

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


   


----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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


   just re run the tests
   ```
   ubuntu@ip-172-31-38-169:~/myspace$ pytest tests/nightly/test_np_large_array.py::test_take
   ============================================== 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:1322
     /home/ubuntu/myspace/tests/nightly/test_np_large_array.py:1322: DeprecationWarning: invalid escape sequence \ 
       '''
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   =================================== 1 passed, 2 warnings in 327.93s (0:05:27) ===================================
   ```


----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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



##########
File path: src/operator/tensor/indexing_op.h
##########
@@ -222,8 +222,8 @@ struct TakeNonzeroAxis {
    */
   template<typename DType, typename IType>
   MSHADOW_XINLINE static void Map(index_t i, DType* out_data, const DType* in_data,
-                                  const IType* idx, const int out_prev_stride,
-                                  const int in_prev_stride, const int in_stride,
+                                  const IType* idx, const index_t out_prev_stride,
+                                  const index_t in_prev_stride, const index_t in_stride,
                                   const int in_ndims, const int out_ndims, const int idx_ndims,
                                   const int axis_dim, const int axis) {
     // i is the global flattened index in the output

Review comment:
       did you re-run the test ?




----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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



##########
File path: src/operator/tensor/indexing_op.h
##########
@@ -222,8 +222,8 @@ struct TakeNonzeroAxis {
    */
   template<typename DType, typename IType>
   MSHADOW_XINLINE static void Map(index_t i, DType* out_data, const DType* in_data,
-                                  const IType* idx, const int out_prev_stride,
-                                  const int in_prev_stride, const int in_stride,
+                                  const IType* idx, const index_t out_prev_stride,
+                                  const index_t in_prev_stride, const index_t in_stride,
                                   const int in_ndims, const int out_ndims, const int idx_ndims,
                                   const int axis_dim, const int axis) {
     // i is the global flattened index in the output

Review comment:
       can you change other indices in the kernel to `index_t` instead of `int64_t`




----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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


   @mxnet-bot run ci [centos-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] mxnet-bot commented on pull request #19325: Numpy take large tensor fix

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


   Jenkins CI successfully triggered : [centos-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] Zha0q1 commented on a change in pull request #19325: Numpy take large tensor fix

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



##########
File path: src/operator/tensor/indexing_op.h
##########
@@ -222,8 +222,8 @@ struct TakeNonzeroAxis {
    */
   template<typename DType, typename IType>
   MSHADOW_XINLINE static void Map(index_t i, DType* out_data, const DType* in_data,
-                                  const IType* idx, const int out_prev_stride,
-                                  const int in_prev_stride, const int in_stride,
+                                  const IType* idx, const index_t out_prev_stride,
+                                  const index_t in_prev_stride, const index_t in_stride,
                                   const int in_ndims, const int out_ndims, const int idx_ndims,
                                   const int axis_dim, const int axis) {
     // i is the global flattened index in the output

Review comment:
       I changed them




----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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



##########
File path: src/operator/tensor/indexing_op.h
##########
@@ -222,8 +222,8 @@ struct TakeNonzeroAxis {
    */
   template<typename DType, typename IType>
   MSHADOW_XINLINE static void Map(index_t i, DType* out_data, const DType* in_data,
-                                  const IType* idx, const int out_prev_stride,
-                                  const int in_prev_stride, const int in_stride,
+                                  const IType* idx, const index_t out_prev_stride,
+                                  const index_t in_prev_stride, const index_t in_stride,
                                   const int in_ndims, const int out_ndims, const int idx_ndims,
                                   const int axis_dim, const int axis) {
     // i is the global flattened index in the output

Review comment:
       can you change other indices in the code to index_t instead of `int64_t`




----------------------------------------------------------------
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 #19325: Numpy take large tensor fix

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


   local run
   
   ```
   ubuntu@ip-172-31-38-169:~/incubator-mxnet/build$ pytest ../tests/nightly/test_np_large_array.py::test_take
   /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 ==================================================
   /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:92
     /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:92: DeprecationWarning: invalid escape sequence \ 
       '''
   
   /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:1243
     /home/ubuntu/incubator-mxnet/tests/nightly/test_np_large_array.py:1243: DeprecationWarning: invalid escape sequence \ 
       '''
   
   -- Docs: https://docs.pytest.org/en/latest/warnings.html
   ===================================== 1 passed, 2 warnings in 256.19s (0:04:16) ===================
   ```


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