[GitHub] [incubator-mxnet] rondogency commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
rondogency commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411884892 ## File path: CMakeLists.txt ## @@ -726,18 +726,39 @@ endif() # extension libraries (custom operators, custom subgraphs) are built by default add_library(customop_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc) +add_library(transposecsr_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposecsr_lib.cc) +add_library(transposerowsp_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposerowsp_lib.cc) add_library(subgraph_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_subgraph/subgraph_lib.cc) +add_library(pass_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_pass/pass_lib.cc) target_include_directories(customop_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposecsr_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposerowsp_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) target_include_directories(subgraph_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(pass_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) if(USE_CUDA) add_library(customop_gpu_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/relu_lib.cu) target_include_directories(customop_gpu_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) endif() -if(MSVC) +if(UNIX) Review comment: I mean you don't need to add -shared even for customop_gpu_lib, just change the lines inside MSVC block ## File path: include/mxnet/lib_api.h ## @@ -22,7 +22,11 @@ * \file lib_api.h * \brief APIs to interact with libraries * This API specifies function prototypes to - * register custom ops for library authors + * register custom ops, partitioner, and passes + * for library authors + * See example/extension/lib_custom_op/README.md Review comment: maybe we can rephrase it to "APIs to write extension library, see ... for registering custom operators, ... for custom partitioners, ... for custom graph passes" ## File path: include/mxnet/lib_api.h ## @@ -45,7 +49,7 @@ #endif /* Make sure to update the version number everytime you make changes */ -#define MX_LIBRARY_VERSION 6 +#define MX_LIBRARY_VERSION 7 Review comment: I still feel it is better to make it 10 also it is better to add to c_api.cc line 339 version checking message something like "please update lib_api.h to match the version supported by MXNet backend" ## File path: example/extensions/lib_custom_op/README.md ## @@ -22,15 +22,13 @@ C++ Custom Operator Example and Tutorial Adding new operators in MXNet requires understanding of MXNet backend operator registration and recompiling of MXNet with all its dependencies. Users can use the old Python custom operator to add new operators, but it is slow, complicated and has poor adoption rate. So our approach for adding custom operators is to enable dynamic loading of C++ custom operators compiled in external libraries at runtime. -Custom operators (CustomOp) enable users to write new operators without compiling against all of MXNet header files and dependencies. When a library containing custom operators is loaded dynamically, the operators found in the library will be re-registered in MXNet so that users can call those operators natively just like other built-in operators. +Custom operators (CustomOp) enable users to write new operators without compiling against all of MXNet header files and dependencies. When a library containing custom operators is loaded dynamically, the operators found in the library will be registered in MXNet so that users can call those operators natively just like other built-in operators. ## Getting Started ### Have MXNet Ready -Custom Operator support was merged (#15921, #17270) and is not available in versions of MXNet prior to v1.7.0. -To access the feature now, please install MXNet by compiling from source using master or using the previously mentioned commits, downloading one of the nightly builds, or from a release of MXNet 1.7.0+. -For running the following example, it doesn’t matter if it is a CUDA, MKLDNN or plain MXNet build; the custom operator doesn’t interact with the execution of other native MXNet operators. +To run the following example, the build type of MXNet doesn’t matter since the custom operator doesn’t interact with the execution of other native MXNet operators. Review comment: it is better to add prerequisite here or run an example like "This requires GCC > 5 or CUDA > 9 to run the examples" This is an automated message from the Apache Git Service. To respond to the message, please
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18114: Fix description of setting Debug build type for cmake
mxnet-bot commented on issue #18114: URL: https://github.com/apache/incubator-mxnet/pull/18114#issuecomment-616966066 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] anko-intel commented on issue #18114: Fix description of setting Debug build type for cmake
anko-intel commented on issue #18114: URL: https://github.com/apache/incubator-mxnet/pull/18114#issuecomment-616966027 @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: us...@infra.apache.org
[GitHub] [incubator-mxnet] lanking520 opened a new issue #18121: Error in Loading model that contains Sparse NDArray
lanking520 opened a new issue #18121: URL: https://github.com/apache/incubator-mxnet/issues/18121 ## Description I am facing the issue loading the trained Symbolic model in mxnet 1.6.0. It is reproducible in the most recent nightly build. The error message indicated that the storage type in my model is not supported. My model is trained in 1.4.1 using Spare NDArray (RowSparse) as weight and Input type is CSR. I tried to update the model to 1.6.0 and it didn't solve the problem. What should I do to use Sparse in 1.6.0? This is partial information of my `symbol.json` ``` { "nodes": [ { "op": "null", "name": "data", "attrs": {"__storage_type__": "2"}, "inputs": [] }, { "op": "null", "name": "weight", "attrs": { "__init__": "[\"uniform\", {\"scale\": 0.01}]", "__shape__": "(1000, 1024)", "__storage_type__": "1" }, "inputs": [] } ``` ### Error Message Using SymbolBlock to load: ``` imported_net = gluon.nn.SymbolBlock.imports(prefix + '-symbol.json', ['data'], prefix + '-.params') ``` With error ``` line 1304, in __init__ "type is 'row_sparse'." % j.name AssertionError: SymbolBlock doesn't support Parameter 'weight' because its storage type is 'row_sparse'. ``` Using Module API to load ``` mx.npx.set_np(True, True) sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch=1) ``` with error ``` line 255, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [22:37:54] src/ndarray/ndarray.cc:1729: Check failed: Imperative::Get()->is_np_shape() == GlobalOn || !Imperative::Get()->is_np_shape(): ndarray was not saved in np shape semantics, but being loaded in np shape semantics. Please turn off np shape semantics in Python using `with np_shape(False)` to scope the code of loading the ndarray. ``` 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] samskalicky commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
samskalicky commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616940696 > If _custom graph pass PR_ refer to #18069, then it's already merged in both v1.x and v1.7.x. Almost done with #17885, as soon as CI passes and I get one more review i'll backport to 1.x and 1.7.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: us...@infra.apache.org
[GitHub] [incubator-mxnet-ci] leezu opened a new pull request #21: Add docker-compose & fix boto3 version
leezu opened a new pull request #21: URL: https://github.com/apache/incubator-mxnet-ci/pull/21 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] TaoLv commented on issue #18120: MKLDNN header missing in recent mxnet nightly static builds
TaoLv commented on issue #18120: URL: https://github.com/apache/incubator-mxnet/issues/18120#issuecomment-616937545 I doubt it's caused by the fix in https://github.com/apache/incubator-mxnet/pull/16857. We have lost the mkldnn header folder since then. For example, in https://repo.mxnet.io/dist/python/mkl/mxnet_mkl-1.6.0b20191205-py2.py3-none-manylinux1_x86_64.whl. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on issue #18025: [DEV] switch nose with pytest
marcoabreu commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616937478 The state should not be published by the bot but by CI. It should report in progress if it has been retriggered. Only exception might be if a new run has been requested before the existing one finished. In that case, the successful one might have overridden the in progress state because it happened later. It should be investigated, but not as part of the bot. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] haojin2 commented on issue #17534: [numpy] add logical op
haojin2 commented on issue #17534: URL: https://github.com/apache/incubator-mxnet/pull/17534#issuecomment-616935826 Not really getting your reason behind this request, could you further explain how numpy-related PRs would interfere with your PR? 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #18120: MKLDNN header missing in recent mxnet nightly static builds
leezu edited a comment on issue #18120: URL: https://github.com/apache/incubator-mxnet/issues/18120#issuecomment-616931390 FYI, I intend to switch the CD to cmake build in the coming days. It's currently blocked by https://github.com/apache/incubator-mxnet/issues/17557 because I'd like the CD to pass at least once prior to changing the build system.. #17557 may be fixed by https://github.com/apache/incubator-mxnet/pull/18025 However, the issue may be present in both cmake and make based staticbuilds. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18120: MKLDNN header missing in recent mxnet nightly static builds
leezu commented on issue #18120: URL: https://github.com/apache/incubator-mxnet/issues/18120#issuecomment-616931390 FYI, I intend to switch the CD to cmake build in the coming days. It's currently blocked by https://github.com/apache/incubator-mxnet/issues/17557 because I'd like the CD to pass at least once prior to changing the build system.. #17557 may be fixed by https://github.com/apache/incubator-mxnet/pull/18025 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #17534: [numpy] add logical op
szha commented on issue #17534: URL: https://github.com/apache/incubator-mxnet/pull/17534#issuecomment-616931180 @haojin2 would you mind putting the merge of numpy PRs on hold until #18025 is merged? cc @reminisce @yzhliu 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] eric-haibin-lin opened a new issue #18120: MKLDNN header missing in recent mxnet nightly static builds
eric-haibin-lin opened a new issue #18120: URL: https://github.com/apache/incubator-mxnet/issues/18120 ``` root@ip-172-31-37-108:/bps-mkl# pip3 install --pre mxnet-cu100 -f https://dist.mxnet.io/python/cu100 -U Collecting mxnet-cu100 Downloading https://repo.mxnet.io/dist/python/cu100/mxnet_cu100-2.0.0b20200312-py2.py3-none-manylinux1_x86_64.whl (808.1MB) ``` ``` ls /usr/local/lib/python3.6/dist-packages/mxnet/include/ dlpack dmlc mshadow mxnet nnvm ``` Since mkldnn is turned on by default in Feb, the headers should be included, too @TaoLv 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #17829: test_sparse_aggregator fails with memory corruption
leezu commented on issue #17829: URL: https://github.com/apache/incubator-mxnet/issues/17829#issuecomment-616923717 cc @eric-haibin-lin this is a quite common issue 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #17846: [numpy] add op tri
mxnet-bot commented on issue #17846: URL: https://github.com/apache/incubator-mxnet/pull/17846#issuecomment-616922827 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] Yiyan66 commented on issue #17846: [numpy] add op tri
Yiyan66 commented on issue #17846: URL: https://github.com/apache/incubator-mxnet/pull/17846#issuecomment-616922775 @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: us...@infra.apache.org
[incubator-mxnet] branch master updated (6198d1d -> 7d2c9bf)
This is an automated email from the ASF dual-hosted git repository. haoj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) add 7d2c9bf [numpy] add logical op (#17534) No new revisions were added by this update. Summary of changes: benchmark/python/ffi/benchmark_ffi.py | 3 + contrib/tvmop/core/umath.py| 6 ++ python/mxnet/ndarray/numpy/_op.py | 111 + python/mxnet/numpy/multiarray.py | 107 +++- python/mxnet/numpy_dispatch_protocol.py| 3 + python/mxnet/symbol/numpy/_symbol.py | 106 +++- src/api/operator/numpy/np_elemwise_broadcast_op.cc | 24 + src/operator/mshadow_op.h | 6 ++ .../numpy/np_elemwise_broadcast_logic_op.cc| 30 ++ .../numpy/np_elemwise_broadcast_logic_op.cu| 6 ++ src/operator/operator_tune.cc | 3 + .../python/unittest/test_numpy_interoperability.py | 25 - tests/python/unittest/test_numpy_op.py | 6 +- 13 files changed, 432 insertions(+), 4 deletions(-)
[GitHub] [incubator-mxnet] hanke580 commented on issue #17857: [Numpy] FFI: sort, argsort, vstack etc
hanke580 commented on issue #17857: URL: https://github.com/apache/incubator-mxnet/pull/17857#issuecomment-616914046 @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: us...@infra.apache.org
[incubator-mxnet] branch master updated (6198d1d -> 7d2c9bf)
This is an automated email from the ASF dual-hosted git repository. haoj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) add 7d2c9bf [numpy] add logical op (#17534) No new revisions were added by this update. Summary of changes: benchmark/python/ffi/benchmark_ffi.py | 3 + contrib/tvmop/core/umath.py| 6 ++ python/mxnet/ndarray/numpy/_op.py | 111 + python/mxnet/numpy/multiarray.py | 107 +++- python/mxnet/numpy_dispatch_protocol.py| 3 + python/mxnet/symbol/numpy/_symbol.py | 106 +++- src/api/operator/numpy/np_elemwise_broadcast_op.cc | 24 + src/operator/mshadow_op.h | 6 ++ .../numpy/np_elemwise_broadcast_logic_op.cc| 30 ++ .../numpy/np_elemwise_broadcast_logic_op.cu| 6 ++ src/operator/operator_tune.cc | 3 + .../python/unittest/test_numpy_interoperability.py | 25 - tests/python/unittest/test_numpy_op.py | 6 +- 13 files changed, 432 insertions(+), 4 deletions(-)
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #17857: [Numpy] FFI: sort, argsort, vstack etc
mxnet-bot commented on issue #17857: URL: https://github.com/apache/incubator-mxnet/pull/17857#issuecomment-616914079 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: us...@infra.apache.org
[incubator-mxnet] branch master updated (6198d1d -> 7d2c9bf)
This is an automated email from the ASF dual-hosted git repository. haoj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) add 7d2c9bf [numpy] add logical op (#17534) No new revisions were added by this update. Summary of changes: benchmark/python/ffi/benchmark_ffi.py | 3 + contrib/tvmop/core/umath.py| 6 ++ python/mxnet/ndarray/numpy/_op.py | 111 + python/mxnet/numpy/multiarray.py | 107 +++- python/mxnet/numpy_dispatch_protocol.py| 3 + python/mxnet/symbol/numpy/_symbol.py | 106 +++- src/api/operator/numpy/np_elemwise_broadcast_op.cc | 24 + src/operator/mshadow_op.h | 6 ++ .../numpy/np_elemwise_broadcast_logic_op.cc| 30 ++ .../numpy/np_elemwise_broadcast_logic_op.cu| 6 ++ src/operator/operator_tune.cc | 3 + .../python/unittest/test_numpy_interoperability.py | 25 - tests/python/unittest/test_numpy_op.py | 6 +- 13 files changed, 432 insertions(+), 4 deletions(-)
[incubator-mxnet] branch master updated (6198d1d -> 7d2c9bf)
This is an automated email from the ASF dual-hosted git repository. haoj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) add 7d2c9bf [numpy] add logical op (#17534) No new revisions were added by this update. Summary of changes: benchmark/python/ffi/benchmark_ffi.py | 3 + contrib/tvmop/core/umath.py| 6 ++ python/mxnet/ndarray/numpy/_op.py | 111 + python/mxnet/numpy/multiarray.py | 107 +++- python/mxnet/numpy_dispatch_protocol.py| 3 + python/mxnet/symbol/numpy/_symbol.py | 106 +++- src/api/operator/numpy/np_elemwise_broadcast_op.cc | 24 + src/operator/mshadow_op.h | 6 ++ .../numpy/np_elemwise_broadcast_logic_op.cc| 30 ++ .../numpy/np_elemwise_broadcast_logic_op.cu| 6 ++ src/operator/operator_tune.cc | 3 + .../python/unittest/test_numpy_interoperability.py | 25 - tests/python/unittest/test_numpy_op.py | 6 +- 13 files changed, 432 insertions(+), 4 deletions(-)
[incubator-mxnet] branch master updated (6198d1d -> 7d2c9bf)
This is an automated email from the ASF dual-hosted git repository. haoj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) add 7d2c9bf [numpy] add logical op (#17534) No new revisions were added by this update. Summary of changes: benchmark/python/ffi/benchmark_ffi.py | 3 + contrib/tvmop/core/umath.py| 6 ++ python/mxnet/ndarray/numpy/_op.py | 111 + python/mxnet/numpy/multiarray.py | 107 +++- python/mxnet/numpy_dispatch_protocol.py| 3 + python/mxnet/symbol/numpy/_symbol.py | 106 +++- src/api/operator/numpy/np_elemwise_broadcast_op.cc | 24 + src/operator/mshadow_op.h | 6 ++ .../numpy/np_elemwise_broadcast_logic_op.cc| 30 ++ .../numpy/np_elemwise_broadcast_logic_op.cu| 6 ++ src/operator/operator_tune.cc | 3 + .../python/unittest/test_numpy_interoperability.py | 25 - tests/python/unittest/test_numpy_op.py | 6 +- 13 files changed, 432 insertions(+), 4 deletions(-)
[GitHub] [incubator-mxnet] wuxun-zhang commented on issue #17884: [MKL-DNN] Integrate Conv3d and Pool3d/1d
wuxun-zhang commented on issue #17884: URL: https://github.com/apache/incubator-mxnet/pull/17884#issuecomment-616912500 **Performance numbers for Conv3d op:** shape | w/o mkldnn | w/mkldnn | -- | -- | -- | (3, 3, 16, 224, 224) | 3.696679 sec | 0.046571 sec| (3, 3, 128, 128, 128) | 11.716535 sec | 0.165749 sec| **Test script:** ``` import mxnet as mx from mxnet import nd, gluon import time data_shape = [(3, 3, 16, 224, 224), (3, 3, 128, 128, 128)] for shape in data_shape: data = mx.random.uniform(shape=shape) weight_shape = (32, shape[1], 3, 3, 3) weight = mx.nd.ones(shape=weight_shape) num_iter = 10 dry_run = 5 for i in range(num_iter): if i == dry_run: tic = time.time() out = mx.nd.Convolution(data, weight, kernel=(3,3,3), stride=(1,1,1), num_filter=weight_shape[0], pad=(0,0,0), dilate=(2,2,2), no_bias=True, cudnn_off=True, name='conv3d') out.asnumpy() print("For shape : {}".format(shape)) print("Average time cost is %f sec" % ((time.time() - tic)/(num_iter-dry_run)) ``` 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18025: [DEV] switch nose with pytest
leezu commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616910362 The state get's updated after the run finishes. cc @ChaiBapchya who may fix the bot to display "in progress" state instead of failed state in this situation. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
ciyongch commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616909968 Thanks @ptrendx , just want to make sure we've all we need in 1.7.0 :) If *custom graph pass PR* refer to https://github.com/apache/incubator-mxnet/pull/18069, then it's already merged in both v1.x and v1.7.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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18118: Cherry-pick #17937 to v1.6.x branch
mxnet-bot commented on issue #18118: URL: https://github.com/apache/incubator-mxnet/pull/18118#issuecomment-616908444 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #18118: Cherry-pick #17937 to v1.6.x branch
ptrendx commented on issue #18118: URL: https://github.com/apache/incubator-mxnet/pull/18118#issuecomment-616908410 @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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
ptrendx commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616907971 Just noticed that I made a mistake in PR name about hich PR I'm backporting, my bad :-P 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
ptrendx commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616907640 I don't have anything else, I know @samskalicky wanted to include his custom graph pass PR. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
ciyongch commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616906944 @ptrendx thanks for backporting the PR to v1.7.x branch, suppose the original PR is https://github.com/apache/incubator-mxnet/pull/18095 in v1.x, and https://github.com/apache/incubator-mxnet/pull/17767 in master, right? BTW, do you have any other pending PRs that would like to be included in 1.7.0 release? 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: us...@infra.apache.org
[incubator-mxnet] branch v1.7.x updated: Fix and optimize handling of vectorized memory accesses (#17767) (#18113)
This is an automated email from the ASF dual-hosted git repository. ptrendx pushed a commit to branch v1.7.x in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/v1.7.x by this push: new 7c63f56 Fix and optimize handling of vectorized memory accesses (#17767) (#18113) 7c63f56 is described below commit 7c63f56f258dff93a7a5f6c556a1dfa0cbadcac8 Author: Przemyslaw Tredak AuthorDate: Mon Apr 20 19:02:11 2020 -0700 Fix and optimize handling of vectorized memory accesses (#17767) (#18113) * Vectorized loads for binary elemwise kernel * More generalization * Add backwardusenone * Remove the unused _backward_add op * Add vectorized backwardusein * Extending vectorization to more binary ops, binary ops with scalar and unary ops * Handling ElementwiseSum * Get rid of half2 in mshadow * Remove backward_elemwiseaddex * Revert "Remove the unused _backward_add op" This reverts commit f86da86f809c8cbad07db76a3554f23890fe05a3. * Revert "Remove backward_elemwiseaddex" This reverts commit 7729114caf6a1718c08ce1f35529d2267057d515. * Add back the backward_add since C++ test relies on it * Test bcast implementations * First version of vecotrized bcast * Adding single side vectorized bcast kernel * Removing debug prints * Actually run the single side kernel * Move the default implementation of bcast to the vectorized one * Limit the new implementation to GPU only * Enabling vectorization when broadcast does not actually do broadcast * Cleaning * Cleaning part 2 * Fix for numpy ops using stuff from broadcast * Fix * Fix lint * Try to debug pinv numpy test * Fix * Fix the vectorized broadcast implementation for misaligned input pointers * Added tests * Added docs to cuda_vectorization.cuh * Another fix for broadcast and fix INT64 compilation * Optimize for aligned=true * 1 more addition to test * Reverting the change to Numpy op test * Trying mcmodel=medium to fix the failure in CMake static build * Revert "Trying mcmodel=medium to fix the failure in CMake static build" This reverts commit 1af684c507dd5b2c7ab7ffe89d21799320e3d9c6. * Limiting the PR to just elementwise ops --- 3rdparty/mshadow/mshadow/base.h| 48 --- 3rdparty/mshadow/mshadow/half2.h | 143 - src/common/cuda_vectorization.cuh | 283 ++ src/operator/mshadow_op.h | 66 - src/operator/tensor/elemwise_binary_op.cuh | 322 + src/operator/tensor/elemwise_binary_op.h | 206 +++-- src/operator/tensor/elemwise_binary_op_basic.cu| 23 +- src/operator/tensor/elemwise_binary_scalar_op.cuh | 207 + src/operator/tensor/elemwise_binary_scalar_op.h| 75 - .../tensor/elemwise_binary_scalar_op_basic.cu | 9 +- .../tensor/elemwise_binary_scalar_op_extended.cu | 15 +- src/operator/tensor/elemwise_sum.cu| 112 ++- src/operator/tensor/elemwise_sum.h | 12 - src/operator/tensor/elemwise_unary_op.cuh | 127 src/operator/tensor/elemwise_unary_op.h| 56 ++-- src/operator/tensor/elemwise_unary_op_basic.cu | 1 + src/operator/tensor/elemwise_unary_op_pow.cu | 1 + src/operator/tensor/elemwise_unary_op_trig.cu | 1 + tests/python/unittest/test_operator.py | 78 + 19 files changed, 1342 insertions(+), 443 deletions(-) diff --git a/3rdparty/mshadow/mshadow/base.h b/3rdparty/mshadow/mshadow/base.h index 28fbd86..2e658cf 100755 --- a/3rdparty/mshadow/mshadow/base.h +++ b/3rdparty/mshadow/mshadow/base.h @@ -276,7 +276,6 @@ extern "C" { } #include "./half.h" -#include "./half2.h" #include "./bfloat.h" #define MSHADOW_HALF_BF_OPERATOR(RTYPE, OP) \ MSHADOW_XINLINE RTYPE operator OP(mshadow::half::half_t a, mshadow::bfloat::bf16_t b) { \ @@ -391,11 +390,6 @@ struct DataType { #endif }; template<> -struct DataType { - static const int kFlag = kFloat16; - static const int kLanes = 2; -}; -template<> struct DataType { static const int kFlag = kBfloat16; static const int kLanes = 1; @@ -1148,48 +1142,6 @@ struct minimum { } #endif -#define MSHADOW_TYPE_SWITCH_WITH_HALF2(type, DType, ...) \ - switch (type) { \ - case mshadow::kFloat32: \ -{ \ - typedef float DType;\ - {__VA_ARGS__} \ -
[incubator-mxnet] branch v1.7.x updated: Fix and optimize handling of vectorized memory accesses (#17767) (#18113)
This is an automated email from the ASF dual-hosted git repository. ptrendx pushed a commit to branch v1.7.x in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/v1.7.x by this push: new 7c63f56 Fix and optimize handling of vectorized memory accesses (#17767) (#18113) 7c63f56 is described below commit 7c63f56f258dff93a7a5f6c556a1dfa0cbadcac8 Author: Przemyslaw Tredak AuthorDate: Mon Apr 20 19:02:11 2020 -0700 Fix and optimize handling of vectorized memory accesses (#17767) (#18113) * Vectorized loads for binary elemwise kernel * More generalization * Add backwardusenone * Remove the unused _backward_add op * Add vectorized backwardusein * Extending vectorization to more binary ops, binary ops with scalar and unary ops * Handling ElementwiseSum * Get rid of half2 in mshadow * Remove backward_elemwiseaddex * Revert "Remove the unused _backward_add op" This reverts commit f86da86f809c8cbad07db76a3554f23890fe05a3. * Revert "Remove backward_elemwiseaddex" This reverts commit 7729114caf6a1718c08ce1f35529d2267057d515. * Add back the backward_add since C++ test relies on it * Test bcast implementations * First version of vecotrized bcast * Adding single side vectorized bcast kernel * Removing debug prints * Actually run the single side kernel * Move the default implementation of bcast to the vectorized one * Limit the new implementation to GPU only * Enabling vectorization when broadcast does not actually do broadcast * Cleaning * Cleaning part 2 * Fix for numpy ops using stuff from broadcast * Fix * Fix lint * Try to debug pinv numpy test * Fix * Fix the vectorized broadcast implementation for misaligned input pointers * Added tests * Added docs to cuda_vectorization.cuh * Another fix for broadcast and fix INT64 compilation * Optimize for aligned=true * 1 more addition to test * Reverting the change to Numpy op test * Trying mcmodel=medium to fix the failure in CMake static build * Revert "Trying mcmodel=medium to fix the failure in CMake static build" This reverts commit 1af684c507dd5b2c7ab7ffe89d21799320e3d9c6. * Limiting the PR to just elementwise ops --- 3rdparty/mshadow/mshadow/base.h| 48 --- 3rdparty/mshadow/mshadow/half2.h | 143 - src/common/cuda_vectorization.cuh | 283 ++ src/operator/mshadow_op.h | 66 - src/operator/tensor/elemwise_binary_op.cuh | 322 + src/operator/tensor/elemwise_binary_op.h | 206 +++-- src/operator/tensor/elemwise_binary_op_basic.cu| 23 +- src/operator/tensor/elemwise_binary_scalar_op.cuh | 207 + src/operator/tensor/elemwise_binary_scalar_op.h| 75 - .../tensor/elemwise_binary_scalar_op_basic.cu | 9 +- .../tensor/elemwise_binary_scalar_op_extended.cu | 15 +- src/operator/tensor/elemwise_sum.cu| 112 ++- src/operator/tensor/elemwise_sum.h | 12 - src/operator/tensor/elemwise_unary_op.cuh | 127 src/operator/tensor/elemwise_unary_op.h| 56 ++-- src/operator/tensor/elemwise_unary_op_basic.cu | 1 + src/operator/tensor/elemwise_unary_op_pow.cu | 1 + src/operator/tensor/elemwise_unary_op_trig.cu | 1 + tests/python/unittest/test_operator.py | 78 + 19 files changed, 1342 insertions(+), 443 deletions(-) diff --git a/3rdparty/mshadow/mshadow/base.h b/3rdparty/mshadow/mshadow/base.h index 28fbd86..2e658cf 100755 --- a/3rdparty/mshadow/mshadow/base.h +++ b/3rdparty/mshadow/mshadow/base.h @@ -276,7 +276,6 @@ extern "C" { } #include "./half.h" -#include "./half2.h" #include "./bfloat.h" #define MSHADOW_HALF_BF_OPERATOR(RTYPE, OP) \ MSHADOW_XINLINE RTYPE operator OP(mshadow::half::half_t a, mshadow::bfloat::bf16_t b) { \ @@ -391,11 +390,6 @@ struct DataType { #endif }; template<> -struct DataType { - static const int kFlag = kFloat16; - static const int kLanes = 2; -}; -template<> struct DataType { static const int kFlag = kBfloat16; static const int kLanes = 1; @@ -1148,48 +1142,6 @@ struct minimum { } #endif -#define MSHADOW_TYPE_SWITCH_WITH_HALF2(type, DType, ...) \ - switch (type) { \ - case mshadow::kFloat32: \ -{ \ - typedef float DType;\ - {__VA_ARGS__} \ -
[GitHub] [incubator-mxnet] ciyongch edited a comment on issue #18112: [v1.x] Improve activation backward (#17973)
ciyongch edited a comment on issue #18112: URL: https://github.com/apache/incubator-mxnet/pull/18112#issuecomment-616896641 Thanks @TaoLv , please backport this PR to v1.7.x branch as well. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch edited a comment on issue #18111: [v1.x] Backport master #17673 to v1.x branch : change error tolerance for bf16 bn
ciyongch edited a comment on issue #18111: URL: https://github.com/apache/incubator-mxnet/pull/18111#issuecomment-616895648 Thanks @rongzha1 , please backport this PR to v1.7.x branch as well, thanks. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] eric-haibin-lin edited a comment on issue #18014: segfault with bytePS
eric-haibin-lin edited a comment on issue #18014: URL: https://github.com/apache/incubator-mxnet/issues/18014#issuecomment-616241624 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #18025: [DEV] switch nose with pytest
szha commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616903694 I can see the retry job triggered by the CI bot and the job running, but the state doesn't seem to be reflected in the check status on github. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch commented on issue #18075: [1.x] Backport #17772
ciyongch commented on issue #18075: URL: https://github.com/apache/incubator-mxnet/pull/18075#issuecomment-616897741 @pengzhao-intel Please take a look and help merge. @mseth10 can you backport this PR to v1.7.x release branch as well (as the code rebase was already done)? Thanks. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch commented on issue #18112: [v1.x] Improve activation backward (#17973)
ciyongch commented on issue #18112: URL: https://github.com/apache/incubator-mxnet/pull/18112#issuecomment-616896641 Thanks @TaoLv , adding this PR to 1.7.0 roadmap https://github.com/apache/incubator-mxnet/issues/16864. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ciyongch commented on issue #18111: [v1.x] Backport master #17673 to v1.x branch : change error tolerance for bf16 bn
ciyongch commented on issue #18111: URL: https://github.com/apache/incubator-mxnet/pull/18111#issuecomment-616895648 Thanks @rongzha1 , adding this PR to 1.7.0 roadmap https://github.com/apache/incubator-mxnet/issues/16864. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] samskalicky commented on issue #17885: [WIP] MXNet Extensions enhancements
samskalicky commented on issue #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#issuecomment-616894534 > also please lib_api update version to 10 changed to version 7 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] samskalicky commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
samskalicky commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411800538 ## File path: include/mxnet/lib_api.h ## @@ -507,16 +553,13 @@ class OpResource { void *rand_cpu_states, *rand_gpu_states; }; -/*! - * \brief Json utility to parse serialized subgraph symbol - */ /*! \brief Macro to help passing serialized subgraph through attribute dict */ #define MX_STR_SUBGRAPH_SYM_JSON "subgraph_sym_json" -#define MX_STR_DTYPE "__dtype__" -#define MX_STR_SHAPE "__shape__" +#define MX_STR_DTYPE "__ext_dtype__" +#define MX_STR_SHAPE "__ext_shape__" /* \brief get shape value from list of shapes string - * format: [[1]] or [[1],[2]] + * format: [[1]] or [[1],[2,3]], returns "[1]" or "[2,3]" Review comment: done ## File path: example/extensions/lib_custom_op/relu_lib.cu ## @@ -29,93 +29,93 @@ #define NumThreadPerBlock 256 // mxnet recommended cuda thread number per block __global__ void relu_gpu_forward(float *out, float *in, int64_t N) { -int tid = blockIdx.x * blockDim.x + threadIdx.x; -if (tid < N) -out[tid] = in[tid] > 0 ? in[tid] : 0; + int tid = blockIdx.x * blockDim.x + threadIdx.x; + if (tid < N) +out[tid] = in[tid] > 0 ? in[tid] : 0; } __global__ void relu_gpu_backward(float *ingrad, float *outgrad, float *indata, int64_t N) { -int tid = blockIdx.x * blockDim.x + threadIdx.x; -if (tid < N) -ingrad[tid] = indata[tid] > 0 ? 1 * outgrad[tid] : 0; + int tid = blockIdx.x * blockDim.x + threadIdx.x; + if (tid < N) +ingrad[tid] = indata[tid] > 0 ? 1 * outgrad[tid] : 0; } -MXReturnValue forwardCPU(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { -float* in_data = inputs[0].data(); -float* out_data = outputs[0].data(); -for (int i=0; i 0 ? in_data[i] : 0; -} -return MX_SUCCESS; +MXReturnValue forwardCPU(const std::unordered_map& attrs, + std::vector* inputs, + std::vector* outputs, + const OpResource& res) { + float* in_data = inputs->at(0).data(); + float* out_data = outputs->at(0).data(); + for (int i=0; iat(0).size(); i++) { +out_data[i] = in_data[i] > 0 ? in_data[i] : 0; + } + return MX_SUCCESS; } -MXReturnValue backwardCPU(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { -float* out_grad = inputs[0].data(); -float* in_data = inputs[1].data(); -float* in_grad = outputs[0].data(); -for (int i=0; i 0 ? 1 * out_grad[i] : 0; -} -return MX_SUCCESS; +MXReturnValue backwardCPU(const std::unordered_map& attrs, + std::vector* inputs, + std::vector* outputs, + const OpResource& res) { + float* out_grad = inputs->at(0).data(); + float* in_data = inputs->at(1).data(); + float* in_grad = outputs->at(0).data(); + for (int i=0; iat(1).size(); i++) { +in_grad[i] = in_data[i] > 0 ? 1 * out_grad[i] : 0; + } + return MX_SUCCESS; } -MXReturnValue forwardGPU(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { -float* in_data = inputs[0].data(); -float* out_data = outputs[0].data(); +MXReturnValue forwardGPU(const std::unordered_map& attrs, + std::vector* inputs, + std::vector* outputs, + const OpResource& res) { + float* in_data = inputs->at(0).data(); + float* out_data = outputs->at(0).data(); -mx_stream_t cuda_stream = res.get_cuda_stream(); -int64_t N = inputs[0].size(); -int num_block = (N + NumThreadPerBlock - 1) / NumThreadPerBlock; + mx_stream_t cuda_stream = res.get_cuda_stream(); + int64_t N = inputs->at(0).size(); + int num_block = (N + NumThreadPerBlock - 1) / NumThreadPerBlock; -relu_gpu_forward<<>>(out_data, in_data, N); + relu_gpu_forward<<>>(out_data, in_data, N); -return MX_SUCCESS; + return MX_SUCCESS; } -MXReturnValue backwardGPU(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { -float* out_grad = inputs[0].data(); -float* in_data = inputs[1].data(); -float* in_grad = outputs[0].data(); - -mx_stream_t cuda_stream = res.get_cuda_stream(); -int64_t N = inputs[0].size(); -int num_block = (N + NumThreadPerBlock - 1) / NumThreadPerBlock; +MXReturnValue backwardGPU(const std::unordered_map& attrs, + std::vector* inputs, + std::vector* outputs, + const OpResource& res) { + float* out_grad =
[GitHub] [incubator-mxnet] samskalicky commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
samskalicky commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411800431 ## File path: CMakeLists.txt ## @@ -726,18 +726,39 @@ endif() # extension libraries (custom operators, custom subgraphs) are built by default add_library(customop_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc) +add_library(transposecsr_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposecsr_lib.cc) +add_library(transposerowsp_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposerowsp_lib.cc) add_library(subgraph_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_subgraph/subgraph_lib.cc) +add_library(pass_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_pass/pass_lib.cc) target_include_directories(customop_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposecsr_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposerowsp_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) target_include_directories(subgraph_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(pass_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) if(USE_CUDA) add_library(customop_gpu_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/relu_lib.cu) target_include_directories(customop_gpu_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) endif() -if(MSVC) +if(UNIX) Review comment: done ## File path: include/mxnet/lib_api.h ## @@ -529,7 +572,7 @@ std::string getShapeAt(const std::string& shape, unsigned index) { } /* \brief get dtype value from list of dtypes string - * format: [1] or [1,2] + * format: [1] or [1,2], returns "1" or "2" 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] samskalicky commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
samskalicky commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411797753 ## File path: example/extensions/lib_custom_op/gemm_lib.cc ## @@ -87,20 +87,20 @@ MXReturnValue forward(std::map attrs, * gradient outputs * outputs[0] = dA; outputs[1] = dB */ -MXReturnValue backward(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { +MXReturnValue backward(const std::unordered_map& attrs, + std::vector* inputs, 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] rondogency commented on issue #17885: [WIP] MXNet Extensions enhancements
rondogency commented on issue #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#issuecomment-61614 also please lib_api update version to 10 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] rondogency commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
rondogency commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411718225 ## File path: Makefile ## @@ -686,21 +686,36 @@ pylint: python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet # MXNet extension dynamically loading libraries -EXT_LIBS = build/libcustomop_lib.so build/libsubgraph_lib.so +EXT_LIBS = build/libcustomop_lib.so build/libtransposecsr_lib.so build/libtransposerowsp_lib.so build/libsubgraph_lib.so build/libpass_lib.so ifeq ($(USE_CUDA), 1) EXT_LIBS += build/libcustomop_gpu_lib.so endif extension_libs: $(EXT_LIBS) build/libcustomop_lib.so: @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o /dev/null -I include/mxnet $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/gemm_lib.cc -o $@ -I include/mxnet +build/libtransposecsr_lib.so: + @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/transposecsr_lib.cc -o /dev/null -I include/mxnet + $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/transposecsr_lib.cc -o $@ -I include/mxnet Review comment: we should write explicitly it requires gcc 7 or any other prerequisite to use c++17 ## File path: Makefile ## @@ -686,21 +686,36 @@ pylint: python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet # MXNet extension dynamically loading libraries -EXT_LIBS = build/libcustomop_lib.so build/libsubgraph_lib.so +EXT_LIBS = build/libcustomop_lib.so build/libtransposecsr_lib.so build/libtransposerowsp_lib.so build/libsubgraph_lib.so build/libpass_lib.so ifeq ($(USE_CUDA), 1) EXT_LIBS += build/libcustomop_gpu_lib.so endif extension_libs: $(EXT_LIBS) build/libcustomop_lib.so: @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o /dev/null -I include/mxnet $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/gemm_lib.cc -o $@ -I include/mxnet +build/libtransposecsr_lib.so: + @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/transposecsr_lib.cc -o /dev/null -I include/mxnet + $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/transposecsr_lib.cc -o $@ -I include/mxnet Review comment: plus since this will only go into 1.7 where c++17 is not included, we don't need this test at all 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18025: [DEV] switch nose with pytest
mxnet-bot commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616885731 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18025: [DEV] switch nose with pytest
leezu commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616885701 @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: us...@infra.apache.org
[incubator-mxnet-site] branch asf-site updated: Bump the publish timestamp.
This is an automated email from the ASF dual-hosted git repository. aaronmarkham pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-site.git The following commit(s) were added to refs/heads/asf-site by this push: new 6488af4 Bump the publish timestamp. 6488af4 is described below commit 6488af4df8e652b8754e35171f2e26bf458070f9 Author: mxnet-ci AuthorDate: Tue Apr 21 00:42:33 2020 + Bump the publish timestamp. --- date.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/date.txt b/date.txt new file mode 100644 index 000..d9b2fb8 --- /dev/null +++ b/date.txt @@ -0,0 +1 @@ +Tue Apr 21 00:42:33 UTC 2020
[GitHub] [incubator-mxnet] rondogency commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
rondogency commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411781628 ## File path: Makefile ## @@ -686,21 +686,36 @@ pylint: python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet # MXNet extension dynamically loading libraries -EXT_LIBS = build/libcustomop_lib.so build/libsubgraph_lib.so +EXT_LIBS = build/libcustomop_lib.so build/libtransposecsr_lib.so build/libtransposerowsp_lib.so build/libsubgraph_lib.so build/libpass_lib.so ifeq ($(USE_CUDA), 1) EXT_LIBS += build/libcustomop_gpu_lib.so endif extension_libs: $(EXT_LIBS) build/libcustomop_lib.so: @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o /dev/null -I include/mxnet $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/gemm_lib.cc -o $@ -I include/mxnet +build/libtransposecsr_lib.so: + @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/transposecsr_lib.cc -o /dev/null -I include/mxnet + $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/transposecsr_lib.cc -o $@ -I include/mxnet Review comment: plus since this will only go into 1.7 where c++17 is not included, we don't need this test at all 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] pengzhao-intel commented on issue #18107: [v1.6.x] Quantized LSTMP operator
pengzhao-intel commented on issue #18107: URL: https://github.com/apache/incubator-mxnet/pull/18107#issuecomment-616878162 @zixuanweeei please rebase the code since oneDNN has updated into 1.4. @ciyongch @TaoLv please help take a reveiw for the code change. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18110: Backport master #17673 to v1.7 branch : change error tolerance for bf16 bn
mxnet-bot commented on issue #18110: URL: https://github.com/apache/incubator-mxnet/pull/18110#issuecomment-616876917 Jenkins CI successfully triggered : [centos-gpu, sanity, windows-gpu, 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] rongzha1 commented on issue #18110: Backport master #17673 to v1.7 branch : change error tolerance for bf16 bn
rongzha1 commented on issue #18110: URL: https://github.com/apache/incubator-mxnet/pull/18110#issuecomment-616876886 @mxnet-bot run ci [centos-gpu, sanity ,unix-gpu ,windows-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: us...@infra.apache.org
[GitHub] [incubator-mxnet] rongzha1 commented on issue #18111: [v1.x] Backport master #17673 to v1.x branch : change error tolerance for bf16 bn
rongzha1 commented on issue #18111: URL: https://github.com/apache/incubator-mxnet/pull/18111#issuecomment-616876347 @mxnet-bot run ci [unix-gpu, windows-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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18111: [v1.x] Backport master #17673 to v1.x branch : change error tolerance for bf16 bn
mxnet-bot commented on issue #18111: URL: https://github.com/apache/incubator-mxnet/pull/18111#issuecomment-616876376 Jenkins CI successfully triggered : [windows-gpu, 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] rondogency commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
rondogency commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411651625 ## File path: CMakeLists.txt ## @@ -726,18 +726,39 @@ endif() # extension libraries (custom operators, custom subgraphs) are built by default add_library(customop_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc) +add_library(transposecsr_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposecsr_lib.cc) +add_library(transposerowsp_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/transposerowsp_lib.cc) add_library(subgraph_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_subgraph/subgraph_lib.cc) +add_library(pass_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_pass/pass_lib.cc) target_include_directories(customop_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposecsr_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(transposerowsp_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) target_include_directories(subgraph_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) +target_include_directories(pass_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) if(USE_CUDA) add_library(customop_gpu_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/relu_lib.cu) target_include_directories(customop_gpu_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet) endif() -if(MSVC) +if(UNIX) Review comment: those things can be deleted ## File path: Makefile ## @@ -686,21 +686,36 @@ pylint: python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet # MXNet extension dynamically loading libraries -EXT_LIBS = build/libcustomop_lib.so build/libsubgraph_lib.so +EXT_LIBS = build/libcustomop_lib.so build/libtransposecsr_lib.so build/libtransposerowsp_lib.so build/libsubgraph_lib.so build/libpass_lib.so ifeq ($(USE_CUDA), 1) EXT_LIBS += build/libcustomop_gpu_lib.so endif extension_libs: $(EXT_LIBS) build/libcustomop_lib.so: @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o /dev/null -I include/mxnet $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/gemm_lib.cc -o $@ -I include/mxnet +build/libtransposecsr_lib.so: + @mkdir -p $(@D) + $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/transposecsr_lib.cc -o /dev/null -I include/mxnet + $(CXX) -shared -fPIC -std=c++17 example/extensions/lib_custom_op/transposecsr_lib.cc -o $@ -I include/mxnet Review comment: we should write explicitly it requires gcc 7 or any other prerequisite to use c++17 ## File path: example/extensions/lib_custom_op/gemm_lib.cc ## @@ -87,20 +87,20 @@ MXReturnValue forward(std::map attrs, * gradient outputs * outputs[0] = dA; outputs[1] = dB */ -MXReturnValue backward(std::map attrs, - std::vector inputs, - std::vector outputs, - OpResource res) { +MXReturnValue backward(const std::unordered_map& attrs, + std::vector* inputs, Review comment: don't forget to update this change to lib_custom_op README 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] josephevans opened a new pull request #18119: If sanity build is not found, wait until Jenkins recognizes it.
josephevans opened a new pull request #18119: URL: https://github.com/apache/incubator-mxnet/pull/18119 ## Description ## I ran into some problems when activating the staggered build pipeline in prod. It seems there is a slight delay (on a high-load server) between when Jenkins starts the full-build job and having the sanity job being recognized by Jenkins. This change allows it to retry until the job does exist. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18119: If sanity build is not found, wait until Jenkins recognizes it.
mxnet-bot commented on issue #18119: URL: https://github.com/apache/incubator-mxnet/pull/18119#issuecomment-616868617 Hey @josephevans , 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-cpu, sanity, unix-gpu, edge, windows-gpu, website, clang, centos-cpu, unix-cpu, miscellaneous, centos-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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18086: CD pipeline tests segfaults
leezu commented on issue #18086: URL: https://github.com/apache/incubator-mxnet/issues/18086#issuecomment-616867089 May be fixed by https://github.com/apache/incubator-mxnet/pull/18025 cc @szha 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18086: CD pipeline tests segfaults
leezu commented on issue #18086: URL: https://github.com/apache/incubator-mxnet/issues/18086#issuecomment-616866711 This issue blocks the release of gpu builds 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] apeforest edited a comment on issue #17882: Improve performance of broadcast_axis
apeforest edited a comment on issue #17882: URL: https://github.com/apache/incubator-mxnet/pull/17882#issuecomment-616859584 > > Please add more details in the PR description to explain the rationale of this change: > > @apeforest > > 1. Its there in the PR Heading. Additionally, its being done to improve BERT performance regression when using Large Tensor Build > 2. Leverages vectorization. Can't explain line by line as to how. Too much text to write. I can share a link about vectorization for reviewers to read. Let me know if you meant something else. I can write 1 line each for 3 cases which is necessary > 3. I didn't understand this question. Could you clarify what meant by side-effect. 1. The title tells readers this PR will change the performance of broadcast_axis. However, I am not familiar with which tricks/algorithms you employed to make it faster. It would greatly help people understand code if you could mention it in PR description with a few sentences or a pseudo code. 2. vectorization is a very general term. Please add more details here. You could even copy some of them from your code comment 3. Side effect means any downside or potential problem will this change cause. e.g. slow down with other inputs, or not supporting certain inputs, backward compatibility etc. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] apeforest commented on issue #17882: Improve performance of broadcast_axis
apeforest commented on issue #17882: URL: https://github.com/apache/incubator-mxnet/pull/17882#issuecomment-616859584 > > Please add more details in the PR description to explain the rationale of this change: > > @apeforest > > 1. Its there in the PR Heading. Additionally, its being done to improve BERT performance regression when using Large Tensor Build > 2. Leverages vectorization. Can't explain line by line as to how. Too much text to write. I can share a link about vectorization for reviewers to read. Let me know if you meant something else. I can write 1 line each for 3 cases which is necessary > 3. I didn't understand this question. Could you clarify what meant by side-effect. 1. The title tells readers this PR will change the performance of broadcast_axis. However, I am not familiar with which tricks/algorithms you employed to make it faster. It would greatly help people understand code if you could mention it in PR description with a few sentences or a pseudo code. 2. vectorization is a very general term. Please add more details here. You could even copy some of them from your code comment 3. Side effect means any downside or potential problem will this change. e.g. slow down with other inputs, or not supporting certain inputs, backward compatibility etc. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #17882: Improve performance of broadcast_axis
apeforest commented on a change in pull request #17882: URL: https://github.com/apache/incubator-mxnet/pull/17882#discussion_r411751450 ## File path: src/operator/tensor/broadcast_reduce_op.h ## @@ -1058,22 +1065,58 @@ struct broadcast_kernel { mshadow::Shape in_shape, mshadow::Shape out_shape, const OpReqType req, - const uint32_t ndim) { -size_t in_stride = 1; -size_t out_stride = 1; -index_t idx = i; -index_t in_idx = i; -for (int iter = ndim - 1; iter >= 0; --iter) { - size_t dim_idx = idx % out_shape[iter]; - in_idx -= dim_idx * out_stride; - if (in_shape[iter] != 1) { -in_idx += dim_idx * in_stride; - } - idx /= out_shape[iter]; - in_stride *= in_shape[iter]; - out_stride *= out_shape[iter]; -} -KERNEL_ASSIGN(output[i], req, OP::Map(input[in_idx])); + const uint32_t ndim, + const size_t *axes, + const size_t *out_stride, + const int num_broadcast_axes) { +index_t idx = i; +index_t init_off = 0; +for (int iter = ndim - 1; idx > 0 && iter >= 0; --iter) { + size_t dim_idx = idx % in_shape[iter]; + init_off += dim_idx * out_stride[iter]; + idx /= in_shape[iter]; +} +index_t stride_0, stride_1, stride_2; +// Each case is based on the number of axis to be broadcasted +// (1, 2 or 3) after merging axes. +switch (num_broadcast_axes) { + // when input shape is amogst one of the form + // [(x,1), (x,1,x), (1,x)] + // x can be any +ve number >=0 and they need not be equal to each other Review comment: what does +ve mean? ## File path: src/operator/numpy/np_matmul_op-inl.h ## @@ -157,12 +157,50 @@ inline void MatmulImpl(const OpContext& ctx, DType* bc_b_ptr = bc_a_ptr + bc_size_a; MSHADOW_TYPE_SWITCH_WITH_BOOL(input_a.type_flag_, IType, { MSHADOW_TYPE_SWITCH_WITH_BOOL(input_b.type_flag_, OType, { -Kernel, xpu>::Launch( - s, bc_size_a, input_a.dptr(), bc_a_ptr, - k_a_shape, k_a_shape_bc, OpReqType::kWriteTo, ndim); -Kernel, xpu>::Launch( - s, bc_size_b, input_b.dptr(), bc_b_ptr, - k_b_shape, k_b_shape_bc, OpReqType::kWriteTo, ndim); +bool a_shape_changed = false, b_shape_changed = false; +size_t axes[ndim], out_stride[ndim], axes_b[ndim], out_stride_b[ndim]; +int iter = ndim - 1, idx_a = 0, idx_b = 0; +out_stride[iter] = 1; +out_stride_b[iter] = 1; +if (k_a_shape[iter] != k_a_shape_bc[iter]) { Review comment: Can these two if blocks be included in the for loop below? ## File path: src/operator/tensor/broadcast_reduce_op.h ## @@ -1058,22 +1065,58 @@ struct broadcast_kernel { mshadow::Shape in_shape, mshadow::Shape out_shape, const OpReqType req, - const uint32_t ndim) { -size_t in_stride = 1; -size_t out_stride = 1; -index_t idx = i; -index_t in_idx = i; -for (int iter = ndim - 1; iter >= 0; --iter) { - size_t dim_idx = idx % out_shape[iter]; - in_idx -= dim_idx * out_stride; - if (in_shape[iter] != 1) { -in_idx += dim_idx * in_stride; - } - idx /= out_shape[iter]; - in_stride *= in_shape[iter]; - out_stride *= out_shape[iter]; -} -KERNEL_ASSIGN(output[i], req, OP::Map(input[in_idx])); + const uint32_t ndim, + const size_t *axes, + const size_t *out_stride, + const int num_broadcast_axes) { +index_t idx = i; +index_t init_off = 0; +for (int iter = ndim - 1; idx > 0 && iter >= 0; --iter) { + size_t dim_idx = idx % in_shape[iter]; + init_off += dim_idx * out_stride[iter]; + idx /= in_shape[iter]; +} +index_t stride_0, stride_1, stride_2; +// Each case is based on the number of axis to be broadcasted +// (1, 2 or 3) after merging axes. +switch (num_broadcast_axes) { + // when input shape is amogst one of the form + // [(x,1), (x,1,x), (1,x)] + // x can be any +ve number >=0 and they need not be equal to each other + case 1 : +stride_0 = out_stride[axes[0]]; +for (int l=0; l < out_shape[axes[0]]; l++) { + KERNEL_ASSIGN(output[init_off + l*stride_0], + req, OP::Map(input[i])); +} +break; + // when input shape is amogst one of the
[GitHub] [incubator-mxnet] apeforest commented on a change in pull request #17882: Improve performance of broadcast_axis
apeforest commented on a change in pull request #17882: URL: https://github.com/apache/incubator-mxnet/pull/17882#discussion_r411749878 ## File path: src/operator/numpy/np_matmul_op-inl.h ## @@ -157,12 +157,50 @@ inline void MatmulImpl(const OpContext& ctx, DType* bc_b_ptr = bc_a_ptr + bc_size_a; MSHADOW_TYPE_SWITCH_WITH_BOOL(input_a.type_flag_, IType, { MSHADOW_TYPE_SWITCH_WITH_BOOL(input_b.type_flag_, OType, { -Kernel, xpu>::Launch( - s, bc_size_a, input_a.dptr(), bc_a_ptr, - k_a_shape, k_a_shape_bc, OpReqType::kWriteTo, ndim); -Kernel, xpu>::Launch( - s, bc_size_b, input_b.dptr(), bc_b_ptr, - k_b_shape, k_b_shape_bc, OpReqType::kWriteTo, ndim); +bool a_shape_changed = false, b_shape_changed = false; +size_t axes[ndim], out_stride[ndim], axes_b[ndim], out_stride_b[ndim]; +int iter = ndim - 1, idx_a = 0, idx_b = 0; +out_stride[iter] = 1; Review comment: should this be named out_stride_a? 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18115: CI: Consolidate Dockerfiles
leezu commented on issue #18115: URL: https://github.com/apache/incubator-mxnet/pull/18115#issuecomment-616845435 @mxnet-bot run ci [miscellaneous, website, centos-gpu, unix-gpu, edge, sanity, centos-cpu, clang, 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18115: CI: Consolidate Dockerfiles
mxnet-bot commented on issue #18115: URL: https://github.com/apache/incubator-mxnet/pull/18115#issuecomment-616845507 Jenkins CI successfully triggered : [miscellaneous, website, centos-gpu, centos-cpu, unix-gpu, clang, edge, unix-cpu, sanity] 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: us...@infra.apache.org
[incubator-mxnet] branch leezu-patch-1 updated (8a9599b -> 1c0416c)
This is an automated email from the ASF dual-hosted git repository. lausen pushed a change to branch leezu-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. discard 8a9599b Disable MKL_USE_STATIC_LIBS by default add 2fff11d [OpPerf] Fix axis_shape and function mismatch for LTS (#17894) add 4c0f763 Fix a typo (#17979) add 1b107a0 Remove redundant condition in np_matrix_op.cc (#17933) add 84b0ddd Add USE_DIST_KVSTORE=ON to GPU build (#17911) add 03b8146 Skip test_kvstore_gpu.test_rsp_push_pull (#17983) add ff234db Skip test_gluon_data.py on OSX (#17969) add c244f9f [MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555) add 5adcbf8 GPU gemms true fp16 (#17466) add c3c76a8 Optimize AddTakeGrad Tensor Sum (#17906) add 002d4f1 * impl - FFi for linalg op (#17795) add 79c576b [ONNX export] Fixing spatial export for batchnorm (#17711) add 892f982 * impl - linalg.lstsq for cpu (#17950) add a960f5a ffi_array_split, v/h/dsplit (#17873) add f906a02 ffi_atleast_1/2/3d (#17897) add 16ddc6d Custom Operator Random Number Generator Support (#17762) add b7f7525 dnnl v1.2.2 (#17991) add 13841dd [mkldnn] optimize for mkldnn batchnorm backward (#17902) add da95add Fix vector access out of bound in MKLDNNConvolutionBackward (#17997) add 6cc990c Revert "[MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555)" (#17998) add d97dead [Numpy] allow mix integer dtypes for power/add/multiply (#17921) add 178b98e [Numpy] OP_interp (#17793) add d1616c9 [numpy] FFI binary bitwise ops (#17812) add 664889a [MKL-DNN] Integrate Conv3d and Pool3d/1d (#17884) add 5ff2994 [Website 2.0] General Version Dropdown (#17948) add 6a931c7 Add np.linalg.qr (#17851) add 0eeb337 Improve activation backward (#17973) add d8c7293 fix np flip when axis input contains negative number (#17880) add 0d87aa8 [numpy] FFI for insert \ delete \ matmul etc. (#17759) add 3dab617 add: numpy rollaxis (#17865) add af76466 add: numpy op tril_indices (#17904) add 8f82cd8 [MKLDNN] support using any format in pooling backward (#17900) add 57c785a [Numpy][Bug Fix] Fix Wrong Result in Numpy Operator `where` (#17899) add e4afe50 * impl debug - FFI for linalg multioutput op (#17879) add 2be2027 Add instructions on distributed MXNet with Horovod on Kubernetes (#17974) add 249b9a1 Fix cudnn Dropout reproducibility (#17547) add a6fef3f [Website 2.0] Nightly Build for v2.x (master) (#17957) add 1679ade fixes #17918; update ruby & jekyll, remove incompatible plugins (#17927) add 07b8d7a Fix ElemwiseSum for more than 4 inputs (#17995) add 0597f87 updating stash regex and copy command to fix nightly imagenet_inference (#18021) add 58911b5 fixing hyperlinks in python tutorial (#17929) add c9f8caa Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) add 8d065cc [Numpy] FFI Invocation for Unary Ops (#17779) add 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) add 37c9dd6 Fix for handling negative indices in the fusion of slice (#17937) add a1fa6a8 Workaround gnu_tls handshake error on Ubuntu 14.04 Nvidia Docker (#18018) add 7dd7e7e Fix issue of zeros gradients w.r.t. RNN bias when num_layers > 1 (#17872) add 02ac75e Fix typo in crash course website (#18010) add 0bff90d Support projection feature of LSTM (#17996) add 8f6d116 [MKL-DNN] BatchNormRelu Fusion (#17679) add 7a59239 Remove unused files in Website doc (#16722) add e3d7866 [Numpy] FFI: random.choice, take and clip (#17854) add 8e3f0f3 * impl - linalg matrix_rank for cpu and gpu implemented (#18020) add a044744 [Numpy] FFI for linalg.qr and linalg.lstsq (#18040) add f3cfaf9 ffi random (#18051) add fb73a17 Switch to C++17 and modernize toolchain + CI (#17984) add e796ae9 Integrate Horovod training API as part of MXNet native distributed training API (#17531) add c7d2b3c [NumPy] Add NumPy support for triu (#17614) add 2c4732b Fix CI (#18056) add ce48a9d Remove code owner (#17928) add 94f235d [numpy] add new ffi for column_stack and hstack (#17831) add 37dbbd4 Fix CD (#18072) add 5c768f0 [Numpy Extension] Add stop_gradient to npx (#18076) add afae030 No tensor cores for fp32 interleaved attention, remove div by 8 restriction (#17994) add 9337137 For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines. (#17999) add 7bef85e [Numpy] Add ffi for np.sum, np.std, np.var, np.average and np.histogram (#17866) add bd0816e Add np.linalg.qr backward (#18050) add 5155095 add zero grad for npi_unique (#18080) add b7d1c69
[incubator-mxnet] branch leezu-patch-1 updated (8a9599b -> 1c0416c)
This is an automated email from the ASF dual-hosted git repository. lausen pushed a change to branch leezu-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. discard 8a9599b Disable MKL_USE_STATIC_LIBS by default add 2fff11d [OpPerf] Fix axis_shape and function mismatch for LTS (#17894) add 4c0f763 Fix a typo (#17979) add 1b107a0 Remove redundant condition in np_matrix_op.cc (#17933) add 84b0ddd Add USE_DIST_KVSTORE=ON to GPU build (#17911) add 03b8146 Skip test_kvstore_gpu.test_rsp_push_pull (#17983) add ff234db Skip test_gluon_data.py on OSX (#17969) add c244f9f [MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555) add 5adcbf8 GPU gemms true fp16 (#17466) add c3c76a8 Optimize AddTakeGrad Tensor Sum (#17906) add 002d4f1 * impl - FFi for linalg op (#17795) add 79c576b [ONNX export] Fixing spatial export for batchnorm (#17711) add 892f982 * impl - linalg.lstsq for cpu (#17950) add a960f5a ffi_array_split, v/h/dsplit (#17873) add f906a02 ffi_atleast_1/2/3d (#17897) add 16ddc6d Custom Operator Random Number Generator Support (#17762) add b7f7525 dnnl v1.2.2 (#17991) add 13841dd [mkldnn] optimize for mkldnn batchnorm backward (#17902) add da95add Fix vector access out of bound in MKLDNNConvolutionBackward (#17997) add 6cc990c Revert "[MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555)" (#17998) add d97dead [Numpy] allow mix integer dtypes for power/add/multiply (#17921) add 178b98e [Numpy] OP_interp (#17793) add d1616c9 [numpy] FFI binary bitwise ops (#17812) add 664889a [MKL-DNN] Integrate Conv3d and Pool3d/1d (#17884) add 5ff2994 [Website 2.0] General Version Dropdown (#17948) add 6a931c7 Add np.linalg.qr (#17851) add 0eeb337 Improve activation backward (#17973) add d8c7293 fix np flip when axis input contains negative number (#17880) add 0d87aa8 [numpy] FFI for insert \ delete \ matmul etc. (#17759) add 3dab617 add: numpy rollaxis (#17865) add af76466 add: numpy op tril_indices (#17904) add 8f82cd8 [MKLDNN] support using any format in pooling backward (#17900) add 57c785a [Numpy][Bug Fix] Fix Wrong Result in Numpy Operator `where` (#17899) add e4afe50 * impl debug - FFI for linalg multioutput op (#17879) add 2be2027 Add instructions on distributed MXNet with Horovod on Kubernetes (#17974) add 249b9a1 Fix cudnn Dropout reproducibility (#17547) add a6fef3f [Website 2.0] Nightly Build for v2.x (master) (#17957) add 1679ade fixes #17918; update ruby & jekyll, remove incompatible plugins (#17927) add 07b8d7a Fix ElemwiseSum for more than 4 inputs (#17995) add 0597f87 updating stash regex and copy command to fix nightly imagenet_inference (#18021) add 58911b5 fixing hyperlinks in python tutorial (#17929) add c9f8caa Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) add 8d065cc [Numpy] FFI Invocation for Unary Ops (#17779) add 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) add 37c9dd6 Fix for handling negative indices in the fusion of slice (#17937) add a1fa6a8 Workaround gnu_tls handshake error on Ubuntu 14.04 Nvidia Docker (#18018) add 7dd7e7e Fix issue of zeros gradients w.r.t. RNN bias when num_layers > 1 (#17872) add 02ac75e Fix typo in crash course website (#18010) add 0bff90d Support projection feature of LSTM (#17996) add 8f6d116 [MKL-DNN] BatchNormRelu Fusion (#17679) add 7a59239 Remove unused files in Website doc (#16722) add e3d7866 [Numpy] FFI: random.choice, take and clip (#17854) add 8e3f0f3 * impl - linalg matrix_rank for cpu and gpu implemented (#18020) add a044744 [Numpy] FFI for linalg.qr and linalg.lstsq (#18040) add f3cfaf9 ffi random (#18051) add fb73a17 Switch to C++17 and modernize toolchain + CI (#17984) add e796ae9 Integrate Horovod training API as part of MXNet native distributed training API (#17531) add c7d2b3c [NumPy] Add NumPy support for triu (#17614) add 2c4732b Fix CI (#18056) add ce48a9d Remove code owner (#17928) add 94f235d [numpy] add new ffi for column_stack and hstack (#17831) add 37dbbd4 Fix CD (#18072) add 5c768f0 [Numpy Extension] Add stop_gradient to npx (#18076) add afae030 No tensor cores for fp32 interleaved attention, remove div by 8 restriction (#17994) add 9337137 For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines. (#17999) add 7bef85e [Numpy] Add ffi for np.sum, np.std, np.var, np.average and np.histogram (#17866) add bd0816e Add np.linalg.qr backward (#18050) add 5155095 add zero grad for npi_unique (#18080) add b7d1c69
[incubator-mxnet] branch leezu-patch-1 updated (8a9599b -> 1c0416c)
This is an automated email from the ASF dual-hosted git repository. lausen pushed a change to branch leezu-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. discard 8a9599b Disable MKL_USE_STATIC_LIBS by default add 2fff11d [OpPerf] Fix axis_shape and function mismatch for LTS (#17894) add 4c0f763 Fix a typo (#17979) add 1b107a0 Remove redundant condition in np_matrix_op.cc (#17933) add 84b0ddd Add USE_DIST_KVSTORE=ON to GPU build (#17911) add 03b8146 Skip test_kvstore_gpu.test_rsp_push_pull (#17983) add ff234db Skip test_gluon_data.py on OSX (#17969) add c244f9f [MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555) add 5adcbf8 GPU gemms true fp16 (#17466) add c3c76a8 Optimize AddTakeGrad Tensor Sum (#17906) add 002d4f1 * impl - FFi for linalg op (#17795) add 79c576b [ONNX export] Fixing spatial export for batchnorm (#17711) add 892f982 * impl - linalg.lstsq for cpu (#17950) add a960f5a ffi_array_split, v/h/dsplit (#17873) add f906a02 ffi_atleast_1/2/3d (#17897) add 16ddc6d Custom Operator Random Number Generator Support (#17762) add b7f7525 dnnl v1.2.2 (#17991) add 13841dd [mkldnn] optimize for mkldnn batchnorm backward (#17902) add da95add Fix vector access out of bound in MKLDNNConvolutionBackward (#17997) add 6cc990c Revert "[MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555)" (#17998) add d97dead [Numpy] allow mix integer dtypes for power/add/multiply (#17921) add 178b98e [Numpy] OP_interp (#17793) add d1616c9 [numpy] FFI binary bitwise ops (#17812) add 664889a [MKL-DNN] Integrate Conv3d and Pool3d/1d (#17884) add 5ff2994 [Website 2.0] General Version Dropdown (#17948) add 6a931c7 Add np.linalg.qr (#17851) add 0eeb337 Improve activation backward (#17973) add d8c7293 fix np flip when axis input contains negative number (#17880) add 0d87aa8 [numpy] FFI for insert \ delete \ matmul etc. (#17759) add 3dab617 add: numpy rollaxis (#17865) add af76466 add: numpy op tril_indices (#17904) add 8f82cd8 [MKLDNN] support using any format in pooling backward (#17900) add 57c785a [Numpy][Bug Fix] Fix Wrong Result in Numpy Operator `where` (#17899) add e4afe50 * impl debug - FFI for linalg multioutput op (#17879) add 2be2027 Add instructions on distributed MXNet with Horovod on Kubernetes (#17974) add 249b9a1 Fix cudnn Dropout reproducibility (#17547) add a6fef3f [Website 2.0] Nightly Build for v2.x (master) (#17957) add 1679ade fixes #17918; update ruby & jekyll, remove incompatible plugins (#17927) add 07b8d7a Fix ElemwiseSum for more than 4 inputs (#17995) add 0597f87 updating stash regex and copy command to fix nightly imagenet_inference (#18021) add 58911b5 fixing hyperlinks in python tutorial (#17929) add c9f8caa Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) add 8d065cc [Numpy] FFI Invocation for Unary Ops (#17779) add 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) add 37c9dd6 Fix for handling negative indices in the fusion of slice (#17937) add a1fa6a8 Workaround gnu_tls handshake error on Ubuntu 14.04 Nvidia Docker (#18018) add 7dd7e7e Fix issue of zeros gradients w.r.t. RNN bias when num_layers > 1 (#17872) add 02ac75e Fix typo in crash course website (#18010) add 0bff90d Support projection feature of LSTM (#17996) add 8f6d116 [MKL-DNN] BatchNormRelu Fusion (#17679) add 7a59239 Remove unused files in Website doc (#16722) add e3d7866 [Numpy] FFI: random.choice, take and clip (#17854) add 8e3f0f3 * impl - linalg matrix_rank for cpu and gpu implemented (#18020) add a044744 [Numpy] FFI for linalg.qr and linalg.lstsq (#18040) add f3cfaf9 ffi random (#18051) add fb73a17 Switch to C++17 and modernize toolchain + CI (#17984) add e796ae9 Integrate Horovod training API as part of MXNet native distributed training API (#17531) add c7d2b3c [NumPy] Add NumPy support for triu (#17614) add 2c4732b Fix CI (#18056) add ce48a9d Remove code owner (#17928) add 94f235d [numpy] add new ffi for column_stack and hstack (#17831) add 37dbbd4 Fix CD (#18072) add 5c768f0 [Numpy Extension] Add stop_gradient to npx (#18076) add afae030 No tensor cores for fp32 interleaved attention, remove div by 8 restriction (#17994) add 9337137 For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines. (#17999) add 7bef85e [Numpy] Add ffi for np.sum, np.std, np.var, np.average and np.histogram (#17866) add bd0816e Add np.linalg.qr backward (#18050) add 5155095 add zero grad for npi_unique (#18080) add b7d1c69
[incubator-mxnet] branch leezu-patch-1 updated (8a9599b -> 1c0416c)
This is an automated email from the ASF dual-hosted git repository. lausen pushed a change to branch leezu-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. discard 8a9599b Disable MKL_USE_STATIC_LIBS by default add 2fff11d [OpPerf] Fix axis_shape and function mismatch for LTS (#17894) add 4c0f763 Fix a typo (#17979) add 1b107a0 Remove redundant condition in np_matrix_op.cc (#17933) add 84b0ddd Add USE_DIST_KVSTORE=ON to GPU build (#17911) add 03b8146 Skip test_kvstore_gpu.test_rsp_push_pull (#17983) add ff234db Skip test_gluon_data.py on OSX (#17969) add c244f9f [MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555) add 5adcbf8 GPU gemms true fp16 (#17466) add c3c76a8 Optimize AddTakeGrad Tensor Sum (#17906) add 002d4f1 * impl - FFi for linalg op (#17795) add 79c576b [ONNX export] Fixing spatial export for batchnorm (#17711) add 892f982 * impl - linalg.lstsq for cpu (#17950) add a960f5a ffi_array_split, v/h/dsplit (#17873) add f906a02 ffi_atleast_1/2/3d (#17897) add 16ddc6d Custom Operator Random Number Generator Support (#17762) add b7f7525 dnnl v1.2.2 (#17991) add 13841dd [mkldnn] optimize for mkldnn batchnorm backward (#17902) add da95add Fix vector access out of bound in MKLDNNConvolutionBackward (#17997) add 6cc990c Revert "[MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555)" (#17998) add d97dead [Numpy] allow mix integer dtypes for power/add/multiply (#17921) add 178b98e [Numpy] OP_interp (#17793) add d1616c9 [numpy] FFI binary bitwise ops (#17812) add 664889a [MKL-DNN] Integrate Conv3d and Pool3d/1d (#17884) add 5ff2994 [Website 2.0] General Version Dropdown (#17948) add 6a931c7 Add np.linalg.qr (#17851) add 0eeb337 Improve activation backward (#17973) add d8c7293 fix np flip when axis input contains negative number (#17880) add 0d87aa8 [numpy] FFI for insert \ delete \ matmul etc. (#17759) add 3dab617 add: numpy rollaxis (#17865) add af76466 add: numpy op tril_indices (#17904) add 8f82cd8 [MKLDNN] support using any format in pooling backward (#17900) add 57c785a [Numpy][Bug Fix] Fix Wrong Result in Numpy Operator `where` (#17899) add e4afe50 * impl debug - FFI for linalg multioutput op (#17879) add 2be2027 Add instructions on distributed MXNet with Horovod on Kubernetes (#17974) add 249b9a1 Fix cudnn Dropout reproducibility (#17547) add a6fef3f [Website 2.0] Nightly Build for v2.x (master) (#17957) add 1679ade fixes #17918; update ruby & jekyll, remove incompatible plugins (#17927) add 07b8d7a Fix ElemwiseSum for more than 4 inputs (#17995) add 0597f87 updating stash regex and copy command to fix nightly imagenet_inference (#18021) add 58911b5 fixing hyperlinks in python tutorial (#17929) add c9f8caa Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) add 8d065cc [Numpy] FFI Invocation for Unary Ops (#17779) add 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) add 37c9dd6 Fix for handling negative indices in the fusion of slice (#17937) add a1fa6a8 Workaround gnu_tls handshake error on Ubuntu 14.04 Nvidia Docker (#18018) add 7dd7e7e Fix issue of zeros gradients w.r.t. RNN bias when num_layers > 1 (#17872) add 02ac75e Fix typo in crash course website (#18010) add 0bff90d Support projection feature of LSTM (#17996) add 8f6d116 [MKL-DNN] BatchNormRelu Fusion (#17679) add 7a59239 Remove unused files in Website doc (#16722) add e3d7866 [Numpy] FFI: random.choice, take and clip (#17854) add 8e3f0f3 * impl - linalg matrix_rank for cpu and gpu implemented (#18020) add a044744 [Numpy] FFI for linalg.qr and linalg.lstsq (#18040) add f3cfaf9 ffi random (#18051) add fb73a17 Switch to C++17 and modernize toolchain + CI (#17984) add e796ae9 Integrate Horovod training API as part of MXNet native distributed training API (#17531) add c7d2b3c [NumPy] Add NumPy support for triu (#17614) add 2c4732b Fix CI (#18056) add ce48a9d Remove code owner (#17928) add 94f235d [numpy] add new ffi for column_stack and hstack (#17831) add 37dbbd4 Fix CD (#18072) add 5c768f0 [Numpy Extension] Add stop_gradient to npx (#18076) add afae030 No tensor cores for fp32 interleaved attention, remove div by 8 restriction (#17994) add 9337137 For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines. (#17999) add 7bef85e [Numpy] Add ffi for np.sum, np.std, np.var, np.average and np.histogram (#17866) add bd0816e Add np.linalg.qr backward (#18050) add 5155095 add zero grad for npi_unique (#18080) add b7d1c69
[incubator-mxnet] branch leezu-patch-1 updated (8a9599b -> 1c0416c)
This is an automated email from the ASF dual-hosted git repository. lausen pushed a change to branch leezu-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. discard 8a9599b Disable MKL_USE_STATIC_LIBS by default add 2fff11d [OpPerf] Fix axis_shape and function mismatch for LTS (#17894) add 4c0f763 Fix a typo (#17979) add 1b107a0 Remove redundant condition in np_matrix_op.cc (#17933) add 84b0ddd Add USE_DIST_KVSTORE=ON to GPU build (#17911) add 03b8146 Skip test_kvstore_gpu.test_rsp_push_pull (#17983) add ff234db Skip test_gluon_data.py on OSX (#17969) add c244f9f [MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555) add 5adcbf8 GPU gemms true fp16 (#17466) add c3c76a8 Optimize AddTakeGrad Tensor Sum (#17906) add 002d4f1 * impl - FFi for linalg op (#17795) add 79c576b [ONNX export] Fixing spatial export for batchnorm (#17711) add 892f982 * impl - linalg.lstsq for cpu (#17950) add a960f5a ffi_array_split, v/h/dsplit (#17873) add f906a02 ffi_atleast_1/2/3d (#17897) add 16ddc6d Custom Operator Random Number Generator Support (#17762) add b7f7525 dnnl v1.2.2 (#17991) add 13841dd [mkldnn] optimize for mkldnn batchnorm backward (#17902) add da95add Fix vector access out of bound in MKLDNNConvolutionBackward (#17997) add 6cc990c Revert "[MXNET-#16795] Byteps-KVStore: Intergrate Byteps into mxnet as new type of kvstore backend (#17555)" (#17998) add d97dead [Numpy] allow mix integer dtypes for power/add/multiply (#17921) add 178b98e [Numpy] OP_interp (#17793) add d1616c9 [numpy] FFI binary bitwise ops (#17812) add 664889a [MKL-DNN] Integrate Conv3d and Pool3d/1d (#17884) add 5ff2994 [Website 2.0] General Version Dropdown (#17948) add 6a931c7 Add np.linalg.qr (#17851) add 0eeb337 Improve activation backward (#17973) add d8c7293 fix np flip when axis input contains negative number (#17880) add 0d87aa8 [numpy] FFI for insert \ delete \ matmul etc. (#17759) add 3dab617 add: numpy rollaxis (#17865) add af76466 add: numpy op tril_indices (#17904) add 8f82cd8 [MKLDNN] support using any format in pooling backward (#17900) add 57c785a [Numpy][Bug Fix] Fix Wrong Result in Numpy Operator `where` (#17899) add e4afe50 * impl debug - FFI for linalg multioutput op (#17879) add 2be2027 Add instructions on distributed MXNet with Horovod on Kubernetes (#17974) add 249b9a1 Fix cudnn Dropout reproducibility (#17547) add a6fef3f [Website 2.0] Nightly Build for v2.x (master) (#17957) add 1679ade fixes #17918; update ruby & jekyll, remove incompatible plugins (#17927) add 07b8d7a Fix ElemwiseSum for more than 4 inputs (#17995) add 0597f87 updating stash regex and copy command to fix nightly imagenet_inference (#18021) add 58911b5 fixing hyperlinks in python tutorial (#17929) add c9f8caa Update 3rdparty/mkldnn remote URL and pin to v1.3 (#17972) add 8d065cc [Numpy] FFI Invocation for Unary Ops (#17779) add 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) add 37c9dd6 Fix for handling negative indices in the fusion of slice (#17937) add a1fa6a8 Workaround gnu_tls handshake error on Ubuntu 14.04 Nvidia Docker (#18018) add 7dd7e7e Fix issue of zeros gradients w.r.t. RNN bias when num_layers > 1 (#17872) add 02ac75e Fix typo in crash course website (#18010) add 0bff90d Support projection feature of LSTM (#17996) add 8f6d116 [MKL-DNN] BatchNormRelu Fusion (#17679) add 7a59239 Remove unused files in Website doc (#16722) add e3d7866 [Numpy] FFI: random.choice, take and clip (#17854) add 8e3f0f3 * impl - linalg matrix_rank for cpu and gpu implemented (#18020) add a044744 [Numpy] FFI for linalg.qr and linalg.lstsq (#18040) add f3cfaf9 ffi random (#18051) add fb73a17 Switch to C++17 and modernize toolchain + CI (#17984) add e796ae9 Integrate Horovod training API as part of MXNet native distributed training API (#17531) add c7d2b3c [NumPy] Add NumPy support for triu (#17614) add 2c4732b Fix CI (#18056) add ce48a9d Remove code owner (#17928) add 94f235d [numpy] add new ffi for column_stack and hstack (#17831) add 37dbbd4 Fix CD (#18072) add 5c768f0 [Numpy Extension] Add stop_gradient to npx (#18076) add afae030 No tensor cores for fp32 interleaved attention, remove div by 8 restriction (#17994) add 9337137 For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines. (#17999) add 7bef85e [Numpy] Add ffi for np.sum, np.std, np.var, np.average and np.histogram (#17866) add bd0816e Add np.linalg.qr backward (#18050) add 5155095 add zero grad for npi_unique (#18080) add b7d1c69
[GitHub] [incubator-mxnet] szha commented on a change in pull request #18025: [DEV] switch nose with pytest
szha commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411729150 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: + + MXNET_MODULE_SEED=4018804151 pytest --log-level=DEBUG --verbose test_module.py + + Output might be: + + [WARNING] module-level seed is set: all tests running deterministically + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... [DEBUG] np and mx random seeds = 3935862516 + ok + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Copy the segfaulting-test seed into the command: + MXNET_TEST_SEED=1435005594 pytest --log-level=DEBUG --verbose test_module.py:test2 + Output might be: + + [INFO] np, mx and python random seeds = 2481884723 + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Finally reproduce the segfault directly under gdb (might need additional os packages) + by editing the bottom of test_module.py to be + + if __name__ == '__main__': + logging.getLogger().setLevel(logging.DEBUG) + test2() + + MXNET_TEST_SEED=1435005594 gdb -ex r --args python test_module.py + +4. When finished debugging the segfault, remember to unset any exported MXNET_ seed + variables in the environment to return to non-deterministic testing (a good thing). +""" + +module_seed_str = os.getenv('MXNET_MODULE_SEED') +if module_seed_str is None: +seed = random.randint(0, 2**31-1) +else: +seed = int(module_seed_str) +logging.warning('*** module-level seed is set: ' +'all tests running deterministically ***') +print('Setting module np/mx/python random seeds, ' + 'use MXNET_MODULE_SEED={} to reproduce.'.format(seed)) + +random.seed(seed) +try: +import numpy as np +import mxnet as mx +np.random.seed(seed) +mx.random.seed(seed) +except: +print('Unable to import numpy/mxnet. Skipping conftest.') Review comment: switched all prints to logging.info/warning 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18109: Update Apache License for mshadow
leezu commented on issue #18109: URL: https://github.com/apache/incubator-mxnet/pull/18109#issuecomment-616839644 Please update the RAT license checker to enforce license in the 3rdparty/mshadow folder Ie need to fix this line https://github.com/apache/incubator-mxnet/blob/6198d1d7e10ba58ccc64ab7701d0c528b64bd58e/tests/nightly/apache_rat_license_check/rat-excludes#L34 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18116: [Gluon] Gluon load_parameters/save_parameters does not respect the prefix flag and will be problematic when we share the parameters
leezu commented on issue #18116: URL: https://github.com/apache/incubator-mxnet/issues/18116#issuecomment-616837981 Let's track changing the default for MXNet 2 in this issue 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: us...@infra.apache.org
[incubator-mxnet] branch master updated (8d124e0 -> 6198d1d)
This is an automated email from the ASF dual-hosted git repository. ptrendx pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8d124e0 Remove duplicate condition (#17934) add 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/block.py | 31 --- tests/python/unittest/test_gluon.py | 5 +++-- 2 files changed, 27 insertions(+), 9 deletions(-)
[incubator-mxnet] branch master updated (8d124e0 -> 6198d1d)
This is an automated email from the ASF dual-hosted git repository. ptrendx pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8d124e0 Remove duplicate condition (#17934) add 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/block.py | 31 --- tests/python/unittest/test_gluon.py | 5 +++-- 2 files changed, 27 insertions(+), 9 deletions(-)
[incubator-mxnet] branch master updated (8d124e0 -> 6198d1d)
This is an automated email from the ASF dual-hosted git repository. ptrendx pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8d124e0 Remove duplicate condition (#17934) add 6198d1d Change register_op_hook to take MXNet and Python types instead of C types (#17946) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/block.py | 31 --- tests/python/unittest/test_gluon.py | 5 +++-- 2 files changed, 27 insertions(+), 9 deletions(-)
[GitHub] [incubator-mxnet] sxjscience commented on issue #18116: [Gluon] Gluon load_parameters/save_parameters does not respect the prefix flag and will be problematic when we share the parameters
sxjscience commented on issue #18116: URL: https://github.com/apache/incubator-mxnet/issues/18116#issuecomment-616816136 Confirmed that using `save_parameters(..., deduplicate=True)` will solve this problem. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on a change in pull request #18025: [DEV] switch nose with pytest
szha commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411695505 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: + + MXNET_MODULE_SEED=4018804151 pytest --log-level=DEBUG --verbose test_module.py + + Output might be: + + [WARNING] module-level seed is set: all tests running deterministically + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... [DEBUG] np and mx random seeds = 3935862516 + ok + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Copy the segfaulting-test seed into the command: + MXNET_TEST_SEED=1435005594 pytest --log-level=DEBUG --verbose test_module.py:test2 + Output might be: + + [INFO] np, mx and python random seeds = 2481884723 + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Finally reproduce the segfault directly under gdb (might need additional os packages) + by editing the bottom of test_module.py to be + + if __name__ == '__main__': + logging.getLogger().setLevel(logging.DEBUG) + test2() + + MXNET_TEST_SEED=1435005594 gdb -ex r --args python test_module.py + +4. When finished debugging the segfault, remember to unset any exported MXNET_ seed + variables in the environment to return to non-deterministic testing (a good thing). +""" + +module_seed_str = os.getenv('MXNET_MODULE_SEED') +if module_seed_str is None: +seed = random.randint(0, 2**31-1) +else: +seed = int(module_seed_str) +logging.warning('*** module-level seed is set: ' +'all tests running deterministically ***') +print('Setting module np/mx/python random seeds, ' + 'use MXNET_MODULE_SEED={} to reproduce.'.format(seed)) + +random.seed(seed) +try: +import numpy as np +import mxnet as mx +np.random.seed(seed) +mx.random.seed(seed) +except: +print('Unable to import numpy/mxnet. Skipping conftest.') + +# The MXNET_TEST_SEED environment variable will override MXNET_MODULE_SEED for tests with +# the 'with_seed()' decoration. Inform the user of this once here at the module level. +if os.getenv('MXNET_TEST_SEED') is not None: +logging.warning('*** test-level seed set: all "@with_seed()" ' +'tests run deterministically ***') + + +@pytest.hookimpl(tryfirst=True, hookwrapper=True) +def pytest_runtest_makereport(item, call): +"""Make test outcome available to fixture. + + https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures +""" +# execute all other hooks to obtain the report object +outcome = yield +rep = outcome.get_result() + +# set a report attribute for each phase of a call, which can +# be "setup", "call", "teardown" +setattr(item, "rep_" + rep.when, rep) + + +@pytest.fixture(scope='function', autouse=True) +def
[GitHub] [incubator-mxnet] ptrendx opened a new pull request #18118: Cherry-pick #17937 to v1.6.x branch
ptrendx opened a new pull request #18118: URL: https://github.com/apache/incubator-mxnet/pull/18118 * Fix for handling of negative axis, begin and end in fusion of slice ops * Added test @leezu @vafl 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18118: Cherry-pick #17937 to v1.6.x branch
mxnet-bot commented on issue #18118: URL: https://github.com/apache/incubator-mxnet/pull/18118#issuecomment-616810900 Hey @ptrendx , 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-gpu, centos-gpu, edge, clang, sanity, windows-cpu, miscellaneous, website, centos-cpu, windows-gpu, unix-cpu] *** _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: us...@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on a change in pull request #18025: [DEV] switch nose with pytest
szha commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411694272 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: Review comment: Yes, it's already logged. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #17937: Fix for handling negative indices in the fusion of slice
ptrendx commented on issue #17937: URL: https://github.com/apache/incubator-mxnet/pull/17937#issuecomment-616808445 I see. Ok, will push it there. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #17006: [RFC] Custom Operator Part 2
ptrendx commented on issue #17006: URL: https://github.com/apache/incubator-mxnet/issues/17006#issuecomment-616807857 Custom ops should be able to set the inplace property. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18116: [Gluon] Gluon load_parameters/save_parameters does not respect the prefix flag and will be problematic when we share the parameters
leezu commented on issue #18116: URL: https://github.com/apache/incubator-mxnet/issues/18116#issuecomment-616807687 Fixed by https://github.com/apache/incubator-mxnet/commit/8c44af4eba798b379c374c15582f9aea7dd7d8fd ? Need to use `deduplicate=True` We should make this default in MXNet 2 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
ptrendx commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411688191 ## File path: include/mxnet/lib_api.h ## @@ -529,7 +572,7 @@ std::string getShapeAt(const std::string& shape, unsigned index) { } /* \brief get dtype value from list of dtypes string - * format: [1] or [1,2] + * format: [1] or [1,2], returns "1" or "2" Review comment: Same as above. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements
ptrendx commented on a change in pull request #17885: URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411688053 ## File path: include/mxnet/lib_api.h ## @@ -507,16 +553,13 @@ class OpResource { void *rand_cpu_states, *rand_gpu_states; }; -/*! - * \brief Json utility to parse serialized subgraph symbol - */ /*! \brief Macro to help passing serialized subgraph through attribute dict */ #define MX_STR_SUBGRAPH_SYM_JSON "subgraph_sym_json" -#define MX_STR_DTYPE "__dtype__" -#define MX_STR_SHAPE "__shape__" +#define MX_STR_DTYPE "__ext_dtype__" +#define MX_STR_SHAPE "__ext_shape__" /* \brief get shape value from list of shapes string - * format: [[1]] or [[1],[2]] + * format: [[1]] or [[1],[2,3]], returns "[1]" or "[2,3]" Review comment: This docstring is confusing. It should have the index mentioned there (maybe something like: `getShapeAt("[[1]]", 0) returns "[1]"` and `getShapeAt("[[1],[2,3]]", 1) returns "[2,3]"`). 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on issue #18025: [DEV] switch nose with pytest
marcoabreu commented on issue #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#issuecomment-616805222 Just checked a sample pytest run in CI. Love it! Great initiative, Sheng! 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #17937: Fix for handling negative indices in the fusion of slice
leezu commented on issue #17937: URL: https://github.com/apache/incubator-mxnet/pull/17937#issuecomment-616802685 @ptrendx not everyone is using the binary wheels from pypi. Having the fix in the 1.6 branch can still be useful despite not having a 1.6.1 release in the short term 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu edited a comment on issue #18105: [Gluon] Deferred initialization error of dynamic shape operators
leezu edited a comment on issue #18105: URL: https://github.com/apache/incubator-mxnet/issues/18105#issuecomment-616801781 In general the problem of shape inference with dynamic shape operators is one motivation for adding `HybridBlock.forward` based on deferred compute. In that case, you can implement `HybridBlock.infer_shape` and work around that by it's very nature, the backend can't do shape inference on dynamic shape operators. You can also implement `HybridBlock.infer_shape` without using deferred compute interface, but then you'll get a symbol as input to `HybridBlock.infer_shape` and that may not help you to manually set the parameter shape.. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on issue #18105: [Gluon] Deferred initialization error of dynamic shape operators
leezu commented on issue #18105: URL: https://github.com/apache/incubator-mxnet/issues/18105#issuecomment-616801781 This is expected and one motivation for adding `HybridBlock.forward` based on deferred compute. In that case, you can implement `HybridBlock.infer_shape` and work around that by it's very nature, the backend can't do shape inference on dynamic shape operators. You can also implement `HybridBlock.infer_shape` without using deferred compute interface, but then you'll get a symbol as input to `HybridBlock.infer_shape` and that may not help you to manually set the parameter shape.. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on a change in pull request #18025: [DEV] switch nose with pytest
marcoabreu commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411679292 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: + + MXNET_MODULE_SEED=4018804151 pytest --log-level=DEBUG --verbose test_module.py + + Output might be: + + [WARNING] module-level seed is set: all tests running deterministically + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... [DEBUG] np and mx random seeds = 3935862516 + ok + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Copy the segfaulting-test seed into the command: + MXNET_TEST_SEED=1435005594 pytest --log-level=DEBUG --verbose test_module.py:test2 + Output might be: + + [INFO] np, mx and python random seeds = 2481884723 + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Finally reproduce the segfault directly under gdb (might need additional os packages) + by editing the bottom of test_module.py to be + + if __name__ == '__main__': + logging.getLogger().setLevel(logging.DEBUG) + test2() + + MXNET_TEST_SEED=1435005594 gdb -ex r --args python test_module.py + +4. When finished debugging the segfault, remember to unset any exported MXNET_ seed + variables in the environment to return to non-deterministic testing (a good thing). +""" + +module_seed_str = os.getenv('MXNET_MODULE_SEED') +if module_seed_str is None: +seed = random.randint(0, 2**31-1) +else: +seed = int(module_seed_str) +logging.warning('*** module-level seed is set: ' +'all tests running deterministically ***') +print('Setting module np/mx/python random seeds, ' + 'use MXNET_MODULE_SEED={} to reproduce.'.format(seed)) + +random.seed(seed) +try: +import numpy as np +import mxnet as mx +np.random.seed(seed) +mx.random.seed(seed) +except: +print('Unable to import numpy/mxnet. Skipping conftest.') + +# The MXNET_TEST_SEED environment variable will override MXNET_MODULE_SEED for tests with +# the 'with_seed()' decoration. Inform the user of this once here at the module level. +if os.getenv('MXNET_TEST_SEED') is not None: +logging.warning('*** test-level seed set: all "@with_seed()" ' +'tests run deterministically ***') + + +@pytest.hookimpl(tryfirst=True, hookwrapper=True) +def pytest_runtest_makereport(item, call): +"""Make test outcome available to fixture. + + https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures +""" +# execute all other hooks to obtain the report object +outcome = yield +rep = outcome.get_result() + +# set a report attribute for each phase of a call, which can +# be "setup", "call", "teardown" +setattr(item, "rep_" + rep.when, rep) + + +@pytest.fixture(scope='function', autouse=True) +def
[GitHub] [incubator-mxnet] marcoabreu commented on a change in pull request #18025: [DEV] switch nose with pytest
marcoabreu commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411678829 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: Review comment: Ah, it seems like the test seed value is actually printed as I requested here: https://github.com/apache/incubator-mxnet/pull/18025/files#diff-c9b030b0828c1291b56fc10aba6baab6R204 Is that correct? 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
ptrendx commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616797095 @mxnet-bot run ci [windows-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: us...@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on issue #18113: [v1.7.x] cherry pick #17741 to v1.7.x
mxnet-bot commented on issue #18113: URL: https://github.com/apache/incubator-mxnet/pull/18113#issuecomment-616797169 Jenkins CI successfully triggered : [windows-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: us...@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on a change in pull request #18025: [DEV] switch nose with pytest
marcoabreu commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411677218 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: + + MXNET_MODULE_SEED=4018804151 pytest --log-level=DEBUG --verbose test_module.py + + Output might be: + + [WARNING] module-level seed is set: all tests running deterministically + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... [DEBUG] np and mx random seeds = 3935862516 + ok + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Copy the segfaulting-test seed into the command: + MXNET_TEST_SEED=1435005594 pytest --log-level=DEBUG --verbose test_module.py:test2 + Output might be: + + [INFO] np, mx and python random seeds = 2481884723 + test_module.test2 ... [DEBUG] np and mx random seeds = 1435005594 + Illegal instruction (core dumped) + +3. Finally reproduce the segfault directly under gdb (might need additional os packages) + by editing the bottom of test_module.py to be + + if __name__ == '__main__': + logging.getLogger().setLevel(logging.DEBUG) + test2() + + MXNET_TEST_SEED=1435005594 gdb -ex r --args python test_module.py + +4. When finished debugging the segfault, remember to unset any exported MXNET_ seed + variables in the environment to return to non-deterministic testing (a good thing). +""" + +module_seed_str = os.getenv('MXNET_MODULE_SEED') +if module_seed_str is None: +seed = random.randint(0, 2**31-1) +else: +seed = int(module_seed_str) +logging.warning('*** module-level seed is set: ' +'all tests running deterministically ***') +print('Setting module np/mx/python random seeds, ' + 'use MXNET_MODULE_SEED={} to reproduce.'.format(seed)) + +random.seed(seed) +try: +import numpy as np +import mxnet as mx +np.random.seed(seed) +mx.random.seed(seed) +except: +print('Unable to import numpy/mxnet. Skipping conftest.') Review comment: Inconsistent use of print/logging 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] marcoabreu commented on a change in pull request #18025: [DEV] switch nose with pytest
marcoabreu commented on a change in pull request #18025: URL: https://github.com/apache/incubator-mxnet/pull/18025#discussion_r411675629 ## File path: conftest.py ## @@ -0,0 +1,226 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +"""conftest.py contains configuration for pytest. + +Configuration file for tests in tests/ and scripts/ folders. + +Note that fixtures of higher-scoped fixtures (such as ``session``) are +instantiated before lower-scoped fixtures (such as ``function``). + +""" + +import logging +import os +import random + +import pytest + + +def pytest_sessionfinish(session, exitstatus): +if exitstatus == 5: # Don't fail if no tests were run +session.exitstatus = 0 + + +# * Random seed setup +def pytest_configure(): +"""Pytest configuration hook to help reproduce test segfaults + +Sets and outputs rng seeds. + +The segfault-debug procedure on a module called test_module.py is: + +1. run "pytest --verbose test_module.py". A seg-faulting output might be: + + [INFO] np, mx and python random seeds = 4018804151 + test_module.test1 ... ok + test_module.test2 ... Illegal instruction (core dumped) + +2. Copy the module-starting seed into the next command, then run: Review comment: Would it be possible to simplify this process? It seems like multiple iterations would be required to get the correct seed. Instead, would it be possible to print the used seeds after a test failed? 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] ptrendx commented on issue #17937: Fix for handling negative indices in the fusion of slice
ptrendx commented on issue #17937: URL: https://github.com/apache/incubator-mxnet/pull/17937#issuecomment-616789589 @vafl There is pretty much 0 chance that something like 1.6.1 would happen before 1.7.0 (at least that 's my understanding, @szha please correct me if I'm wrong), is there anything preventing GluonTS from jumping straight to 1.7? 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] vafl commented on issue #17937: Fix for handling negative indices in the fusion of slice
vafl commented on issue #17937: URL: https://github.com/apache/incubator-mxnet/pull/17937#issuecomment-616788157 > Yes, I'm going to backport my prs. Thanks for the fix. I'm wondering when are you planning to release a fix for 1.6? This is a somewhat urgent issue for gluonts. 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: us...@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience opened a new issue #18117: [Gluon][Numpy] Bug of save parameters with numpy front-end
sxjscience opened a new issue #18117: URL: https://github.com/apache/incubator-mxnet/issues/18117 Reproducible example: ```python import mxnet as mx from mxnet.gluon import HybridBlock, nn import os mx.npx.set_np() class Foo(HybridBlock): def __init__(self, prefix=None, params=None): super().__init__(prefix=prefix, params=params) with self.name_scope(): self.l1 = nn.Dense(2048, prefix='layer_') def hybrid_forward(self, F, x): return self.l1(x) foo = Foo() foo.initialize() foo(mx.np.ones((32, 2048))) foo.collect_params().save('test.params') ``` Error: ``` --- TypeError Traceback (most recent call last) in 17 foo.initialize() 18 foo(mx.np.ones((32, 2048))) ---> 19 foo.collect_params().save('test.params') 20 ~/mxnet/python/mxnet/gluon/parameter.py in save(self, filename, strip_prefix) 984 strip_prefix, param.name, strip_prefix)) 985 arg_dict[param.name[len(strip_prefix):]] = weight --> 986 ndarray.save(filename, arg_dict) 987 988 def load(self, filename, ctx=None, allow_missing=False, ~/mxnet/python/mxnet/ndarray/utils.py in save(fname, data) 260 raise TypeError('save only accept dict str->NDArray or list of NDArray') 261 if any(isinstance(v, np_ndarray) for v in nd_vals): --> 262 raise TypeError('cannot save mxnet.numpy.ndarray using mxnet.ndarray.save;' 263 ' use mxnet.numpy.save instead.') 264 keys = c_str_array(str_keys) TypeError: cannot save mxnet.numpy.ndarray using mxnet.ndarray.save; use mxnet.numpy.save instead. ``` 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: us...@infra.apache.org