[incubator-mxnet] branch master updated (0b06255 -> b8490c5)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0b06255 Fix MXNET_PROFILER_MODE in profiler documentation (#18439) add b8490c5 More clear description to `transform_first` (#18444) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/dataset.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (0b06255 -> b8490c5)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0b06255 Fix MXNET_PROFILER_MODE in profiler documentation (#18439) add b8490c5 More clear description to `transform_first` (#18444) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/dataset.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (0b06255 -> b8490c5)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0b06255 Fix MXNET_PROFILER_MODE in profiler documentation (#18439) add b8490c5 More clear description to `transform_first` (#18444) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/dataset.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (0b06255 -> b8490c5)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0b06255 Fix MXNET_PROFILER_MODE in profiler documentation (#18439) add b8490c5 More clear description to `transform_first` (#18444) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/dataset.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (0b06255 -> b8490c5)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0b06255 Fix MXNET_PROFILER_MODE in profiler documentation (#18439) add b8490c5 More clear description to `transform_first` (#18444) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/dataset.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (5fd9024 -> 8c76631)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 5fd9024 Update to thrust 1.9.8 on Windows (#18218) add 8c76631 Relaxing type requirements for broadcast_like (#17977) No new revisions were added by this update. Summary of changes: src/operator/tensor/broadcast_reduce_op_value.cc | 11 ++- tests/python/unittest/test_operator.py | 10 ++ 2 files changed, 20 insertions(+), 1 deletion(-)
[incubator-mxnet] branch master updated: Relaxing type requirements for broadcast_like (#17977)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 8c76631 Relaxing type requirements for broadcast_like (#17977) 8c76631 is described below commit 8c76631caa5f349aef5d515ec95a64d2954dbcef Author: wicky AuthorDate: Mon May 4 14:03:33 2020 +0800 Relaxing type requirements for broadcast_like (#17977) * Relaxing type requirements for broadcast_like * enhance unit test --- src/operator/tensor/broadcast_reduce_op_value.cc | 11 ++- tests/python/unittest/test_operator.py | 10 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/operator/tensor/broadcast_reduce_op_value.cc b/src/operator/tensor/broadcast_reduce_op_value.cc index 0a14a20..71be8f8 100644 --- a/src/operator/tensor/broadcast_reduce_op_value.cc +++ b/src/operator/tensor/broadcast_reduce_op_value.cc @@ -138,7 +138,16 @@ NNVM_REGISTER_OP(broadcast_like) [](const NodeAttrs& attrs) { return std::vector{"lhs", "rhs"}; }) -.set_attr("FInferType", ElemwiseType<2, 1>) +.set_attr("FInferType", [](const nnvm::NodeAttrs& attrs, + std::vector *in_attrs, + std::vector *out_attrs) { + CHECK_EQ(in_attrs->size(), 2) << " in operator " << attrs.name; + std::vector checked_in_attrs = { (*in_attrs)[0] }; + bool ret = !type_is_none((*in_attrs)[1]) && + ElemwiseType<1, 1>(attrs, _in_attrs, out_attrs); + (*in_attrs)[0] = checked_in_attrs[0]; + return ret; +}) .set_attr("FGradient", [](const nnvm::ObjectPtr& n, const std::vector& ograds) { diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 0baa941..4b8ddd6 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -3120,6 +3120,16 @@ def test_reshape_like_different_types(): assert_allclose(z.asnumpy(), [[0,0],[0,0],[0,0]]) @with_seed() +def test_broadcast_like_different_types(): +x = mx.nd.zeros((2, 1)) +y = mx.nd.ones((2, 2)) + +y = mx.nd.array(y).astype('int32') +z = mx.nd.broadcast_like(x, y) +assert_allclose(z.asnumpy(), [[0,0],[0,0]]) +assert x.dtype == z.dtype + +@with_seed() def test_flip(): for ndim in range(1, 6): for t in range(5):
[incubator-mxnet] branch master updated (586c8ab -> 8d124e0)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 586c8ab CI: Simplify CentOS7 CI/CD config (#18093) add 8d124e0 Remove duplicate condition (#17934) No new revisions were added by this update. Summary of changes: src/operator/numpy/linalg/np_eig-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (586c8ab -> 8d124e0)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 586c8ab CI: Simplify CentOS7 CI/CD config (#18093) add 8d124e0 Remove duplicate condition (#17934) No new revisions were added by this update. Summary of changes: src/operator/numpy/linalg/np_eig-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated: [Bug Fix] support multiple-dim input for unravel_index (#17748)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 6692d2c [Bug Fix] support multiple-dim input for unravel_index (#17748) 6692d2c is described below commit 6692d2cc76c4bb841d43abbe53f4d4aff059ba77 Author: JackieWu AuthorDate: Sat Apr 11 21:43:12 2020 +0800 [Bug Fix] support multiple-dim input for unravel_index (#17748) * support multiple-dim input for unravel_index * sanity --- src/operator/tensor/ravel.cc | 12 ++-- src/operator/tensor/ravel.h| 19 ++- tests/python/unittest/test_operator.py | 13 + 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/operator/tensor/ravel.cc b/src/operator/tensor/ravel.cc index e04628e..e7cd303 100644 --- a/src/operator/tensor/ravel.cc +++ b/src/operator/tensor/ravel.cc @@ -62,8 +62,16 @@ NNVM_REGISTER_OP(_unravel_index) Examples:: A = [22,41,37] - unravel(A, shape=(7,6)) = [[3,6,6],[4,5,1]] - unravel(A, shape=(-1,6)) = [[3,6,6],[4,5,1]] + unravel_index(A, shape=(7,6)) = [[3,6,6], +[4,5,1]] + unravel_index(A, shape=(-1,6)) = [[3,6,6], + [4,5,1]] + + B = [[22,41,37],[10,11,15]] + unravel_index(B, shape=(7,6)) = [[[3,6,6],[1,1,2]], +[[4,5,1],[4,5,3]]] + unravel_index(B, shape=(-1,6)) = [[[3,6,6],[1,1,2]], + [[4,5,1],[4,5,3]]] )code" ADD_FILELINE) .set_num_inputs(1) diff --git a/src/operator/tensor/ravel.h b/src/operator/tensor/ravel.h index d96b9cf..abf9383 100644 --- a/src/operator/tensor/ravel.h +++ b/src/operator/tensor/ravel.h @@ -76,16 +76,24 @@ inline bool UnravelOpShape(const nnvm::NodeAttrs& attrs, CHECK_EQ(in_attrs->size(), 1); CHECK_EQ(out_attrs->size(), 1); CHECK_GT(shape.ndim(), 0) << "Empty shape parameter for unravel operator."; - if ((*in_attrs)[0].ndim() > 0) { -SHAPE_ASSIGN_CHECK(*out_attrs, 0, Shape2(shape.ndim(), (*in_attrs)[0][0])); + const mxnet::TShape _shape = (*in_attrs)[0]; + if (in_shape.ndim() > 0) { +mxnet::TShape out_shape(in_shape.ndim() + 1, -1); +out_shape[0] = shape.ndim(); +for (int i = 0; i < in_shape.ndim(); ++i) { + out_shape[i+1] = in_shape[i]; +} +SHAPE_ASSIGN_CHECK(*out_attrs, 0, out_shape); return true; } if ((*out_attrs)[0].ndim() > 0) { +const mxnet::TShape _shape = (*out_attrs)[0]; CHECK_EQ((*out_attrs)[0].ndim(), 2) << "Output of unravel operator must be two-dimensional."; CHECK_EQ((*out_attrs)[0][0], shape.ndim()) << "First dimension of output of ravel operator does not match shape parameter dimension."; -SHAPE_ASSIGN_CHECK(*in_attrs, 0, Shape1((*out_attrs)[0][1])); +SHAPE_ASSIGN_CHECK(*in_attrs, 0, mxnet::TShape( + out_shape.data() + 1, out_shape.data() + out_shape.ndim())); return true; } return false; @@ -156,8 +164,9 @@ void UnravelForward(const nnvm::NodeAttrs& attrs, MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, OType, { Tensor in = inputs[0].FlatTo1D(s); Tensor out = outputs[0].FlatTo1D(s); -mxnet_op::Kernel::Launch(s, in.size(0), in.size(0), out.size(0)/in.size(0), - work.dptr_, out.dptr_, in.dptr_); +mxnet_op::Kernel::Launch( +s, in.shape_.Size(), in.shape_.Size(), shape.ndim(), +work.dptr_, out.dptr_, in.dptr_); }); } diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 0c795db..230073a 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -8427,6 +8427,19 @@ def test_ravel(): c = mx.sym.unravel_index(a, shape=shape2) check_symbolic_forward(c, location={'a': ravel_npy}, expected=[data]) + +@with_seed() +def test_unravel_index(): +unravel_shape = (2, 10) +unravel_size = np.prod(unravel_shape) +for shape in [(10,), (2, 10), (3, 4, 5)]: +a = np.random.randint(0, unravel_size, size=shape) +b = np.stack(np.unravel_index(a, shape=unravel_shape), 0) +a_mx = mx.nd.array(a) +b_mx = mx.nd.unravel_index(a_mx, shape=unravel_shape) +assert_array_equal(b, b_mx.asnumpy()) + + def test_context_num_gpus(): try: # Note: the test is run both on GPU and CPU hosts, so that we can not assert
[incubator-mxnet] branch master updated: Adding sparse support to MXTensor for custom operators (#17569)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new f01dc80 Adding sparse support to MXTensor for custom operators (#17569) f01dc80 is described below commit f01dc80f030d2d1912c8e134c95f373e9f1f8e7b Author: guanxinq <58794120+guanx...@users.noreply.github.com> AuthorDate: Sun Mar 22 03:50:55 2020 -0700 Adding sparse support to MXTensor for custom operators (#17569) * Added enum for sparse storage * Add structure for Dense and Sparse * redesign the data structure for MXSparse * pull out aux data from sparse NDArray * Added more sparse arguments to API interface * Passed sparse from c_api to lib_api.h and set in MXTensor * Fix indent * fix segfault * Fix NDArray to MXTensor errors * Add a sample of sparse(CSR) transpose * Make CSR transpose temporarily work by hardcoding * Fixed sparse output size(Refined) * Add tests for symbolic and stateful ops * Added a sample for row sparse transpose * Added real row sparse transpose * Fix output size issue by adding lambda for CheckAndAlloc() * Fix mixed storage formats error * Added infer storage type function * resolve comments * Set inferSType as optional function * Resolve comments * Add error messages * Resolve comments * verify transpose ops results * fix sanity check * update MX_LIBRARY_VERSION to 5 --- example/extensions/lib_custom_op/Makefile | 10 +- .../extensions/lib_custom_op/test_transposecsr.py | 78 ++ .../lib_custom_op/test_transposerowsp.py | 73 ++ .../extensions/lib_custom_op/transposecsr_lib.cc | 197 ++ .../extensions/lib_custom_op/transposerowsp_lib.cc | 199 ++ example/extensions/lib_subgraph/subgraph_lib.cc| 4 +- include/mxnet/lib_api.h| 286 ++--- src/c_api/c_api.cc | 119 - 8 files changed, 919 insertions(+), 47 deletions(-) diff --git a/example/extensions/lib_custom_op/Makefile b/example/extensions/lib_custom_op/Makefile index edd753b..feded29 100644 --- a/example/extensions/lib_custom_op/Makefile +++ b/example/extensions/lib_custom_op/Makefile @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -all: gemm_lib relu_lib +all: gemm_lib relu_lib transposecsr_lib transposerowsp_lib gemm_lib: g++ -shared -fPIC -std=c++11 gemm_lib.cc -o libgemm_lib.so -I ../../../include/mxnet @@ -23,5 +23,11 @@ gemm_lib: relu_lib: nvcc -shared -std=c++11 -Xcompiler -fPIC relu_lib.cu -o librelu_lib.so -I ../../../include/mxnet +transposecsr_lib: + g++ -shared -fPIC -std=c++11 transposecsr_lib.cc -o libtransposecsr_lib.so -I ../../../include/mxnet + +transposerowsp_lib: + g++ -shared -fPIC -std=c++11 transposerowsp_lib.cc -o libtransposerowsp_lib.so -I ../../../include/mxnet + clean: - rm -rf libgemm_lib.so librelu_lib.so + rm -rf libgemm_lib.so librelu_lib.so libtransposecsr_lib.so libtransposerowsp_lib.so diff --git a/example/extensions/lib_custom_op/test_transposecsr.py b/example/extensions/lib_custom_op/test_transposecsr.py new file mode 100644 index 000..37d066a --- /dev/null +++ b/example/extensions/lib_custom_op/test_transposecsr.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +# 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. + +# coding: utf-8 +# pylint: disable=arguments-differ + +# This test checks dynamic loading of custom library into MXNet +# and checks end to end compute of a simple 2D gemm custom op + +import mxnet as mx +import os + +#load library +if (os.name=='posix'): +path = os.path.abspath('libtransposecsr_lib.so') +mx.library.load(path) +elif (os.name=='nt'): +path = os.path.abspath('libtransposecsr_lib.dll') +mx.library.load(path) + +a = mx.nd.array([[1,3,0,2
[incubator-mxnet] branch master updated: Adding sparse support to MXTensor for custom operators (#17569)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new f01dc80 Adding sparse support to MXTensor for custom operators (#17569) f01dc80 is described below commit f01dc80f030d2d1912c8e134c95f373e9f1f8e7b Author: guanxinq <58794120+guanx...@users.noreply.github.com> AuthorDate: Sun Mar 22 03:50:55 2020 -0700 Adding sparse support to MXTensor for custom operators (#17569) * Added enum for sparse storage * Add structure for Dense and Sparse * redesign the data structure for MXSparse * pull out aux data from sparse NDArray * Added more sparse arguments to API interface * Passed sparse from c_api to lib_api.h and set in MXTensor * Fix indent * fix segfault * Fix NDArray to MXTensor errors * Add a sample of sparse(CSR) transpose * Make CSR transpose temporarily work by hardcoding * Fixed sparse output size(Refined) * Add tests for symbolic and stateful ops * Added a sample for row sparse transpose * Added real row sparse transpose * Fix output size issue by adding lambda for CheckAndAlloc() * Fix mixed storage formats error * Added infer storage type function * resolve comments * Set inferSType as optional function * Resolve comments * Add error messages * Resolve comments * verify transpose ops results * fix sanity check * update MX_LIBRARY_VERSION to 5 --- example/extensions/lib_custom_op/Makefile | 10 +- .../extensions/lib_custom_op/test_transposecsr.py | 78 ++ .../lib_custom_op/test_transposerowsp.py | 73 ++ .../extensions/lib_custom_op/transposecsr_lib.cc | 197 ++ .../extensions/lib_custom_op/transposerowsp_lib.cc | 199 ++ example/extensions/lib_subgraph/subgraph_lib.cc| 4 +- include/mxnet/lib_api.h| 286 ++--- src/c_api/c_api.cc | 119 - 8 files changed, 919 insertions(+), 47 deletions(-) diff --git a/example/extensions/lib_custom_op/Makefile b/example/extensions/lib_custom_op/Makefile index edd753b..feded29 100644 --- a/example/extensions/lib_custom_op/Makefile +++ b/example/extensions/lib_custom_op/Makefile @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -all: gemm_lib relu_lib +all: gemm_lib relu_lib transposecsr_lib transposerowsp_lib gemm_lib: g++ -shared -fPIC -std=c++11 gemm_lib.cc -o libgemm_lib.so -I ../../../include/mxnet @@ -23,5 +23,11 @@ gemm_lib: relu_lib: nvcc -shared -std=c++11 -Xcompiler -fPIC relu_lib.cu -o librelu_lib.so -I ../../../include/mxnet +transposecsr_lib: + g++ -shared -fPIC -std=c++11 transposecsr_lib.cc -o libtransposecsr_lib.so -I ../../../include/mxnet + +transposerowsp_lib: + g++ -shared -fPIC -std=c++11 transposerowsp_lib.cc -o libtransposerowsp_lib.so -I ../../../include/mxnet + clean: - rm -rf libgemm_lib.so librelu_lib.so + rm -rf libgemm_lib.so librelu_lib.so libtransposecsr_lib.so libtransposerowsp_lib.so diff --git a/example/extensions/lib_custom_op/test_transposecsr.py b/example/extensions/lib_custom_op/test_transposecsr.py new file mode 100644 index 000..37d066a --- /dev/null +++ b/example/extensions/lib_custom_op/test_transposecsr.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +# 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. + +# coding: utf-8 +# pylint: disable=arguments-differ + +# This test checks dynamic loading of custom library into MXNet +# and checks end to end compute of a simple 2D gemm custom op + +import mxnet as mx +import os + +#load library +if (os.name=='posix'): +path = os.path.abspath('libtransposecsr_lib.so') +mx.library.load(path) +elif (os.name=='nt'): +path = os.path.abspath('libtransposecsr_lib.dll') +mx.library.load(path) + +a = mx.nd.array([[1,3,0,2
[incubator-mxnet] branch master updated: Additional fix for vector access. (#17230)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 7743fb0 Additional fix for vector access. (#17230) 7743fb0 is described below commit 7743fb0c516032c39cbf15a7715a9d36a5cd8e18 Author: aws-taylor <57725958+aws-tay...@users.noreply.github.com> AuthorDate: Sun Feb 16 07:57:46 2020 -0800 Additional fix for vector access. (#17230) * Additional fix for vector access. See https://github.com/apache/incubator-mxnet/commit/9634786f96388004f68c223d72e120ad425c2f12 for the original. * CI * ci * ci * retrigger CI * ci Co-authored-by: JackieWu --- 3rdparty/mshadow/mshadow/dot_engine-inl.h | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/3rdparty/mshadow/mshadow/dot_engine-inl.h b/3rdparty/mshadow/mshadow/dot_engine-inl.h index 1a02eb9..d9abf29 100644 --- a/3rdparty/mshadow/mshadow/dot_engine-inl.h +++ b/3rdparty/mshadow/mshadow/dot_engine-inl.h @@ -421,12 +421,9 @@ struct BLASEngine { CBLAS_TRANSPOSE p_transa[GROUP_SIZE] = {cblas_a_trans}; CBLAS_TRANSPOSE p_transb[GROUP_SIZE] = {cblas_b_trans}; - std::vector pp_A; - std::vector pp_B; - std::vector pp_C; - pp_A.reserve(batch_count); - pp_B.reserve(batch_count); - pp_C.reserve(batch_count); + std::vector pp_A(batch_count, nullptr); + std::vector pp_B(batch_count, nullptr); + std::vector pp_C(batch_count, nullptr); auto m_k = m * k; auto k_n = k * n;
[incubator-mxnet] branch master updated: Additional fix for vector access. (#17230)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 7743fb0 Additional fix for vector access. (#17230) 7743fb0 is described below commit 7743fb0c516032c39cbf15a7715a9d36a5cd8e18 Author: aws-taylor <57725958+aws-tay...@users.noreply.github.com> AuthorDate: Sun Feb 16 07:57:46 2020 -0800 Additional fix for vector access. (#17230) * Additional fix for vector access. See https://github.com/apache/incubator-mxnet/commit/9634786f96388004f68c223d72e120ad425c2f12 for the original. * CI * ci * ci * retrigger CI * ci Co-authored-by: JackieWu --- 3rdparty/mshadow/mshadow/dot_engine-inl.h | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/3rdparty/mshadow/mshadow/dot_engine-inl.h b/3rdparty/mshadow/mshadow/dot_engine-inl.h index 1a02eb9..d9abf29 100644 --- a/3rdparty/mshadow/mshadow/dot_engine-inl.h +++ b/3rdparty/mshadow/mshadow/dot_engine-inl.h @@ -421,12 +421,9 @@ struct BLASEngine { CBLAS_TRANSPOSE p_transa[GROUP_SIZE] = {cblas_a_trans}; CBLAS_TRANSPOSE p_transb[GROUP_SIZE] = {cblas_b_trans}; - std::vector pp_A; - std::vector pp_B; - std::vector pp_C; - pp_A.reserve(batch_count); - pp_B.reserve(batch_count); - pp_C.reserve(batch_count); + std::vector pp_A(batch_count, nullptr); + std::vector pp_B(batch_count, nullptr); + std::vector pp_C(batch_count, nullptr); auto m_k = m * k; auto k_n = k * n;
[incubator-mxnet] branch master updated: update symbol to json (#16948)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 9c10ed4 update symbol to json (#16948) 9c10ed4 is described below commit 9c10ed4c33f88fb27a1eca112bbd6bc5a6e3b1f9 Author: chinakook AuthorDate: Sun Feb 16 23:57:02 2020 +0800 update symbol to json (#16948) * update symbol to json add remove_amp_cast argument to keep same with symbol.save * retrigger CI Co-authored-by: JackieWu --- python/mxnet/symbol/symbol.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/mxnet/symbol/symbol.py b/python/mxnet/symbol/symbol.py index 6d9bf04..a4599c8 100644 --- a/python/mxnet/symbol/symbol.py +++ b/python/mxnet/symbol/symbol.py @@ -1364,7 +1364,7 @@ class Symbol(SymbolBase): else: check_call(_LIB.MXSymbolSaveToFile(self.handle, c_str(fname))) -def tojson(self): +def tojson(self, remove_amp_cast=True): """Saves symbol to a JSON string. See Also @@ -1372,7 +1372,12 @@ class Symbol(SymbolBase): symbol.load_json : Used to load symbol from JSON string. """ json_str = ctypes.c_char_p() -check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str))) +if remove_amp_cast: +handle = SymbolHandle() +check_call(_LIB.MXSymbolRemoveAmpCast(self.handle, ctypes.byref(handle))) +check_call(_LIB.MXSymbolSaveToJSON(handle, ctypes.byref(json_str))) +else: +check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str))) return py_str(json_str.value) @staticmethod
[incubator-mxnet] branch master updated: update symbol to json (#16948)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 9c10ed4 update symbol to json (#16948) 9c10ed4 is described below commit 9c10ed4c33f88fb27a1eca112bbd6bc5a6e3b1f9 Author: chinakook AuthorDate: Sun Feb 16 23:57:02 2020 +0800 update symbol to json (#16948) * update symbol to json add remove_amp_cast argument to keep same with symbol.save * retrigger CI Co-authored-by: JackieWu --- python/mxnet/symbol/symbol.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/mxnet/symbol/symbol.py b/python/mxnet/symbol/symbol.py index 6d9bf04..a4599c8 100644 --- a/python/mxnet/symbol/symbol.py +++ b/python/mxnet/symbol/symbol.py @@ -1364,7 +1364,7 @@ class Symbol(SymbolBase): else: check_call(_LIB.MXSymbolSaveToFile(self.handle, c_str(fname))) -def tojson(self): +def tojson(self, remove_amp_cast=True): """Saves symbol to a JSON string. See Also @@ -1372,7 +1372,12 @@ class Symbol(SymbolBase): symbol.load_json : Used to load symbol from JSON string. """ json_str = ctypes.c_char_p() -check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str))) +if remove_amp_cast: +handle = SymbolHandle() +check_call(_LIB.MXSymbolRemoveAmpCast(self.handle, ctypes.byref(handle))) +check_call(_LIB.MXSymbolSaveToJSON(handle, ctypes.byref(json_str))) +else: +check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str))) return py_str(json_str.value) @staticmethod
[incubator-mxnet] branch master updated (2f6cdd3 -> 99d5773)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 2f6cdd3 Enable MKL-DNN by default in pip packages (#16899) add 99d5773 Update CustomOp doc with changes for GPU support (#17486) No new revisions were added by this update. Summary of changes: example/extensions/lib_custom_op/README.md | 328 +++-- 1 file changed, 265 insertions(+), 63 deletions(-)
[incubator-mxnet] branch master updated (2f6cdd3 -> 99d5773)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 2f6cdd3 Enable MKL-DNN by default in pip packages (#16899) add 99d5773 Update CustomOp doc with changes for GPU support (#17486) No new revisions were added by this update. Summary of changes: example/extensions/lib_custom_op/README.md | 328 +++-- 1 file changed, 265 insertions(+), 63 deletions(-)
[incubator-mxnet] branch master updated (6214c4d -> a726c40)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6214c4d Fix syntax error in JenkinsfileForBinaries (#17431) add a726c40 Dynamic custom operator GPU support (#17270) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 36 +- Makefile | 20 +- ci/jenkins/Jenkins_steps.groovy| 14 +- example/extensions/lib_custom_op/Makefile | 7 +- example/extensions/lib_custom_op/gemm_lib.cc | 17 +- example/extensions/lib_custom_op/relu_lib.cu | 191 + .../lib_custom_op/{test_gemm.py => test_relu.py} | 81 ++-- example/extensions/lib_subgraph/subgraph_lib.cc| 6 +- include/mxnet/lib_api.h| 328 ++- src/c_api/c_api.cc | 467 - tests/python/unittest/test_extensions.py | 66 ++- 11 files changed, 843 insertions(+), 390 deletions(-) create mode 100644 example/extensions/lib_custom_op/relu_lib.cu copy example/extensions/lib_custom_op/{test_gemm.py => test_relu.py} (52%)
[incubator-mxnet] branch master updated (6214c4d -> a726c40)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6214c4d Fix syntax error in JenkinsfileForBinaries (#17431) add a726c40 Dynamic custom operator GPU support (#17270) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 36 +- Makefile | 20 +- ci/jenkins/Jenkins_steps.groovy| 14 +- example/extensions/lib_custom_op/Makefile | 7 +- example/extensions/lib_custom_op/gemm_lib.cc | 17 +- example/extensions/lib_custom_op/relu_lib.cu | 191 + .../lib_custom_op/{test_gemm.py => test_relu.py} | 81 ++-- example/extensions/lib_subgraph/subgraph_lib.cc| 6 +- include/mxnet/lib_api.h| 328 ++- src/c_api/c_api.cc | 467 - tests/python/unittest/test_extensions.py | 66 ++- 11 files changed, 843 insertions(+), 390 deletions(-) create mode 100644 example/extensions/lib_custom_op/relu_lib.cu copy example/extensions/lib_custom_op/{test_gemm.py => test_relu.py} (52%)
[incubator-mxnet] branch master updated: Minor fix, use RAII for TensorRT builder and network object (#17189)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 651eb9d Minor fix, use RAII for TensorRT builder and network object (#17189) 651eb9d is described below commit 651eb9d5610464dac2603e64cd110d2bdf63bd8a Author: taoli AuthorDate: Fri Jan 10 23:45:17 2020 +0800 Minor fix, use RAII for TensorRT builder and network object (#17189) --- src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc b/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc index 4e7ff66..b02d109 100644 --- a/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc +++ b/src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc @@ -77,8 +77,8 @@ std::tuple, GOOGLE_PROTOBUF_VERIFY_VERSION; auto trt_logger = std::unique_ptr(new TRT_Logger(verbosity)); - auto trt_builder = nvinfer1::createInferBuilder(*trt_logger); - auto trt_network = trt_builder->createNetwork(); + auto trt_builder = InferObject(nvinfer1::createInferBuilder(*trt_logger)); + auto trt_network = InferObject(trt_builder->createNetwork()); auto trt_parser = InferObject(nvonnxparser::createParser(*trt_network, *trt_logger)); ::ONNX_NAMESPACE::ModelProto parsed_model; // We check for a valid parse, but the main effect is the side effect @@ -125,8 +125,6 @@ std::tuple, trt_builder->setMaxWorkspaceSize(max_workspace_size); trt_builder->setDebugSync(debug_builder); auto trt_engine = InferObject(trt_builder->buildCudaEngine(*trt_network)); - trt_builder->destroy(); - trt_network->destroy(); return std::make_tuple(std::move(trt_engine), std::move(trt_parser), std::move(trt_logger)); }
[incubator-mxnet] branch master updated (c1f6d64 -> ddeac2e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from c1f6d64 Enhancements for MXTensor for custom operators (#17204) add ddeac2e Dynamic subgraph property (#17034) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 5 + Makefile | 8 +- ci/jenkins/Jenkins_steps.groovy| 14 +- example/extensions/lib_custom_op/Makefile | 7 +- example/extensions/lib_custom_op/subgraph_lib.cc | 98 .../{lib_custom_op => lib_subgraph}/Makefile | 7 +- example/extensions/lib_subgraph/subgraph_lib.cc| 250 + .../test_subgraph.py | 46 ++-- include/mxnet/lib_api.h| 185 ++- src/c_api/c_api.cc | 77 ++- src/operator/subgraph/build_subgraph.cc| 20 ++ .../partitioner/custom_subgraph_property.h | 235 +++ src/operator/subgraph/subgraph_property.h | 9 + tests/python/unittest/test_extensions.py | 64 ++ 14 files changed, 881 insertions(+), 144 deletions(-) delete mode 100644 example/extensions/lib_custom_op/subgraph_lib.cc copy example/extensions/{lib_custom_op => lib_subgraph}/Makefile (84%) create mode 100644 example/extensions/lib_subgraph/subgraph_lib.cc rename example/extensions/{lib_custom_op => lib_subgraph}/test_subgraph.py (52%) create mode 100644 src/operator/subgraph/partitioner/custom_subgraph_property.h
[incubator-mxnet] branch master updated (c1f6d64 -> ddeac2e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from c1f6d64 Enhancements for MXTensor for custom operators (#17204) add ddeac2e Dynamic subgraph property (#17034) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 5 + Makefile | 8 +- ci/jenkins/Jenkins_steps.groovy| 14 +- example/extensions/lib_custom_op/Makefile | 7 +- example/extensions/lib_custom_op/subgraph_lib.cc | 98 .../{lib_custom_op => lib_subgraph}/Makefile | 7 +- example/extensions/lib_subgraph/subgraph_lib.cc| 250 + .../test_subgraph.py | 46 ++-- include/mxnet/lib_api.h| 185 ++- src/c_api/c_api.cc | 77 ++- src/operator/subgraph/build_subgraph.cc| 20 ++ .../partitioner/custom_subgraph_property.h | 235 +++ src/operator/subgraph/subgraph_property.h | 9 + tests/python/unittest/test_extensions.py | 64 ++ 14 files changed, 881 insertions(+), 144 deletions(-) delete mode 100644 example/extensions/lib_custom_op/subgraph_lib.cc copy example/extensions/{lib_custom_op => lib_subgraph}/Makefile (84%) create mode 100644 example/extensions/lib_subgraph/subgraph_lib.cc rename example/extensions/{lib_custom_op => lib_subgraph}/test_subgraph.py (52%) create mode 100644 src/operator/subgraph/partitioner/custom_subgraph_property.h
[incubator-mxnet] branch master updated (f17d19b -> c1f6d64)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from f17d19b [Numpy] Add broadcast_to scalar case (#17233) add c1f6d64 Enhancements for MXTensor for custom operators (#17204) No new revisions were added by this update. Summary of changes: include/mxnet/lib_api.h | 90 - src/c_api/c_api.cc | 17 +++--- 2 files changed, 57 insertions(+), 50 deletions(-)
[incubator-mxnet] branch master updated (f17d19b -> c1f6d64)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from f17d19b [Numpy] Add broadcast_to scalar case (#17233) add c1f6d64 Enhancements for MXTensor for custom operators (#17204) No new revisions were added by this update. Summary of changes: include/mxnet/lib_api.h | 90 - src/c_api/c_api.cc | 17 +++--- 2 files changed, 57 insertions(+), 50 deletions(-)
[incubator-mxnet] branch master updated (4ea9aef -> 3e638b4)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 4ea9aef Fix BoxNMS GPU workspace size (#17190) add 3e638b4 minor fix for ncf readme (#17191) No new revisions were added by this update. Summary of changes: example/neural_collaborative_filtering/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (55e222b -> 4ea9aef)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 55e222b Interleaved MHA for CPU path (#17138) add 4ea9aef Fix BoxNMS GPU workspace size (#17190) No new revisions were added by this update. Summary of changes: src/operator/contrib/bounding_box.cu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
[incubator-mxnet] branch master updated (083efb8 -> 93cf48d)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 083efb8 Fix crashing on Windows in ObjectPool ~ctor (#16941) add 93cf48d Fix desired precision for test_ndarray.py:test_reduce (#16992) No new revisions were added by this update. Summary of changes: tests/python/unittest/test_ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (083efb8 -> 93cf48d)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 083efb8 Fix crashing on Windows in ObjectPool ~ctor (#16941) add 93cf48d Fix desired precision for test_ndarray.py:test_reduce (#16992) No new revisions were added by this update. Summary of changes: tests/python/unittest/test_ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (083efb8 -> 93cf48d)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 083efb8 Fix crashing on Windows in ObjectPool ~ctor (#16941) add 93cf48d Fix desired precision for test_ndarray.py:test_reduce (#16992) No new revisions were added by this update. Summary of changes: tests/python/unittest/test_ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (e577c3d -> 083efb8)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from e577c3d support np.argsort (#16949) add 083efb8 Fix crashing on Windows in ObjectPool ~ctor (#16941) No new revisions were added by this update. Summary of changes: src/common/object_pool.h | 4 1 file changed, 4 insertions(+)
[incubator-mxnet] branch master updated (8dd7051 -> ae472c2)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8dd7051 Downgrade the cublas version for nightly gpu (#16985) add ae472c2 dynamic custom operator support (#15921) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 2 +- Makefile | 10 +- example/{ => extensions}/lib_api/Makefile | 8 +- .../mylib.cc => extensions/lib_api/init_lib.cc}| 8 +- example/{ => extensions}/lib_api/libtest.cc| 4 +- .../test.py => extensions/lib_api/test_loading.py} | 6 +- .../extensions/lib_custom_op}/Makefile | 11 +- example/extensions/lib_custom_op/gemm_lib.cc | 235 + example/extensions/lib_custom_op/subgraph_lib.cc | 113 +++ example/extensions/lib_custom_op/test_gemm.py | 82 ++ example/extensions/lib_custom_op/test_subgraph.py | 60 ++ include/mxnet/lib_api.h| 988 - python/mxnet/__init__.py | 3 +- python/mxnet/library.py| 23 +- src/c_api/c_api.cc | 582 +++- tests/python/gpu/test_operator_gpu.py | 2 +- ...{test_library_loading.py => test_extensions.py} | 41 +- 17 files changed, 2139 insertions(+), 39 deletions(-) rename example/{ => extensions}/lib_api/Makefile (80%) rename example/{lib_api/mylib.cc => extensions/lib_api/init_lib.cc} (91%) rename example/{ => extensions}/lib_api/libtest.cc (95%) rename example/{lib_api/test.py => extensions/lib_api/test_loading.py} (87%) copy {docs/cpp_docs => example/extensions/lib_custom_op}/Makefile (74%) create mode 100644 example/extensions/lib_custom_op/gemm_lib.cc create mode 100644 example/extensions/lib_custom_op/subgraph_lib.cc create mode 100644 example/extensions/lib_custom_op/test_gemm.py create mode 100644 example/extensions/lib_custom_op/test_subgraph.py rename tests/python/unittest/{test_library_loading.py => test_extensions.py} (50%)
[incubator-mxnet] branch master updated (8dd7051 -> ae472c2)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8dd7051 Downgrade the cublas version for nightly gpu (#16985) add ae472c2 dynamic custom operator support (#15921) No new revisions were added by this update. Summary of changes: CMakeLists.txt | 2 +- Makefile | 10 +- example/{ => extensions}/lib_api/Makefile | 8 +- .../mylib.cc => extensions/lib_api/init_lib.cc}| 8 +- example/{ => extensions}/lib_api/libtest.cc| 4 +- .../test.py => extensions/lib_api/test_loading.py} | 6 +- .../extensions/lib_custom_op}/Makefile | 11 +- example/extensions/lib_custom_op/gemm_lib.cc | 235 + example/extensions/lib_custom_op/subgraph_lib.cc | 113 +++ example/extensions/lib_custom_op/test_gemm.py | 82 ++ example/extensions/lib_custom_op/test_subgraph.py | 60 ++ include/mxnet/lib_api.h| 988 - python/mxnet/__init__.py | 3 +- python/mxnet/library.py| 23 +- src/c_api/c_api.cc | 582 +++- tests/python/gpu/test_operator_gpu.py | 2 +- ...{test_library_loading.py => test_extensions.py} | 41 +- 17 files changed, 2139 insertions(+), 39 deletions(-) rename example/{ => extensions}/lib_api/Makefile (80%) rename example/{lib_api/mylib.cc => extensions/lib_api/init_lib.cc} (91%) rename example/{ => extensions}/lib_api/libtest.cc (95%) rename example/{lib_api/test.py => extensions/lib_api/test_loading.py} (87%) copy {docs/cpp_docs => example/extensions/lib_custom_op}/Makefile (74%) create mode 100644 example/extensions/lib_custom_op/gemm_lib.cc create mode 100644 example/extensions/lib_custom_op/subgraph_lib.cc create mode 100644 example/extensions/lib_custom_op/test_gemm.py create mode 100644 example/extensions/lib_custom_op/test_subgraph.py rename tests/python/unittest/{test_library_loading.py => test_extensions.py} (50%)
[incubator-mxnet] branch master updated (34e7116 -> b5ee43e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 34e7116 [R package] Make R package compilation support opencv 4.0 (#16934) add b5ee43e add aligned roi introduced in Detectron2 (#16619) No new revisions were added by this update. Summary of changes: src/operator/contrib/mrcnn_mask_target-inl.h | 4 +++ src/operator/contrib/mrcnn_mask_target.cu| 27 +- src/operator/contrib/roi_align-inl.h | 4 +++ src/operator/contrib/roi_align.cc| 51 -- src/operator/contrib/roi_align.cu| 54 +++- 5 files changed, 89 insertions(+), 51 deletions(-)
[incubator-mxnet] branch master updated (34e7116 -> b5ee43e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 34e7116 [R package] Make R package compilation support opencv 4.0 (#16934) add b5ee43e add aligned roi introduced in Detectron2 (#16619) No new revisions were added by this update. Summary of changes: src/operator/contrib/mrcnn_mask_target-inl.h | 4 +++ src/operator/contrib/mrcnn_mask_target.cu| 27 +- src/operator/contrib/roi_align-inl.h | 4 +++ src/operator/contrib/roi_align.cc| 51 -- src/operator/contrib/roi_align.cu| 54 +++- 5 files changed, 89 insertions(+), 51 deletions(-)
[incubator-mxnet] branch master updated (34e7116 -> b5ee43e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 34e7116 [R package] Make R package compilation support opencv 4.0 (#16934) add b5ee43e add aligned roi introduced in Detectron2 (#16619) No new revisions were added by this update. Summary of changes: src/operator/contrib/mrcnn_mask_target-inl.h | 4 +++ src/operator/contrib/mrcnn_mask_target.cu| 27 +- src/operator/contrib/roi_align-inl.h | 4 +++ src/operator/contrib/roi_align.cc| 51 -- src/operator/contrib/roi_align.cu| 54 +++- 5 files changed, 89 insertions(+), 51 deletions(-)
[incubator-mxnet] branch master updated (edb583b -> 34e7116)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from edb583b Fix scala publish & nvidia-docker cublas issue (#16968) add 34e7116 [R package] Make R package compilation support opencv 4.0 (#16934) No new revisions were added by this update. Summary of changes: R-package/src/im2rec.h | 6 ++ 1 file changed, 6 insertions(+)
[incubator-mxnet] branch master updated (edb583b -> 34e7116)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from edb583b Fix scala publish & nvidia-docker cublas issue (#16968) add 34e7116 [R package] Make R package compilation support opencv 4.0 (#16934) No new revisions were added by this update. Summary of changes: R-package/src/im2rec.h | 6 ++ 1 file changed, 6 insertions(+)
[incubator-mxnet] branch master updated (02b4d2b -> edb583b)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 02b4d2b fix for enable model parallelism for non-fp32 data (#16683) add edb583b Fix scala publish & nvidia-docker cublas issue (#16968) No new revisions were added by this update. Summary of changes: ci/docker/Dockerfile.build.centos7_gpu| 4 ci/docker/Dockerfile.build.ubuntu_build_cuda | 4 ci/docker/Dockerfile.build.ubuntu_gpu_cu101 | 4 .../{ubuntu_runas_sudo.sh => centos7_cublas.sh} | 4 +++- .../install/{ubuntu_arm_qemu.sh => ubuntu_cublas.sh} | 19 --- ci/publish/Jenkinsfile| 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) copy ci/docker/install/{ubuntu_runas_sudo.sh => centos7_cublas.sh} (84%) copy ci/docker/install/{ubuntu_arm_qemu.sh => ubuntu_cublas.sh} (82%)
[incubator-mxnet] branch master updated (02b4d2b -> edb583b)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 02b4d2b fix for enable model parallelism for non-fp32 data (#16683) add edb583b Fix scala publish & nvidia-docker cublas issue (#16968) No new revisions were added by this update. Summary of changes: ci/docker/Dockerfile.build.centos7_gpu| 4 ci/docker/Dockerfile.build.ubuntu_build_cuda | 4 ci/docker/Dockerfile.build.ubuntu_gpu_cu101 | 4 .../{ubuntu_runas_sudo.sh => centos7_cublas.sh} | 4 +++- .../install/{ubuntu_arm_qemu.sh => ubuntu_cublas.sh} | 19 --- ci/publish/Jenkinsfile| 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) copy ci/docker/install/{ubuntu_runas_sudo.sh => centos7_cublas.sh} (84%) copy ci/docker/install/{ubuntu_arm_qemu.sh => ubuntu_cublas.sh} (82%)
[incubator-mxnet] branch master updated (6b00b2c -> d2d4876)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6b00b2c Allow loading from model files with empty weights. (#16061) add d2d4876 Fix memory leak reported by ASAN in NNVM to ONNX conversion (#15516) No new revisions were added by this update. Summary of changes: src/operator/subgraph/tensorrt/nnvm_to_onnx.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[incubator-mxnet] branch master updated (a11b7ea -> 6b00b2c)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from a11b7ea Try to fix CI (#16908) add 6b00b2c Allow loading from model files with empty weights. (#16061) No new revisions were added by this update. Summary of changes: python/mxnet/model.py | 1 + 1 file changed, 1 insertion(+)
[incubator-mxnet] branch master updated (a11b7ea -> 6b00b2c)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from a11b7ea Try to fix CI (#16908) add 6b00b2c Allow loading from model files with empty weights. (#16061) No new revisions were added by this update. Summary of changes: python/mxnet/model.py | 1 + 1 file changed, 1 insertion(+)
[incubator-mxnet] branch master updated (6c7ce24 -> c9585bd)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6c7ce24 Revert "Mkldnn fullyConnect bwd bug fix (#16890)" (#16907) add c9585bd Fix the problem in printing feature in c++ API examples : feature_extract (#15686) No new revisions were added by this update. Summary of changes: cpp-package/example/feature_extract/feature_extract.cpp | 1 + 1 file changed, 1 insertion(+)
[incubator-mxnet] branch master updated (f11592d -> 6c7ce24)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from f11592d Op Unravel_index PR [Numpy] (#16862) add 6c7ce24 Revert "Mkldnn fullyConnect bwd bug fix (#16890)" (#16907) No new revisions were added by this update. Summary of changes: src/operator/nn/fully_connected.cc | 9 -- src/operator/nn/mkldnn/mkldnn_fully_connected.cc | 36 2 files changed, 25 insertions(+), 20 deletions(-)
[incubator-mxnet] branch master updated (f11592d -> 6c7ce24)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from f11592d Op Unravel_index PR [Numpy] (#16862) add 6c7ce24 Revert "Mkldnn fullyConnect bwd bug fix (#16890)" (#16907) No new revisions were added by this update. Summary of changes: src/operator/nn/fully_connected.cc | 9 -- src/operator/nn/mkldnn/mkldnn_fully_connected.cc | 36 2 files changed, 25 insertions(+), 20 deletions(-)
[incubator-mxnet] branch master updated (3885bbe -> 52716de)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 3885bbe [Done] BilinearResize2D optimized (#16292) add 52716de [MXNET-1426] Fix the wrong result of sum, mean, argmin, argmax when inputs contain inf or nan (#16234) No new revisions were added by this update. Summary of changes: 3rdparty/mshadow/mshadow/base.h| 106 + .../mshadow/mshadow/extension/reduce_with_axis.h | 2 +- 3rdparty/mshadow/mshadow/half.h| 2 + julia/src/ndarray/reduction.jl | 6 +- julia/test/unittest/ndarray.jl | 16 ++-- python/mxnet/ndarray/ndarray.py| 1 + src/operator/contrib/allclose_op-inl.h | 2 +- src/operator/mshadow_op.h | 72 +++--- src/operator/tensor/elemwise_unary_op.h| 12 +-- tests/python/unittest/test_ndarray.py | 54 +-- tests/python/unittest/test_operator.py | 17 11 files changed, 167 insertions(+), 123 deletions(-)
[incubator-mxnet] branch master updated (02f4f05 -> 3885bbe)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 02f4f05 [Numpy] Add sampling method for bernoulli (#16638) add 3885bbe [Done] BilinearResize2D optimized (#16292) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/vision/transforms.py | 8 +- src/operator/contrib/bilinear_resize-inl.cuh | 201 +++ src/operator/contrib/bilinear_resize-inl.h | 82 +- src/operator/contrib/bilinear_resize.cc | 39 +++-- src/operator/contrib/bilinear_resize.cu | 230 +++ src/operator/image/resize-inl.h | 5 +- src/operator/image/resize.cu | 13 +- tests/python/gpu/test_gluon_transforms.py| 15 +- tests/python/gpu/test_operator_gpu.py| 14 +- tests/python/unittest/test_operator.py | 34 +++- 10 files changed, 457 insertions(+), 184 deletions(-)
[incubator-mxnet] branch master updated (1363b5a -> e6e2e2e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 1363b5a simple typo error in NEWS.md (#16344) add e6e2e2e Fix code block formatting in Why MXNet doc page (#16334) No new revisions were added by this update. Summary of changes: docs/static_site/src/pages/api/faq/why_mxnet.md | 1 + 1 file changed, 1 insertion(+)
[incubator-mxnet] branch master updated (6931748 -> 1363b5a)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6931748 adding redirects so that old website API links surfaced from searches (#16342) add 1363b5a simple typo error in NEWS.md (#16344) No new revisions were added by this update. Summary of changes: NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (3950a47 -> 512d25a)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 3950a47 [MXNET-978] n-th order gradient test support. (#15611) add 512d25a Minor fix in ToTensor documentation. (#16299) No new revisions were added by this update. Summary of changes: python/mxnet/gluon/data/vision/transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[incubator-mxnet] branch master updated (8004a02 -> dc5470c)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8004a02 Fixing links for website + Fixing search (#16284) add dc5470c Factorize CUDA_KERNEL_LOOP used in CUDA kernels (#16197) No new revisions were added by this update. Summary of changes: src/operator/contrib/count_sketch.cu | 4 src/operator/contrib/deformable_psroi_pooling.cu | 4 src/operator/contrib/psroi_pooling.cu| 4 src/operator/contrib/roi_align.cu| 11 --- src/operator/correlation.cu | 6 ++ 5 files changed, 6 insertions(+), 23 deletions(-)
[incubator-mxnet] branch master updated (b777a69 -> 8cc3443)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from b777a69 Add register_op_hook for gluon (#15839) add 8cc3443 adding codeowners (#16165) No new revisions were added by this update. Summary of changes: CODEOWNERS | 8 1 file changed, 4 insertions(+), 4 deletions(-)
[incubator-mxnet] branch master updated (c5383f7 -> ccd24a8)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from c5383f7 CD Fixes (#16127) add ccd24a8 avoid test relu at the origin due to discontinuous gradient (#16133) No new revisions were added by this update. Summary of changes: tests/python/mkl/test_mkldnn.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)
[incubator-mxnet] branch master updated (b7071c4 -> d0fa8c0)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from b7071c4 Enable tvm_op for ci (#15889) add d0fa8c0 Test large vector mean operator and fix a few bugs (#16079) No new revisions were added by this update. Summary of changes: src/common/tensor_inspector.h | 1 - src/operator/mshadow_op.h | 2 +- src/operator/tensor/broadcast_reduce-inl.h | 4 +- tests/nightly/test_large_vector.py | 95 -- 4 files changed, 55 insertions(+), 47 deletions(-)
[incubator-mxnet] branch master updated (61f3dbc -> 5d0d335)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 61f3dbc numpy-compatible cumsum upstream (#15924) add 5d0d335 Update README.md (#16035) No new revisions were added by this update. Summary of changes: README.md | 1 + 1 file changed, 1 insertion(+)
[incubator-mxnet] branch revert-15762-getenv_fixes updated (8b174e2 -> 574a09f)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15762-getenv_fixes in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8b174e2 Revert "Refactor LibraryInitializer so it's thread safe. Fixes random sporadical concurrency crashes. (#15762)" add 574a09f Retrigger CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch marcoabreu-patch-codeowners updated (a797805 -> 55427e3)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch marcoabreu-patch-codeowners in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from a797805 Update CODEOWNERS add 55427e3 retrigger ci No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch master updated (8eb0f61 -> bcbdc1c)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8eb0f61 Numpy-compatible stack upstream (#15842) add bcbdc1c Re-enable flaky test_prelu (#15777) No new revisions were added by this update. Summary of changes: tests/python/unittest/test_operator.py | 1 - 1 file changed, 1 deletion(-)
[incubator-mxnet] branch master updated (44a7fca -> 614cba3)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 44a7fca [Numpy] Numpy compatible slicing (#15798) add 614cba3 Making Features as a singleton for improved caching (#15835) No new revisions were added by this update. Summary of changes: python/mxnet/runtime.py | 6 ++ tests/python/unittest/test_runtime.py | 9 + 2 files changed, 15 insertions(+)
[incubator-mxnet] branch v1.5.x updated: Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751) (#15792)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch v1.5.x in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/v1.5.x by this push: new 804403e Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751) (#15792) 804403e is described below commit 804403e999d1567f371c5243f5565127ad7f2f93 Author: JackieWu AuthorDate: Thu Aug 8 13:55:35 2019 +0800 Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751) (#15792) * fix push sync nd api * align code * update test for syncnd * fix bug in tests/cpp/engine/threaded_engine_test * add more testcases for MXEnginePushSyncND and MXEnginePushAsyncND * fix test * fix * fix * lint * ci * retrigger CI --- include/mxnet/c_api.h| 22 +++--- src/c_api/c_api.cc | 40 +-- tests/cpp/engine/threaded_engine_test.cc | 117 +++ 3 files changed, 105 insertions(+), 74 deletions(-) diff --git a/include/mxnet/c_api.h b/include/mxnet/c_api.h index a2da6db..c73b366 100644 --- a/include/mxnet/c_api.h +++ b/include/mxnet/c_api.h @@ -2863,12 +2863,12 @@ MXNET_DLL int MXEnginePushSync(EngineSyncFunc sync_func, void* func_param, * \param wait Whether this is a WaitForVar operation. */ MXNET_DLL int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, -EngineFuncParamDeleter deleter, ContextHandle ctx_handle, -NDArrayHandle const_nds_handle, int num_const_nds, -NDArrayHandle mutable_nds_handle, int num_mutable_nds, -EngineFnPropertyHandle prop_handle DEFAULT(NULL), -int priority DEFAULT(0), const char* opr_name DEFAULT(NULL), -bool wait DEFAULT(false)); + EngineFuncParamDeleter deleter, ContextHandle ctx_handle, + NDArrayHandle* const_nds_handle, int num_const_nds, + NDArrayHandle* mutable_nds_handle, int num_mutable_nds, + EngineFnPropertyHandle prop_handle DEFAULT(NULL), + int priority DEFAULT(0), const char* opr_name DEFAULT(NULL), + bool wait DEFAULT(false)); /*! * \brief Push a synchronous operation to the engine. @@ -2886,11 +2886,11 @@ MXNET_DLL int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, * \param opr_name The operation name. */ MXNET_DLL int MXEnginePushSyncND(EngineSyncFunc sync_func, void* func_param, - EngineFuncParamDeleter deleter, ContextHandle ctx_handle, - NDArrayHandle const_nds_handle, int num_const_nds, - NDArrayHandle mutable_nds_handle, int num_mutable_nds, - EngineFnPropertyHandle prop_handle DEFAULT(NULL), - int priority DEFAULT(0), const char* opr_name DEFAULT(NULL)); + EngineFuncParamDeleter deleter, ContextHandle ctx_handle, + NDArrayHandle* const_nds_handle, int num_const_nds, + NDArrayHandle* mutable_nds_handle, int num_mutable_nds, + EngineFnPropertyHandle prop_handle DEFAULT(NULL), + int priority DEFAULT(0), const char* opr_name DEFAULT(NULL)); #ifdef __cplusplus } diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index 35bd3ee..6ba46bd 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -1535,18 +1535,18 @@ int MXEnginePushSync(EngineSyncFunc sync_func, void* func_param, } int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, - EngineFuncParamDeleter deleter, ContextHandle ctx_handle, - NDArrayHandle const_nds_handle, int num_const_nds, - NDArrayHandle mutable_nds_handle, int num_mutable_nds, - EngineFnPropertyHandle prop_handle, int priority, - const char* opr_name, bool wait) { - API_BEGIN(); - NDArray* const_nds = static_cast(const_nds_handle); - NDArray* mutable_nds = static_cast(mutable_nds_handle); +EngineFuncParamDeleter deleter, ContextHandle ctx_handle, +NDArrayHandle* const_nds_handle, int num_const_nds, +NDArrayHandle* mutable_nds_handle, int num_mutable_nds, +EngineFnPropertyHandle prop_handle, int priority, +const char* opr_name, bool wait) { + API_BEGIN(); + NDArray** const_nds
[incubator-mxnet] branch master updated: Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 79d8d86 Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751) 79d8d86 is described below commit 79d8d8656691c19502b7b71bf8c7d9001cdc3a4a Author: JackieWu AuthorDate: Thu Aug 8 11:15:48 2019 +0800 Fix the bug of `MXEnginePushAsyncND` and `MXEnginePushSyncND` (#15751) * fix push sync nd api * align code * update test for syncnd * fix bug in tests/cpp/engine/threaded_engine_test * add more testcases for MXEnginePushSyncND and MXEnginePushAsyncND * fix test * fix * fix * lint * ci * retrigger CI --- include/mxnet/c_api.h| 22 +++--- src/c_api/c_api.cc | 40 +-- tests/cpp/engine/threaded_engine_test.cc | 117 +++ 3 files changed, 105 insertions(+), 74 deletions(-) diff --git a/include/mxnet/c_api.h b/include/mxnet/c_api.h index 9d647c3..20b2aa2 100644 --- a/include/mxnet/c_api.h +++ b/include/mxnet/c_api.h @@ -2940,12 +2940,12 @@ MXNET_DLL int MXShallowCopySymbol(SymbolHandle src, SymbolHandle * out); * \param wait Whether this is a WaitForVar operation. */ MXNET_DLL int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, -EngineFuncParamDeleter deleter, ContextHandle ctx_handle, -NDArrayHandle const_nds_handle, int num_const_nds, -NDArrayHandle mutable_nds_handle, int num_mutable_nds, -EngineFnPropertyHandle prop_handle DEFAULT(NULL), -int priority DEFAULT(0), const char* opr_name DEFAULT(NULL), -bool wait DEFAULT(false)); + EngineFuncParamDeleter deleter, ContextHandle ctx_handle, + NDArrayHandle* const_nds_handle, int num_const_nds, + NDArrayHandle* mutable_nds_handle, int num_mutable_nds, + EngineFnPropertyHandle prop_handle DEFAULT(NULL), + int priority DEFAULT(0), const char* opr_name DEFAULT(NULL), + bool wait DEFAULT(false)); /*! * \brief Push a synchronous operation to the engine. @@ -2963,11 +2963,11 @@ MXNET_DLL int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, * \param opr_name The operation name. */ MXNET_DLL int MXEnginePushSyncND(EngineSyncFunc sync_func, void* func_param, - EngineFuncParamDeleter deleter, ContextHandle ctx_handle, - NDArrayHandle const_nds_handle, int num_const_nds, - NDArrayHandle mutable_nds_handle, int num_mutable_nds, - EngineFnPropertyHandle prop_handle DEFAULT(NULL), - int priority DEFAULT(0), const char* opr_name DEFAULT(NULL)); + EngineFuncParamDeleter deleter, ContextHandle ctx_handle, + NDArrayHandle* const_nds_handle, int num_const_nds, + NDArrayHandle* mutable_nds_handle, int num_mutable_nds, + EngineFnPropertyHandle prop_handle DEFAULT(NULL), + int priority DEFAULT(0), const char* opr_name DEFAULT(NULL)); #ifdef __cplusplus } diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index dfb01dc..13f2219 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -1559,18 +1559,18 @@ int MXEnginePushSync(EngineSyncFunc sync_func, void* func_param, } int MXEnginePushAsyncND(EngineAsyncFunc async_func, void* func_param, - EngineFuncParamDeleter deleter, ContextHandle ctx_handle, - NDArrayHandle const_nds_handle, int num_const_nds, - NDArrayHandle mutable_nds_handle, int num_mutable_nds, - EngineFnPropertyHandle prop_handle, int priority, - const char* opr_name, bool wait) { - API_BEGIN(); - NDArray* const_nds = static_cast(const_nds_handle); - NDArray* mutable_nds = static_cast(mutable_nds_handle); +EngineFuncParamDeleter deleter, ContextHandle ctx_handle, +NDArrayHandle* const_nds_handle, int num_const_nds, +NDArrayHandle* mutable_nds_handle, int num_mutable_nds, +EngineFnPropertyHandle prop_handle, int priority, +const char* opr_name, bool wait) { + API_BEGIN(); + NDArray** const_nds = reinterpret_cast
[incubator-mxnet] branch master updated (ce62873 -> 7186123)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from ce62873 Add quantization support for GluonCV (#15754) add 7186123 Revert "Dynamic Library Loading Support" (#15755) No new revisions were added by this update. Summary of changes: CMakeLists.txt| 1 - Makefile | 2 +- example/lib_api/Makefile | 31 --- example/lib_api/libtest.cc| 78 example/lib_api/mylib.cc | 37 example/lib_api/test.py | 31 --- include/mxnet/c_api.h | 7 -- include/mxnet/lib_api.h | 50 --- python/mxnet/__init__.py | 1 - python/mxnet/base.py | 2 +- python/mxnet/library.py | 49 -- src/c_api/c_api.cc| 15 src/common/library.cc | 125 -- src/common/library.h | 57 src/engine/naive_engine.cc| 5 -- src/engine/threaded_engine.h | 5 -- tests/python/gpu/test_operator_gpu.py | 1 - tests/python/unittest/test_library_loading.py | 38 18 files changed, 2 insertions(+), 533 deletions(-) delete mode 100644 example/lib_api/Makefile delete mode 100644 example/lib_api/libtest.cc delete mode 100644 example/lib_api/mylib.cc delete mode 100644 example/lib_api/test.py delete mode 100644 include/mxnet/lib_api.h delete mode 100644 python/mxnet/library.py delete mode 100644 src/common/library.cc delete mode 100644 src/common/library.h delete mode 100644 tests/python/unittest/test_library_loading.py
[incubator-mxnet] branch revert-15489-acc_api updated (4392847 -> 73febc9)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15489-acc_api in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 4392847 retrigger CI add 73febc9 retrigger CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch revert-15489-acc_api updated (153872c -> 4392847)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15489-acc_api in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 153872c retrigger CI add 4392847 retrigger CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch revert-15489-acc_api updated (01ffe9b -> 153872c)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15489-acc_api in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 01ffe9b CI add 153872c retrigger CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch revert-15489-acc_api updated (95b02a9 -> 01ffe9b)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15489-acc_api in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 95b02a9 Retrigger CI add 01ffe9b CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch revert-15489-acc_api updated (1e97b86 -> 95b02a9)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch revert-15489-acc_api in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 1e97b86 Revert "Dynamic Library Loading Support (#15489)" add 95b02a9 Retrigger CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch master updated: Add magic method `abs` to NDArray and Symbol. (#15680)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new cf28b46 Add magic method `abs` to NDArray and Symbol. (#15680) cf28b46 is described below commit cf28b46ecb2342e3010f9ed1c6b17ee3533246f9 Author: kshitij12345 AuthorDate: Fri Aug 2 10:23:09 2019 +0530 Add magic method `abs` to NDArray and Symbol. (#15680) * add magic method abs to ndarray * add relevant tests * add magic method abs to symbol * add relevant tests * retrigger CI * retrigger CI --- python/mxnet/ndarray/ndarray.py | 4 python/mxnet/symbol/symbol.py | 4 tests/python/unittest/test_ndarray.py | 9 + tests/python/unittest/test_symbol.py | 17 - 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/python/mxnet/ndarray/ndarray.py b/python/mxnet/ndarray/ndarray.py index 3d8a7aa..0b7dca4 100644 --- a/python/mxnet/ndarray/ndarray.py +++ b/python/mxnet/ndarray/ndarray.py @@ -205,6 +205,10 @@ fixed-size items. self.handle, ctypes.byref(shared_pid), ctypes.byref(shared_id))) return shared_pid.value, shared_id.value, self.shape, self.dtype +def __abs__(self): +"""x.__abs__() <=> abs(x) <=> x.abs() <=> mx.nd.abs(x, y)""" +return self.abs() + def __add__(self, other): """x.__add__(y) <=> x+y <=> mx.nd.add(x, y) """ return add(self, other) diff --git a/python/mxnet/symbol/symbol.py b/python/mxnet/symbol/symbol.py index 1e2defa..6832229 100644 --- a/python/mxnet/symbol/symbol.py +++ b/python/mxnet/symbol/symbol.py @@ -93,6 +93,10 @@ class Symbol(SymbolBase): """ return (self[i] for i in range(len(self))) +def __abs__(self): +"""x.__abs__() <=> abs(x) <=> x.abs() <=> mx.symbol.abs(x, y)""" +return self.abs() + def __add__(self, other): """x.__add__(y) <=> x+y diff --git a/tests/python/unittest/test_ndarray.py b/tests/python/unittest/test_ndarray.py index 56db1eb..0f154bd 100644 --- a/tests/python/unittest/test_ndarray.py +++ b/tests/python/unittest/test_ndarray.py @@ -173,6 +173,15 @@ def test_ndarray_negate(): @with_seed() +def test_ndarray_magic_abs(): +for dim in range(1, 7): +shape = rand_shape_nd(dim) +npy = np.random.uniform(-10, 10, shape) +arr = mx.nd.array(npy) +assert_almost_equal(abs(arr).asnumpy(), arr.abs().asnumpy()) + + +@with_seed() def test_ndarray_reshape(): tensor = (mx.nd.arange(30) + 1).reshape(2, 3, 5) true_res = mx.nd.arange(30) + 1 diff --git a/tests/python/unittest/test_symbol.py b/tests/python/unittest/test_symbol.py index 0c97c68..963b324 100644 --- a/tests/python/unittest/test_symbol.py +++ b/tests/python/unittest/test_symbol.py @@ -22,7 +22,7 @@ import mxnet as mx import numpy as np from common import assertRaises, models from mxnet.base import NotImplementedForSymbol -from mxnet.test_utils import discard_stderr +from mxnet.test_utils import discard_stderr, rand_shape_nd import pickle as pkl def test_symbol_basic(): @@ -188,6 +188,21 @@ def test_symbol_infer_shape_var(): assert arg_shapes[1] == overwrite_shape assert out_shapes[0] == overwrite_shape + +def test_symbol_magic_abs(): +for dim in range(1, 7): +with mx.name.NameManager(): +data = mx.symbol.Variable('data') +method = data.abs(name='abs0') +magic = abs(data) +regular = mx.symbol.abs(data, name='abs0') +ctx = {'ctx': mx.context.current_context(), 'data': rand_shape_nd(dim)} +mx.test_utils.check_consistency( +[method, magic], ctx_list=[ctx, ctx]) +mx.test_utils.check_consistency( +[regular, magic], ctx_list=[ctx, ctx]) + + def test_symbol_fluent(): has_grad = set(['flatten', 'expand_dims', 'flip', 'tile', 'transpose', 'sum', 'nansum', 'prod', 'nanprod', 'mean', 'max', 'min', 'reshape', 'broadcast_to', 'split',
[incubator-mxnet] branch master updated: Fix Scala Symbolic API some/Some typo (#15687)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 9d7fc7c Fix Scala Symbolic API some/Some typo (#15687) 9d7fc7c is described below commit 9d7fc7cbee09de2694022995d0601cb4316e4988 Author: Cody Allen AuthorDate: Wed Jul 31 16:09:23 2019 -0700 Fix Scala Symbolic API some/Some typo (#15687) --- docs/api/scala/symbol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/scala/symbol.md b/docs/api/scala/symbol.md index aaddc2a..f92548e 100644 --- a/docs/api/scala/symbol.md +++ b/docs/api/scala/symbol.md @@ -41,7 +41,7 @@ The following example configures a two-layer neural network. val data = Symbol.Variable("data") val fc1 = Symbol.api.FullyConnected(Some(data), num_hidden = 128, name = "fc1") val act1 = Symbol.api.Activation(Some(fc1), "relu", "relu1") -val fc2 = Symbol.api.FullyConnected(some(act1), num_hidden = 64, name = "fc2") +val fc2 = Symbol.api.FullyConnected(Some(act1), num_hidden = 64, name = "fc2") val net = Symbol.api.SoftmaxOutput(Some(fc2), name = "out") :type net // org.apache.mxnet.Symbol
[incubator-mxnet] branch master updated (d464a47 -> a26af2b)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from d464a47 Fix subgraph with custom_op (#15671) add a26af2b Remove myself from CODEOWNERS (#15617) No new revisions were added by this update. Summary of changes: CODEOWNERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[incubator-mxnet] branch rahul003-patch-1 updated (fdc6297 -> b242493)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch rahul003-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from fdc6297 Update CODEOWNERS add b242493 retrigger CI No new revisions were added by this update. Summary of changes: CODEOWNERS | 1 - 1 file changed, 1 deletion(-)
[incubator-mxnet] branch master updated: [fix] print `self` in warning. (#15614)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 2b4c9c0 [fix] print `self` in warning. (#15614) 2b4c9c0 is described below commit 2b4c9c07c5f0039b93c51f7d9fb7123a0847c679 Author: kshitij12345 AuthorDate: Sun Jul 21 07:48:29 2019 +0530 [fix] print `self` in warning. (#15614) * use format * make pylint happy * Update block.py --- python/mxnet/gluon/block.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/mxnet/gluon/block.py b/python/mxnet/gluon/block.py index 3bac3c0..bd22cf8 100644 --- a/python/mxnet/gluon/block.py +++ b/python/mxnet/gluon/block.py @@ -842,8 +842,9 @@ class HybridBlock(Block): self._flags = list(kwargs.items()) self._clear_cached_op() if active and self._forward_hooks or self._forward_pre_hooks: -warnings.warn('"{}" is being hybridized while still having forward hook/pre-hook. ' - 'If "{}" is a child of HybridBlock, the hooks will not take effect.') +warnings.warn('"{block}" is being hybridized while still having forward hook/pre-hook. ' + 'If "{block}" is a child of HybridBlock, the hooks will not take effect.' + .format(block=self)) super(HybridBlock, self).hybridize(active, **kwargs) def cast(self, dtype):
[incubator-mxnet] branch master updated: fix normalize mean error bug (#15539)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 8f5930b fix normalize mean error bug (#15539) 8f5930b is described below commit 8f5930b2c95a6b7594ff6535a097e35b3315bc6d Author: nicklhy AuthorDate: Sun Jul 21 06:10:36 2019 +0800 fix normalize mean error bug (#15539) * fix normalize mean error bug * add scalar mean/std tests for image_normalize --- src/operator/image/image_random-inl.h | 2 +- tests/python/unittest/test_operator.py | 53 -- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/operator/image/image_random-inl.h b/src/operator/image/image_random-inl.h index aeb189f..e00b255 100644 --- a/src/operator/image/image_random-inl.h +++ b/src/operator/image/image_random-inl.h @@ -339,7 +339,7 @@ void NormalizeOpForward(const nnvm::NodeAttrs , std::vector mean(3); std::vector std(3); if (param.mean.ndim() == 1) { -mean[0] = mean[1] = mean[3] = param.mean[0]; +mean[0] = mean[1] = mean[2] = param.mean[0]; } else { mean[0] = param.mean[0]; mean[1] = param.mean[1]; diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index fea07f5..915a83f 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -8678,7 +8678,7 @@ def test_invalid_max_pooling_pad_type_same(): @with_seed() def test_image_normalize(): -# Part 1 - Test 3D Input +# Part 1 - Test 3D input with 3D mean/std shape_3d = (3, 28, 28) mean = (0, 1, 2) std = (3, 2, 1) @@ -8709,7 +8709,7 @@ def test_image_normalize(): # check backward using finite difference check_numeric_gradient(img_norm_sym, [data_in_3d], atol=0.001) -# Part 2 - Test 4D Input +# Part 2 - Test 4D input with 3D mean/std shape_4d = (2, 3, 28, 28) data_in_4d = mx.nd.random.uniform(0, 1, shape_4d) @@ -8741,6 +8741,55 @@ def test_image_normalize(): # check backward using finite difference check_numeric_gradient(img_norm_sym, [data_in_4d], atol=0.001) +# Part 3 - Test 3D input with scalar mean/std +shape_3d = (3, 28, 28) +mean = 1.0 +std = 2.0 + +data_in_3d = mx.nd.random.uniform(0, 1, shape_3d) +data_expected_3d = data_in_3d.asnumpy() +data_expected_3d[:][:][:] = (data_expected_3d[:][:][:] - 1.0) / 2.0 + +data = mx.symbol.Variable('data') +img_norm_sym = mx.sym.image.normalize(data=data, mean=mean, std=std) + +# check forward +check_symbolic_forward(img_norm_sym, [data_in_3d], [data_expected_3d], + rtol=1e-5, atol=1e-5) + +# Gradient is 1/std_dev +grad_expected_3d = np.ones(shape_3d) +grad_expected_3d[:][:][:] = 1 / 2.0 + +# check backward +check_symbolic_backward(img_norm_sym, location=[data_in_3d], out_grads=[mx.nd.ones(shape_3d)], +expected=[grad_expected_3d], rtol=1e-5, atol=1e-5) + +# check backward using finite difference +check_numeric_gradient(img_norm_sym, [data_in_3d], atol=0.001) + +# Part 4 - Test 4D input with scalar mean/std +shape_4d = (2, 3, 28, 28) + +data_in_4d = mx.nd.random.uniform(0, 1, shape_4d) +data_expected_4d = data_in_4d.asnumpy() +data_expected_4d[:][:][:][:] = (data_expected_4d[:][:][:][:] - 1.0) / 2.0 + +# check forward +check_symbolic_forward(img_norm_sym, [data_in_4d], [data_expected_4d], + rtol=1e-5, atol=1e-5) + +# Gradient is 1/std_dev +grad_expected_4d = np.ones(shape_4d) +grad_expected_4d[:][:][:][:] = 1 / 2.0 + +# check backward +check_symbolic_backward(img_norm_sym, location=[data_in_4d], out_grads=[mx.nd.ones(shape_4d)], +expected=[grad_expected_4d], rtol=1e-5, atol=1e-5) + +# check backward using finite difference +check_numeric_gradient(img_norm_sym, [data_in_4d], atol=0.001) + @with_seed() def test_index_array(): def test_index_array_default():
[incubator-mxnet] branch master updated (b88705e -> 9724ce6)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from b88705e fix heap-use-after-free in scala (#15503) add 9724ce6 Avoid memory copy for dropout inference (#15521) No new revisions were added by this update. Summary of changes: src/operator/nn/dropout-inl.h | 2 ++ 1 file changed, 2 insertions(+)
[incubator-mxnet] branch master updated (38a44db -> 6acf7e6)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 38a44db update ratcheck for apache-rat 0.13 release (#15417) add 6acf7e6 Small typo fixes in batch_norm-inl.h (#15527) No new revisions were added by this update. Summary of changes: src/operator/nn/batch_norm-inl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[incubator-mxnet] branch KellenSunderland-patch-2 updated (a572405 -> 2dacd26)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch KellenSunderland-patch-2 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from a572405 retrigger ci add 2dacd26 CI No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch KellenSunderland-patch-2 updated (e7e9918 -> a572405)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch KellenSunderland-patch-2 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from e7e9918 ci add a572405 retrigger ci No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch KellenSunderland-patch-2 updated (0c9b7dc -> e7e9918)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch KellenSunderland-patch-2 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 0c9b7dc Retrigger CI add e7e9918 ci No new revisions were added by this update. Summary of changes:
[incubator-mxnet] branch KellenSunderland-patch-2 updated (6c38f3e -> 0c9b7dc)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch KellenSunderland-patch-2 in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 6c38f3e Small typo fixes in batch_norm-inl.h add 0c9b7dc Retrigger CI No new revisions were added by this update. Summary of changes: src/operator/nn/batch_norm-inl.h | 1 - 1 file changed, 1 deletion(-)
[incubator-mxnet] branch master updated: Docs: Fix misprints (#15505)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new cbb6f7f Docs: Fix misprints (#15505) cbb6f7f is described below commit cbb6f7fd6e297c17fd267b29174a4ed29100c757 Author: Ruslan Baratov AuthorDate: Sat Jul 13 03:26:01 2019 +0300 Docs: Fix misprints (#15505) * Docs: Fix 'bahavior' -> 'behavior' * Docs: Fix 'the the' -> 'the' * retrigger CI * retrigger CI --- NEWS.md | 4 ++-- R-package/R/viz.graph.R | 4 ++-- contrib/clojure-package/README.md | 2 +- docs/api/python/gluon/gluon.md| 2 +- docs/install/windows_setup.md | 2 +- docs/tutorials/mkldnn/MKLDNN_README.md| 2 +- example/gan/CGAN_mnist_R/README.md| 2 +- include/mxnet/ndarray.h | 2 +- perl-package/AI-MXNet/lib/AI/MXNet/Gluon.pm | 2 +- perl-package/AI-MXNet/lib/AI/MXNet/Module/Base.pm | 2 +- python/mxnet/contrib/onnx/onnx2mx/_op_translations.py | 2 +- python/mxnet/gluon/data/dataloader.py | 2 +- python/mxnet/module/base_module.py| 2 +- python/mxnet/module/python_module.py | 2 +- .../core/src/main/scala/org/apache/mxnet/module/BaseModule.scala | 2 +- .../org/apache/mxnetexamples/javaapi/infer/objectdetector/README.md | 2 +- .../java/org/apache/mxnetexamples/javaapi/infer/predictor/README.md | 2 +- .../scala/org/apache/mxnetexamples/infer/objectdetector/README.md | 2 +- src/operator/tensor/diag_op-inl.h | 2 +- src/operator/tensor/matrix_op.cc | 2 +- tools/staticbuild/README.md | 4 ++-- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/NEWS.md b/NEWS.md index 59f8de8..ee8a73c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -678,8 +678,8 @@ This fixes an buffer overflow detected by ASAN. This PR adds or updates the docs for the infer_range feature. Clarifies the param in the C op docs - Clarifies the param in the the Scala symbol docs - Adds the param for the the Scala ndarray docs + Clarifies the param in the Scala symbol docs + Adds the param for the Scala ndarray docs Adds the param for the Python symbol docs Adds the param for the Python ndarray docs diff --git a/R-package/R/viz.graph.R b/R-package/R/viz.graph.R index 5804372..ab876af 100644 --- a/R-package/R/viz.graph.R +++ b/R-package/R/viz.graph.R @@ -34,7 +34,7 @@ #' @param symbol a \code{string} representing the symbol of a model. #' @param shape a \code{numeric} representing the input dimensions to the symbol. #' @param direction a \code{string} representing the direction of the graph, either TD or LR. -#' @param type a \code{string} representing the rendering engine of the the graph, either graph or vis. +#' @param type a \code{string} representing the rendering engine of the graph, either graph or vis. #' @param graph.width.px a \code{numeric} representing the size (width) of the graph. In pixels #' @param graph.height.px a \code{numeric} representing the size (height) of the graph. In pixels #' @@ -169,4 +169,4 @@ graph.viz <- function(symbol, shape=NULL, direction="TD", type="graph", graph.wi return(graph_render) } -globalVariables(c("color", "shape", "label", "id", ".", "op")) \ No newline at end of file +globalVariables(c("color", "shape", "label", "id", ".", "op")) diff --git a/contrib/clojure-package/README.md b/contrib/clojure-package/README.md index 7566ade..7bb417e 100644 --- a/contrib/clojure-package/README.md +++ b/contrib/clojure-package/README.md @@ -237,7 +237,7 @@ If you are having trouble getting started or have a question, feel free to reach There are quite a few examples in the examples directory. To use. `lein install` in the main project -`cd` in the the example project of interest +`cd` in the example project of interest There are README is every directory outlining instructions. diff --git a/docs/api/python/gluon/gluon.md b/docs/api/python/gluon/gluon.md index c063a71..19e462e 100644 --- a/docs/api/python/gluon/gluon.md +++ b/docs/api/python/gluon/gluon.md @@ -28,7 +28,7 @@ The Gluon package is a high-level interface for MXNet designed to be easy to use, while keeping most of the fle
[incubator-mxnet] branch master updated: Rebase #13757 to master (#15189)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 554b196 Rebase #13757 to master (#15189) 554b196 is described below commit 554b1965595fbac10052ce23987773c185ef5e04 Author: Yimin Jiang AuthorDate: Fri Jul 12 06:18:35 2019 +0800 Rebase #13757 to master (#15189) * Update .gitmodules * Set ImageNet data augmentation by default https://github.com/apache/incubator-mxnet/blob/a38278ddebfcc9459d64237086cd7977ec20c70e/example/image-classification/train_imagenet.py#L42 When I try to train imagenet with this line commented, the train-accuracy reaches 99% while the validation-accuracy is only less than 50% (single machine, 8 GPUs, global batchsize=2048, Resnet50). Absolutely this is overfitting. Then I uncomment this line and try again with the same experiment settings. This time both train and validation accuracy converge to about 70%. Thus, it seems that this data augmentation is pretty important for ImageNet training. Perhaps it will be better to uncomment this as default, so that future developers won't get confused by the over-fit issue. * Add argument for imagenet data augmentation * Enable data-aug with argument * Update .gitmodules --- example/image-classification/common/fit.py | 4 +++- example/image-classification/train_imagenet.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/example/image-classification/common/fit.py b/example/image-classification/common/fit.py index 5775f30..8e8b019 100755 --- a/example/image-classification/common/fit.py +++ b/example/image-classification/common/fit.py @@ -142,6 +142,8 @@ def add_fit_args(parser): train.add_argument('--profile-server-suffix', type=str, default='', help='profile server actions into a file with name like rank1_ followed by this suffix \ during distributed training') +train.add_argument('--use-imagenet-data-augmentation', type=int, default=0, + help='enable data augmentation of ImageNet data, default disabled') return train @@ -335,4 +337,4 @@ def fit(args, network, data_loader, **kwargs): if args.profile_server_suffix: mx.profiler.set_state(state='run', profile_process='server') if args.profile_worker_suffix: -mx.profiler.set_state(state='run', profile_process='worker') \ No newline at end of file +mx.profiler.set_state(state='run', profile_process='worker') diff --git a/example/image-classification/train_imagenet.py b/example/image-classification/train_imagenet.py index 0835f5d..421c15d 100644 --- a/example/image-classification/train_imagenet.py +++ b/example/image-classification/train_imagenet.py @@ -38,8 +38,6 @@ if __name__ == '__main__': fit.add_fit_args(parser) data.add_data_args(parser) data.add_data_aug_args(parser) -# uncomment to set standard augmentations for imagenet training -# set_imagenet_aug(parser) parser.set_defaults( # network network = 'resnet', @@ -56,6 +54,8 @@ if __name__ == '__main__': dtype= 'float32' ) args = parser.parse_args() +if args.use_imagenet_data_augmentation: +set_imagenet_aug(parser) # load network from importlib import import_module
[incubator-mxnet] branch master updated: Two fixes for info_gan.md example Code (#15323)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 7d4d1bc Two fixes for info_gan.md example Code (#15323) 7d4d1bc is described below commit 7d4d1bc26d52cd87eb97536ff154c7f127b68a55 Author: Konrad Heidler AuthorDate: Wed Jul 10 04:32:39 2019 +0200 Two fixes for info_gan.md example Code (#15323) * Two fixes for info_gan.md example Code * retrigger CI --- docs/tutorials/gluon/info_gan.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/gluon/info_gan.md b/docs/tutorials/gluon/info_gan.md index 91adf6c..c35df69 100644 --- a/docs/tutorials/gluon/info_gan.md +++ b/docs/tutorials/gluon/info_gan.md @@ -339,9 +339,11 @@ with SummaryWriter(logdir='./logs/') as sw: fake_image = generator(g_input) sw.add_scalar(tag='Loss_D', value={'test':d_error_epoch.asscalar()/count}, global_step=counter) -sw.add_scalar(tag='Loss_G', value={'test':d_error_epoch.asscalar()/count}, global_step=counter) +sw.add_scalar(tag='Loss_G', value={'test':g_error_epoch.asscalar()/count}, global_step=counter) sw.add_image(tag='data_image', image=((fake_image[0]+ 1.0) * 127.5).astype(np.uint8) , global_step=counter) sw.flush() + +counter += 1 discriminator.save_parameters("infogan_d_latest.params") generator.save_parameters("infogan_g_latest.params")
[incubator-mxnet] branch master updated: Opperf: Support Python<3.6 (#15487)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new d82c89a Opperf: Support Python<3.6 (#15487) d82c89a is described below commit d82c89a9df74ba7c8f0e42da187ceb7c62bcb355 Author: kshitij12345 AuthorDate: Wed Jul 10 07:58:04 2019 +0530 Opperf: Support Python<3.6 (#15487) * support python<3.6 * fix: use kwargs Co-Authored-By: Lin Yuan --- benchmark/opperf/opperf.py| 7 --- benchmark/opperf/utils/benchmark_utils.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/benchmark/opperf/opperf.py b/benchmark/opperf/opperf.py index 68b4041..a73db4f 100755 --- a/benchmark/opperf/opperf.py +++ b/benchmark/opperf/opperf.py @@ -125,8 +125,9 @@ def main(): 'output file.') args = parser.parse_args() -logging.info(f"Running MXNet operator benchmarks with the following options: {args}") -assert not os.path.isfile(args.output_file), f"Output file {args.output_file} already exists." +logging.info("Running MXNet operator benchmarks with the following options: {args}".format(args=args)) +assert not os.path.isfile(args.output_file),\ +"Output file {output_file} already exists.".format(output_file=args.output_file) # 2. RUN BENCHMARKS ctx = _parse_mxnet_context(args.ctx) @@ -140,7 +141,7 @@ def main(): # 4. Generate list of MXNet operators not covered in benchmarks ops_not_covered = get_operators_with_no_benchmark(final_benchmark_results.keys()) for idx, op in enumerate(ops_not_covered): -print(f"{idx}. {op}") +print("{idx}. {op}".format(idx=idx, op=op)) return 0 diff --git a/benchmark/opperf/utils/benchmark_utils.py b/benchmark/opperf/utils/benchmark_utils.py index dc4890b..adf5d53 100644 --- a/benchmark/opperf/utils/benchmark_utils.py +++ b/benchmark/opperf/utils/benchmark_utils.py @@ -55,14 +55,14 @@ def _run_nd_operator_performance_test(op, inputs, run_backward, warmup, runs, kw # Run Benchmarks op_benchmark_result = {op.__name__: []} -logging.info(f"Begin Benchmark - {op.__name__}") +logging.info("Begin Benchmark - {name}".format(name=op.__name__)) for idx, kwargs in enumerate(kwargs_list): _, profiler_output = benchmark_helper_func(op, runs, **kwargs) # Add inputs used for profiling this operator into result profiler_output["inputs"] = inputs[idx] op_benchmark_result[op.__name__].append(profiler_output) -logging.info(f"Complete Benchmark - {op.__name__}") +logging.info("Complete Benchmark - {name}".format(name=op.__name__)) return op_benchmark_result
[incubator-mxnet] branch master updated: Update Horovod docs links in README (#15366)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 612b9d1 Update Horovod docs links in README (#15366) 612b9d1 is described below commit 612b9d1ed441e5af239cab6064b648beba3b99bb Author: Serge Panev AuthorDate: Fri Jul 5 10:09:31 2019 +0900 Update Horovod docs links in README (#15366) * Update Horovod docs links in README Signed-off-by: Serge Panev * retrigger CI * retrigger ci * Retrigger * Update README.md * Retrigger CI --- example/distributed_training-horovod/README.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/distributed_training-horovod/README.md b/example/distributed_training-horovod/README.md index bfaf9d9..8c939ea 100644 --- a/example/distributed_training-horovod/README.md +++ b/example/distributed_training-horovod/README.md @@ -43,8 +43,8 @@ $ pip install horovod ``` This basic installation is good for laptops and for getting to know Horovod. -If you're installing Horovod on a server with GPUs, read the [Horovod on GPU](https://github.com/horovod/horovod/blob/master/docs/gpus.md) page. -If you want to use Docker, read the [Horovod in Docker](https://github.com/horovod/horovod/blob/master/docs/docker.md) page. +If you're installing Horovod on a server with GPUs, read the [Horovod on GPU](https://github.com/horovod/horovod/blob/master/docs/gpus.rst) page. +If you want to use Docker, read the [Horovod in Docker](https://github.com/horovod/horovod/blob/master/docs/docker.rst) page. ## Install MPI MPI is required to run distributed training with Horovod. Install [Open MPI](https://www.open-mpi.org/) or another MPI implementation. @@ -177,7 +177,7 @@ model.fit(train_data, # Running Horovod The example commands below show how to run distributed training. See the -[Running Horovod](https://github.com/horovod/horovod/blob/master/docs/running.md) +[Running Horovod](https://github.com/horovod/horovod/blob/master/docs/running.rst) page for more instructions. 1. To run on a machine with 4 CPUs: @@ -198,4 +198,4 @@ $ mpirun -np 8 \ -x NCCL_DEBUG=INFO \ -mca pml ob1 -mca btl ^openib \ python train.py -``` \ No newline at end of file +```
[incubator-mxnet] branch master updated (8ebaa5c -> 0ec4886)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 8ebaa5c REAME MTCNN Link URL Error in original website (#15020) add 0ec4886 Expose get_all_registered_operators and get_operator_arguments in theā¦ (#15364) No new revisions were added by this update. Summary of changes: benchmark/opperf/utils/op_registry_utils.py | 81 +++-- python/mxnet/operator.py| 61 +- tests/python/unittest/test_operator.py | 19 ++- 3 files changed, 84 insertions(+), 77 deletions(-)
[incubator-mxnet] branch master updated: REAME MTCNN Link URL Error in original website (#15020)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 8ebaa5c REAME MTCNN Link URL Error in original website (#15020) 8ebaa5c is described below commit 8ebaa5c0384ecbef244150859b3e24ea2f02095d Author: sunrongda <38203631+sunron...@users.noreply.github.com> AuthorDate: Thu Jul 4 20:02:17 2019 +0800 REAME MTCNN Link URL Error in original website (#15020) * eval_metric.py * Update eval_metric.py * Update eval_metric.py * faster cnn * use_global_stats=False use_global_stats=False * readme * Delete symbol_resnet.py * resnet * Update README.md * Update README.md * update the link of MTCNN --- example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/README.md b/example/README.md index 16b556d..be99030 100644 --- a/example/README.md +++ b/example/README.md @@ -171,7 +171,7 @@ If your tutorial depends on specific packages, simply add them to this provision * [MultiGPU enabled image generative models (GAN and DCGAN)](https://github.com/tqchen/mxnet-gan) by [Tianqi Chen](https://github.com/tqchen) * [Deep reinforcement learning for playing flappybird by mxnet](https://github.com/li-haoran/DRL-FlappyBird) by LIHaoran * [Neural Style in Markov Random Field (MRF) and Perceptual Losses Realtime transfer](https://github.com/zhaw/neural_style) by [zhaw](https://github.com/zhaw) -* [MTCNN Face keypoints detection and alignment](https://pangyupo.github.io/2016/10/22/mxnet-mtcnn/) ([github](https://github.com/pangyupo/mxnet_mtcnn_face_detection)) in Chinese by [pangyupo](https://github.com/pangyupo) +* [MTCNN Face keypoints detection and alignment](https://github.com/YYuanAnyVision/mxnet_mtcnn_face_detection) by [yuanyang](https://github.com/YYuanAnyVision), source code for [paper](https://kpzhang93.github.io/papers/spl.pdf) "Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks", [Kaipeng Zhang](https://github.com/kpzhang93), Zhanpeng Zhang, Zhifeng Li and Yu Qiao, IEEE Signal Processing Letters, 23(10), 2016 * [SSD: Single Shot MultiBox Object Detector](https://github.com/zhreshold/mxnet-ssd) by [zhreshold](https://github.com/zhreshold) * [Fast Neural Style in Scala](https://github.com/Ldpe2G/DeepLearningForFun/tree/master/Mxnet-Scala/FastNeuralStyle) by [Ldpe2G](https://github.com/Ldpe2G) * [LSTM Human Activity Recognition](https://github.com/Ldpe2G/DeepLearningForFun/tree/master/Mxnet-Scala/HumanActivityRecognition) by [Ldpe2G](https://github.com/Ldpe2G)
[incubator-mxnet] branch master updated: Fix memory leak in NaiveEngine (#15405)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new faccc59 Fix memory leak in NaiveEngine (#15405) faccc59 is described below commit faccc59bc0ed7e22933c1f86f3aabac6f13fe1a9 Author: Pedro Larroy AuthorDate: Wed Jul 3 17:36:56 2019 -0700 Fix memory leak in NaiveEngine (#15405) * Fix memory leak in NaiveEngine Fixes #15375 * Fix lint --- src/engine/naive_engine.cc | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/naive_engine.cc b/src/engine/naive_engine.cc index 9f44b55..9cfe9b2 100644 --- a/src/engine/naive_engine.cc +++ b/src/engine/naive_engine.cc @@ -159,15 +159,18 @@ class NaiveEngine final : public Engine { NaiveEngine::OnComplete, nullptr); this->req_completed_ = false; profiler::Profiler *profiler = profiler::Profiler::Get(); -NaiveOpr *opr = nullptr; +auto opr_deleter = [this](NaiveOpr* p) { + this->DeleteOperator(p); +}; +std::unique_ptr opr(nullptr, opr_deleter); const bool profiling = opr_name && profiler->IsProfiling(profiler::Profiler::kImperative); // GenerateDisplayName() will return a pointer to the correct name of the operator const char* display_name = profiling ? profiler::CustomOpProfiler::Get()->GenerateDisplayName(opr_name) : opr_name; if (profiling) { - opr = NewOperator(exec_fun, const_vars, mutable_vars, -prop, display_name)->Cast(); + opr.reset(NewOperator(exec_fun, const_vars, mutable_vars, +prop, display_name)->Cast()); opr->profiling = profiling; std::unique_ptr attrs; if (profiler->AggregateEnabled()) {
[incubator-mxnet] branch master updated (582489c -> cd19367)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 582489c Fix Cached_op with static_shape=true (#15298) add cd19367 add 'asnumpy' dtype option to check_symbolic_backward (#15186) No new revisions were added by this update. Summary of changes: python/mxnet/test_utils.py | 8 1 file changed, 4 insertions(+), 4 deletions(-)
[incubator-mxnet] branch master updated: indent changes (#15321)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 0340536 indent changes (#15321) 0340536 is described below commit 0340536394bf8205b5394bc9f60649b28d0a2e4f Author: nihui AuthorDate: Sat Jun 22 16:44:29 2019 +0800 indent changes (#15321) --- src/io/image_aug_default.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/image_aug_default.cc b/src/io/image_aug_default.cc index a1975ef..0e84b7c 100644 --- a/src/io/image_aug_default.cc +++ b/src/io/image_aug_default.cc @@ -163,8 +163,8 @@ struct DefaultImageAugmentParam : public dmlc::Parameter
[incubator-mxnet] branch master updated: Efficient MXNet sampling in the multinomial distribution (#15311)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new e6fad30 Efficient MXNet sampling in the multinomial distribution (#15311) e6fad30 is described below commit e6fad30e45e6ec0ddef5c18093e8163cd2a7c62c Author: Zixuan Wei <9527221+zixuanwe...@users.noreply.github.com> AuthorDate: Sat Jun 22 14:26:27 2019 +0800 Efficient MXNet sampling in the multinomial distribution (#15311) * Effective multinomial * Meaningful uniform data pointer as input * Remove beginning Zeros from CDFs * Double precision for accumulated var --- src/operator/random/sample_multinomial_op.h | 42 - 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/operator/random/sample_multinomial_op.h b/src/operator/random/sample_multinomial_op.h index 377df4f..5a0b9bb 100644 --- a/src/operator/random/sample_multinomial_op.h +++ b/src/operator/random/sample_multinomial_op.h @@ -122,25 +122,29 @@ inline bool SampleMultinomialOpType(const nnvm::NodeAttrs& attrs, struct SampleMultinomialKernel { template MSHADOW_XINLINE static void Map(int i, index_t K, index_t M, - DType* dist, float* uniform, IType* out, - DType* prob) { + DType* dist, float* uniform, float* cum_table, + IType* out, DType* prob) { +double acc = 0.0; +// CDF table +for (index_t c = 0; c < K; ++c) { + acc += dist[i*K + c]; + cum_table[i*K + c] = static_cast(acc); +} for (index_t j = 0; j < M; ++j) { + index_t left = 0, right = K; + index_t middle = left + (right - left) / 2; DType loc = static_cast(uniform[i*M + j]); - DType acc = 0; - bool found = false; - for (index_t k = 0; k < K; ++k) { -acc += dist[i*K + k]; -if (acc > loc) { - found = true; - out[i*M + j] = static_cast(k); - if (prob != nullptr) prob[i*M + j] = logf(dist[i*K + k]); - break; + while (right - left > 0) { +middle = left + (right - left) / 2; +DType cum_prob = cum_table[i*K + middle]; +if (cum_prob < loc) { + left = middle + 1; +} else { + right = middle; } } - if (!found) { -out[i*M + j] = static_cast(K-1); -if (prob != nullptr) prob[i*M + j] = logf(dist[i*K + K - 1]); - } + out[i*M + j] = static_cast(left); + if (prob != nullptr) prob[i*M + j] = logf(dist[i*K + left]); } } }; @@ -163,12 +167,14 @@ void SampleMultinomialForward(const nnvm::NodeAttrs& attrs, Stream *s = ctx.get_stream(); MSHADOW_REAL_TYPE_SWITCH(inputs[0].type_flag_, DType, { Random *prnd = ctx.requested[0].get_random(s); -Tensor uniform = - ctx.requested[1].get_space_typed(Shape1(N*M), s); +Tensor workspace = + ctx.requested[1].get_space_typed(Shape1(N*M + N*K), s); +Tensor uniform(workspace.dptr_, Shape1(N*M)); prnd->SampleUniform(, 0, 1); MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, IType, { Kernel::Launch( -s, N, K, M, inputs[0].dptr(), uniform.dptr_, outputs[0].dptr(), +s, N, K, M, inputs[0].dptr(), uniform.dptr_, workspace.dptr_ + N*M, +outputs[0].dptr(), param.get_prob ? outputs[1].dptr() : nullptr); }); });
[incubator-mxnet] branch master updated: Typo fix in plan_memory relase -> release. (#15299)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 4a9e9f6 Typo fix in plan_memory relase -> release. (#15299) 4a9e9f6 is described below commit 4a9e9f67a5e7e5ddf2e394c6381f4f6449626af2 Author: Disi A AuthorDate: Fri Jun 21 04:02:38 2019 -0400 Typo fix in plan_memory relase -> release. (#15299) --- src/nnvm/plan_memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnvm/plan_memory.cc b/src/nnvm/plan_memory.cc index ce442ed..427d1c7 100644 --- a/src/nnvm/plan_memory.cc +++ b/src/nnvm/plan_memory.cc @@ -301,7 +301,7 @@ size_t AllocMemory(const Graph& ret, const IndexedGraph& idx, auto sid = storage[eid]; // storage_ref_count == 0 means it is taken by inplace op if (sid < 0) continue; - // if we decrease it to zero, means we are ready to relase + // if we decrease it to zero, means we are ready to release --storage_ref_count[sid]; if (storage_ref_count[sid] == 0) { allocator->Release(sid, nid);
[incubator-mxnet] branch master updated: Fix java install docs (#15250)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new ccbbf6b Fix java install docs (#15250) ccbbf6b is described below commit ccbbf6b4b76ea536a6583c99497c83b65a20817b Author: Zach Kimberg AuthorDate: Tue Jun 18 17:44:52 2019 -0700 Fix java install docs (#15250) --- docs/install/java_setup.md| 2 +- docs/tutorials/java/mxnet_java_on_intellij.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install/java_setup.md b/docs/install/java_setup.md index 5029b52..a6aa8f8 100644 --- a/docs/install/java_setup.md +++ b/docs/install/java_setup.md @@ -43,7 +43,7 @@ brew install maven Please run the following lines: ```bash -sudo apt-get install openjdk-8-java maven +sudo apt-get install openjdk-8-jdk maven ``` **Step 2.** Run the demo MXNet-Java project. diff --git a/docs/tutorials/java/mxnet_java_on_intellij.md b/docs/tutorials/java/mxnet_java_on_intellij.md index 3b3245d..82ac1e1 100644 --- a/docs/tutorials/java/mxnet_java_on_intellij.md +++ b/docs/tutorials/java/mxnet_java_on_intellij.md @@ -44,7 +44,7 @@ brew install opencv Run the following commands to install the prerequisites on Ubuntu. ``` -sudo apt-get install openjdk-8-java maven +sudo apt-get install openjdk-8-jdk maven ```
[incubator-mxnet] branch master updated: Add missing file to Maven clean (#15216)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 769b882 Add missing file to Maven clean (#15216) 769b882 is described below commit 769b88273242bd88b72c4d63cb4e5b9926853b41 Author: Zach Kimberg AuthorDate: Tue Jun 11 23:39:51 2019 -0700 Add missing file to Maven clean (#15216) --- scala-package/core/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/scala-package/core/pom.xml b/scala-package/core/pom.xml index b888b55..d7b9f90 100644 --- a/scala-package/core/pom.xml +++ b/scala-package/core/pom.xml @@ -114,6 +114,7 @@ NDArrayRandomAPIBase.scala javaapi/NDArrayBase.scala SymbolAPIBase.scala +SymbolBase.scala SymbolRandomAPIBase.scala false
[incubator-mxnet] branch master updated: Fixed a bug in Gluon DataLoader. (#15195)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 2e20094 Fixed a bug in Gluon DataLoader. (#15195) 2e20094 is described below commit 2e2009457abeec70afc0ffebb74ab2815c376bc6 Author: Chandana Satya Prakash AuthorDate: Wed Jun 12 02:40:54 2019 -0400 Fixed a bug in Gluon DataLoader. (#15195) * Fixed a bug in Gluon DataLoader. Issue: https://github.com/apache/incubator-mxnet/issues/15025 Fix: Broadened the scope of worker pool to iterators. Passed a reference of dataloader to the multi worker iterator * Fixed a bug in Gluon DataLoader. Issue: https://github.com/apache/incubator-mxnet/issues/15025 Fix: Broadened the scope of worker pool to iterators. Passed a reference of dataloader to the multi worker iterator * Fixed a bug in Gluon DataLoader. Issue: https://github.com/apache/incubator-mxnet/issues/15025 Fix: Broadened the scope of worker pool to iterators. Passed a reference of dataloader to the multi worker iterator * Fixed a bug in Gluon DataLoader. Issue: https://github.com/apache/incubator-mxnet/issues/15025 Fix: Broadened the scope of worker pool to iterators. Passed a reference of dataloader to the multi worker iterator --- python/mxnet/gluon/data/dataloader.py| 6 -- tests/python/unittest/test_gluon_data.py | 25 + 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/python/mxnet/gluon/data/dataloader.py b/python/mxnet/gluon/data/dataloader.py index 934f2d5..accd968 100644 --- a/python/mxnet/gluon/data/dataloader.py +++ b/python/mxnet/gluon/data/dataloader.py @@ -409,7 +409,7 @@ def _thread_worker_fn(samples, batchify_fn, dataset): class _MultiWorkerIter(object): """Internal multi-worker iterator for DataLoader.""" def __init__(self, worker_pool, batchify_fn, batch_sampler, pin_memory=False, - pin_device_id=0, worker_fn=_worker_fn, prefetch=0, dataset=None): + pin_device_id=0, worker_fn=_worker_fn, prefetch=0, dataset=None, data_loader=None): self._worker_pool = worker_pool self._batchify_fn = batchify_fn self._batch_sampler = batch_sampler @@ -421,6 +421,7 @@ class _MultiWorkerIter(object): self._pin_memory = pin_memory self._pin_device_id = pin_device_id self._dataset = dataset +self._data_loader = data_loader # pre-fetch for _ in range(prefetch): self._push_next() @@ -582,7 +583,8 @@ class DataLoader(object): pin_memory=self._pin_memory, pin_device_id=self._pin_device_id, worker_fn=_thread_worker_fn if self._thread_pool else _worker_fn, prefetch=self._prefetch, -dataset=self._dataset if self._thread_pool else None) +dataset=self._dataset if self._thread_pool else None, +data_loader=self) def __len__(self): return len(self._batch_sampler) diff --git a/tests/python/unittest/test_gluon_data.py b/tests/python/unittest/test_gluon_data.py index 1939de8..58e241b 100644 --- a/tests/python/unittest/test_gluon_data.py +++ b/tests/python/unittest/test_gluon_data.py @@ -28,6 +28,7 @@ from mxnet.gluon.data import DataLoader import mxnet.ndarray as nd from mxnet import context from mxnet.gluon.data.dataset import Dataset +from mxnet.gluon.data.dataset import ArrayDataset @with_seed() def test_array_dataset(): @@ -279,6 +280,30 @@ def test_dataloader_context(): for _, x in enumerate(loader3): assert x.context == context.cpu_pinned(custom_dev_id) +def batchify(a): +return a + +def test_dataloader_scope(): +""" +Bug: Gluon DataLoader terminates the process pool early while +_MultiWorkerIter is operating on the pool. + +Tests that DataLoader is not garbage collected while the iterator is +in use. +""" +args = {'num_workers': 1, 'batch_size': 2} +dataset = nd.ones(5) +iterator = iter(DataLoader( +dataset, +batchify_fn=batchify, +**args +) +) + +item = next(iterator) + +assert item is not None + if __name__ == '__main__': import nose
[incubator-mxnet] branch master updated: Fix wrong description of output range of ToTensor (#14794)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new b64e00a Fix wrong description of output range of ToTensor (#14794) b64e00a is described below commit b64e00a26dd6e00a3c057880ec41b0f46827fcfb Author: Alexander Grund AuthorDate: Sun Jun 9 07:12:05 2019 +0200 Fix wrong description of output range of ToTensor (#14794) * Fix wrong description of output range of ToTensor The range is actually including 1 due to division by 255 (not 256) * Add ToTensor tests with boundary values * retrigger CI --- python/mxnet/gluon/data/vision/transforms.py| 2 +- src/operator/image/image_random.cc | 2 +- tests/python/gpu/test_gluon_transforms.py | 11 ++- tests/python/unittest/test_gluon_data_vision.py | 9 + 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/python/mxnet/gluon/data/vision/transforms.py b/python/mxnet/gluon/data/vision/transforms.py index dff7f66..955f2b2 100644 --- a/python/mxnet/gluon/data/vision/transforms.py +++ b/python/mxnet/gluon/data/vision/transforms.py @@ -100,7 +100,7 @@ class ToTensor(HybridBlock): Converts an image NDArray of shape (H x W x C) in the range [0, 255] to a float32 tensor NDArray of shape (C x H x W) in -the range [0, 1). +the range [0, 1]. If batch input, converts a batch image NDArray of shape (N x H x W x C) in the range [0, 255] to a float32 tensor NDArray of shape (N x C x H x W). diff --git a/src/operator/image/image_random.cc b/src/operator/image/image_random.cc index 0b95b19..34f4cb4 100644 --- a/src/operator/image/image_random.cc +++ b/src/operator/image/image_random.cc @@ -41,7 +41,7 @@ DMLC_REGISTER_PARAMETER(RandomColorJitterParam); NNVM_REGISTER_OP(_image_to_tensor) .describe(R"code(Converts an image NDArray of shape (H x W x C) or (N x H x W x C) with values in the range [0, 255] to a tensor NDArray of shape (C x H x W) or (N x C x H x W) -with values in the range [0, 1) +with values in the range [0, 1] Example: .. code-block:: python diff --git a/tests/python/gpu/test_gluon_transforms.py b/tests/python/gpu/test_gluon_transforms.py index 599a02c..e303008 100644 --- a/tests/python/gpu/test_gluon_transforms.py +++ b/tests/python/gpu/test_gluon_transforms.py @@ -24,7 +24,7 @@ from mxnet import gluon from mxnet.base import MXNetError from mxnet.gluon.data.vision import transforms from mxnet.test_utils import assert_almost_equal, set_default_context -from mxnet.test_utils import almost_equal +from mxnet.test_utils import almost_equal, same curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) sys.path.insert(0, os.path.join(curr_path, '../unittest')) from common import assertRaises, setup_module, with_seed, teardown @@ -90,6 +90,15 @@ def test_to_tensor(): transformer = transforms.ToTensor() assertRaises(MXNetError, transformer, invalid_data_in) +# Bounds (0->0, 255->1) +data_in = np.zeros((10, 20, 3)).astype(dtype=np.uint8) +out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) +assert same(out_nd.asnumpy(), np.transpose(np.zeros(data_in.shape, dtype=np.float32), (2, 0, 1))) + +data_in = np.full((10, 20, 3), 255).astype(dtype=np.uint8) +out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) +assert same(out_nd.asnumpy(), np.transpose(np.ones(data_in.shape, dtype=np.float32), (2, 0, 1))) + @with_seed() def test_resize(): # Test with normal case 3D input float type diff --git a/tests/python/unittest/test_gluon_data_vision.py b/tests/python/unittest/test_gluon_data_vision.py index cc15bec..627567c 100644 --- a/tests/python/unittest/test_gluon_data_vision.py +++ b/tests/python/unittest/test_gluon_data_vision.py @@ -47,6 +47,15 @@ def test_to_tensor(): invalid_data_in = nd.random.uniform(0, 255, (5, 5, 300, 300, 3)).astype(dtype=np.uint8) transformer = transforms.ToTensor() assertRaises(MXNetError, transformer, invalid_data_in) + +# Bounds (0->0, 255->1) +data_in = np.zeros((10, 20, 3)).astype(dtype=np.uint8) +out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) +assert same(out_nd.asnumpy(), np.transpose(np.zeros(data_in.shape, dtype=np.float32), (2, 0, 1))) + +data_in = np.full((10, 20, 3), 255).astype(dtype=np.uint8) +out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8')) +assert same(out_nd.asnumpy(), np.transpose(np.ones(data_in.shape, dtype=np.float32), (2, 0, 1))) @with_seed()
[incubator-mxnet] branch master updated: don't check for nullptr before deleting; closes #14580 (#14901)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 99f8fc9 don't check for nullptr before deleting; closes #14580 (#14901) 99f8fc9 is described below commit 99f8fc9f91846bb9fff211174e2190d4524dcaf1 Author: bernie gray AuthorDate: Sat Jun 8 22:19:36 2019 -0400 don't check for nullptr before deleting; closes #14580 (#14901) * don't check for nullptr before deleting; closes #14580 * trigger CI * retrigger CI --- cpp-package/example/inference/inception_inference.cpp | 4 +--- src/io/iter_mnist.cc | 2 +- src/kvstore/kvstore_dist.h| 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cpp-package/example/inference/inception_inference.cpp b/cpp-package/example/inference/inception_inference.cpp index 4d7d5f4..cb952aa 100644 --- a/cpp-package/example/inference/inception_inference.cpp +++ b/cpp-package/example/inference/inception_inference.cpp @@ -329,9 +329,7 @@ void Predictor::PredictImage(const std::string& image_file) { Predictor::~Predictor() { - if (executor) { -delete executor; - } + delete executor; MXNotifyShutdown(); } diff --git a/src/io/iter_mnist.cc b/src/io/iter_mnist.cc index 0163a62..b752ce4 100644 --- a/src/io/iter_mnist.cc +++ b/src/io/iter_mnist.cc @@ -84,7 +84,7 @@ class MNISTIter: public IIterator { out_.data.resize(2); } virtual ~MNISTIter(void) { -if (img_.dptr_ != nullptr) delete []img_.dptr_; +delete []img_.dptr_; } // intialize iterator loads data in virtual void Init(const std::vector >& kwargs) { diff --git a/src/kvstore/kvstore_dist.h b/src/kvstore/kvstore_dist.h index 9fe41c5..5ac28cb 100644 --- a/src/kvstore/kvstore_dist.h +++ b/src/kvstore/kvstore_dist.h @@ -141,9 +141,7 @@ class KVStoreDist : public KVStoreLocal { } if (server_) server_->Run(); ps::Finalize(0, true); -if (server_) { - delete server_; -} +delete server_; server_ = nullptr; }
[incubator-mxnet] branch master updated: Fix installation dependencies (#14987)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new 21d7ac0 Fix installation dependencies (#14987) 21d7ac0 is described below commit 21d7ac00ccdb3ebec497fda750241aa0dff7de5f Author: Aaron Markham AuthorDate: Sat Jun 8 17:22:17 2019 -0700 Fix installation dependencies (#14987) * fix links to md files * switch html links to md * update java tutorials link * merge; graphviz pinned * remove index from link to get around recursion error * remove old tx2 redirect * fix broken links * fix toctree error --- ci/docker/install/ubuntu_tutorials.sh | 4 ++-- docs/install/build_from_source.md | 43 +-- docs/install/c_plus_plus.md | 4 ++-- docs/install/index.md | 5 ++-- docs/install/java_setup.md| 16 ++--- docs/install/osx_setup.md | 14 ++-- docs/install/raspbian_setup.md| 25 docs/install/scala_setup.md | 12 +- docs/install/tx2_setup.md | 25 docs/install/ubuntu_setup.md | 34 +-- docs/install/windows_setup.md | 6 ++--- 11 files changed, 68 insertions(+), 120 deletions(-) diff --git a/ci/docker/install/ubuntu_tutorials.sh b/ci/docker/install/ubuntu_tutorials.sh index eb1f703..d82763e 100755 --- a/ci/docker/install/ubuntu_tutorials.sh +++ b/ci/docker/install/ubuntu_tutorials.sh @@ -25,5 +25,5 @@ apt-get update || true apt-get install graphviz python-opencv # sckit-learn past version 0.20 does not support python version 2 and 3.4 -pip2 install jupyter matplotlib Pillow opencv-python "scikit-learn<0.21.0" graphviz tqdm mxboard scipy gluoncv -pip3 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz tqdm mxboard scipy gluoncv +pip2 install jupyter matplotlib Pillow opencv-python "scikit-learn<0.21.0" graphviz==0.8.4 tqdm mxboard scipy gluoncv +pip3 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz==0.8.4 tqdm mxboard scipy gluoncv diff --git a/docs/install/build_from_source.md b/docs/install/build_from_source.md index 7b00b03..5f4a572 100644 --- a/docs/install/build_from_source.md +++ b/docs/install/build_from_source.md @@ -42,14 +42,14 @@ Building from source follows this general two-step flow of building the shared l * [non-Intel CPUs](#recommended-for-Systems-with-non-Intel-CPUs) 2. [Install the language API binding(s)](#installing-mxnet-language-bindings) you would like to use for MXNet. MXNet's newest and most popular API is Gluon. Gluon is built into the Python binding. If Python isn't your preference, you still have more options. MXNet supports several other language APIs: -- [Python (includes Gluon)](../api/python/index.html) -- [C++](../api/c++/index.html) -- [Clojure](../api/clojure/index.html) -- [Java](../api/java/index.html) -- [Julia](../api/julia/index.html) -- [Perl](../api/perl/index.html) -- [R](../api/r/index.html) -- [Scala](../api/scala/index.html) +- [Python (includes Gluon)](../api/python/index.md) +- [C++](../api/c++/index.md) +- [Clojure](../api/clojure/index.md) +- [Java](../api/java/index.md) +- [Julia](../api/julia/index.md) +- [Perl](../api/perl/index.md) +- [R](../api/r/index.md) +- [Scala](../api/scala/index.md) @@ -58,12 +58,11 @@ MXNet's newest and most popular API is Gluon. Gluon is built into the Python bin Detailed instructions are provided per operating system. Each of these guides also covers how to install the specific [Language Bindings](#installing-mxnet-language-bindings) you require. You may jump to those, but it is recommended that you continue reading to understand more general "build from source" options. -* [Amazon Linux / CentOS / RHEL](centos_setup.html) -* [macOS](osx_setup.html) -* [Raspbian](raspian_setup.html) -* [TX2](tx2_setup.html) -* [Ubuntu](ubuntu_setup.html) -* [Windows](windows_setup.html) +* [Amazon Linux / CentOS / RHEL](centos_setup.md) +* [macOS](osx_setup.md) +* [Devices](https://mxnet.incubator.apache.org/versions/master/install/index.html?platform=Devices=Python=CPU) +* [Ubuntu](ubuntu_setup.md) +* [Windows](windows_setup.md) @@ -307,13 +306,13 @@ After building MXNet's shared library, you can install other language bindings. **NOTE:** The C++ API binding must be built when you build MXNet from source. See [Build MXNet with C++](#build-mxnet-with-c++). The following table provides links to each language binding by operating system: -| | [Ubuntu](ubuntu_setup.html) | [macOS](osx_setup.html) | [Windows](windows_setup.html) | +| | [Ubuntu](ubuntu_setup.md)
[incubator-mxnet] branch master updated: Update env_var.md (#15153)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git The following commit(s) were added to refs/heads/master by this push: new c474f5f Update env_var.md (#15153) c474f5f is described below commit c474f5f88ab39c39a64976adc59ef4cfe7a6be79 Author: Haibin Lin AuthorDate: Wed Jun 5 04:56:21 2019 -0700 Update env_var.md (#15153) --- docs/faq/env_var.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq/env_var.md b/docs/faq/env_var.md index 5610702..ae498c3 100644 --- a/docs/faq/env_var.md +++ b/docs/faq/env_var.md @@ -47,7 +47,7 @@ $env:MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 - The maximum number of concurrent threads that do the memory copy job on each GPU. * MXNET_CPU_WORKER_NTHREADS - Values: Int ```(default=1)``` - - The maximum number of scheduling threads on CPU. It specifies how many operators can be run in parallel. + - The maximum number of scheduling threads on CPU. It specifies how many operators can be run in parallel. Note that most CPU operators are parallelized by OpenMP. To change the number of threads used by individual operators, please set `OMP_NUM_THREADS` instead. * MXNET_CPU_PRIORITY_NTHREADS - Values: Int ```(default=4)``` - The number of threads given to prioritized CPU jobs.
[incubator-mxnet] branch master updated (134a3e8 -> 910583e)
This is an automated email from the ASF dual-hosted git repository. wkcn pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git. from 134a3e8 fix nightly (#15141) add 910583e fix misspell (#15149) No new revisions were added by this update. Summary of changes: python/mxnet/profiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)