zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164930373
##
File path: tests/python/gpu/test_gluon_model_zoo.py
##
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164921462
##
File path: tests/python/gpu/test_gluon_model_zoo.py
##
@@ -0,0 +1,163 @@
+# Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164905297
##
File path: src/operator/nn/fully_connected.cc
##
@@ -23,58 +23,165 @@
* \brief fully connect operator
*/
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164904958
##
File path: Makefile
##
@@ -40,11 +40,11 @@ endif
# use customized config file
include $(config)
-ifeq
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164232807
##
File path: src/kvstore/kvstore_dist.h
##
@@ -32,11 +32,6 @@
#include "mxnet/engine.h"
#include "ps/ps.h"
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r164203240
##
File path: src/kvstore/kvstore_dist.h
##
@@ -32,11 +32,6 @@
#include "mxnet/engine.h"
#include "ps/ps.h"
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r163404234
##
File path: tests/python/gpu/test_gluon_model_zoo.py
##
@@ -33,6 +33,8 @@ def download_data():
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162523269
##
File path: src/operator/tensor/elemwise_binary_op_basic.cc
##
@@ -46,6 +103,41 @@ The storage type of
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162523057
##
File path: src/operator/tensor/cast_storage.cc
##
@@ -25,10 +25,50 @@
#include "./cast_storage-inl.h"
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162522557
##
File path: src/operator/nn/mkldnn/mkldnn_base-inl.h
##
@@ -0,0 +1,429 @@
+/*
+ * Licensed to the Apache
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162506606
##
File path: include/mxnet/ndarray.h
##
@@ -184,11 +135,17 @@ class NDArray {
const TBlob , const
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162502678
##
File path: src/ndarray/ndarray.cc
##
@@ -181,6 +322,408 @@ void NDArray::set_fresh_out_grad(bool state)
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162502091
##
File path: src/operator/nn/mkldnn/mkldnn_sum.cc
##
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162501336
##
File path: src/operator/tensor/elemwise_unary_op_basic.cc
##
@@ -108,12 +109,66 @@
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162501065
##
File path: src/operator/tensor/matrix_op.cc
##
@@ -180,6 +182,51 @@ If the argument `reverse` is set to 1,
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162432577
##
File path: src/operator/nn/pooling.cc
##
@@ -32,67 +33,304 @@
#if MXNET_USE_NNPACK == 1
#include
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162148807
##
File path: src/operator/lrn.cc
##
@@ -1,76 +0,0 @@
-/*
Review comment:
src/operator/nn/lrn.cc
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162141699
##
File path: example/image-classification/common/data.py
##
@@ -112,7 +112,8 @@ def get_rec_iter(args,
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r162132278
##
File path: tests/python/unittest/test_executor.py
##
@@ -140,22 +140,20 @@ def test_dot():
def
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161940072
##
File path: src/storage/cpu_device_storage.h
##
@@ -54,7 +54,11 @@ class CPUDeviceStorage {
/*!
*
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161939043
##
File path: include/mxnet/ndarray.h
##
@@ -611,6 +565,64 @@ class NDArray {
<<
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161937980
##
File path: include/mxnet/ndarray.h
##
@@ -611,6 +565,64 @@ class NDArray {
<<
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161936090
##
File path: include/mxnet/ndarray.h
##
@@ -534,15 +491,12 @@ class NDArray {
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161921308
##
File path: src/common/exec_utils.h
##
@@ -43,19 +43,61 @@ namespace common {
indices are not
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161921308
##
File path: src/common/exec_utils.h
##
@@ -43,19 +43,61 @@ namespace common {
indices are not
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161619748
##
File path: .gitmodules
##
@@ -22,3 +22,7 @@
[submodule "3rdparty/googletest"]
path =
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161619569
##
File path: Jenkinsfile
##
@@ -4,6 +4,7 @@
// mxnet libraries
mx_lib = 'lib/libmxnet.so, lib/libmxnet.a,
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r161619303
##
File path: Jenkinsfile
##
@@ -204,42 +205,40 @@ try {
}
}
},
-'CPU: MKLML': {
+
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156520457
##
File path: src/ndarray/ndarray.cc
##
@@ -64,17 +158,147 @@ nnvm::Symbol NDArray::get_autograd_symbol() const
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156519807
##
File path: src/ndarray/ndarray.cc
##
@@ -64,17 +158,147 @@ nnvm::Symbol NDArray::get_autograd_symbol() const
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156519245
##
File path: src/ndarray/ndarray.cc
##
@@ -64,17 +158,147 @@ nnvm::Symbol NDArray::get_autograd_symbol() const
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156510303
##
File path: src/operator/nn/activation-inl.h
##
@@ -61,158 +62,127 @@ struct ActivationParam : public
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156511872
##
File path: src/operator/nn/activation.cu
##
@@ -31,39 +31,73 @@
namespace mxnet {
namespace op {
+
+#if
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156510825
##
File path: src/operator/nn/activation.cc
##
@@ -21,65 +21,128 @@
* Copyright (c) 2015 by Contributors
*
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156510303
##
File path: src/operator/nn/activation-inl.h
##
@@ -61,158 +62,127 @@ struct ActivationParam : public
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156509390
##
File path: src/operator/nn/activation-inl.h
##
@@ -61,158 +62,127 @@ struct ActivationParam : public
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156509390
##
File path: src/operator/nn/activation-inl.h
##
@@ -61,158 +62,127 @@ struct ActivationParam : public
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156508822
##
File path: src/ndarray/ndarray.cc
##
@@ -95,12 +319,36 @@ NDArray NDArray::ReshapeWithRecord(const TShape )
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156240694
##
File path: src/common/utils.h
##
@@ -327,17 +349,7 @@ inline std::string dispatch_mode_string(const
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156240271
##
File path: python/mxnet/ndarray/sparse.py
##
@@ -1138,6 +1139,8 @@ def _ndarray_cls(handle, writable=True,
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156219864
##
File path: include/mxnet/ndarray.h
##
@@ -608,6 +549,37 @@ class NDArray {
<<
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r156218843
##
File path: python/mxnet/ndarray/mkldnn.py
##
@@ -0,0 +1,87 @@
+# Licensed to the Apache Software Foundation
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155914245
##
File path: src/executor/infer_graph_attr_pass.cc
##
@@ -416,11 +416,6 @@ nnvm::Graph
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155907169
##
File path: src/operator/nn/convolution.cc
##
@@ -38,63 +36,361 @@ namespace mxnet {
namespace op {
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155907018
##
File path: src/kvstore/kvstore_dist.h
##
@@ -32,11 +32,6 @@
#include "mxnet/engine.h"
#include "ps/ps.h"
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155851393
##
File path: src/kvstore/kvstore_local.h
##
@@ -256,7 +256,13 @@ class KVStoreLocal : public KVStore {
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155850266
##
File path: src/executor/graph_executor.cc
##
@@ -54,6 +54,14 @@ GraphExecutor::~GraphExecutor() {
}
}
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155850103
##
File path: python/mxnet/ndarray/mkldnn.py
##
@@ -0,0 +1,113 @@
+# Licensed to the Apache Software Foundation
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155850103
##
File path: python/mxnet/ndarray/mkldnn.py
##
@@ -0,0 +1,113 @@
+# Licensed to the Apache Software Foundation
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155849981
##
File path: python/mxnet/ndarray/mkldnn.py
##
@@ -0,0 +1,113 @@
+# Licensed to the Apache Software Foundation
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155847361
##
File path: prepare_mkldnn.sh
##
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+# Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155847115
##
File path: include/mxnet/ndarray.h
##
@@ -820,20 +798,14 @@ class NDArray {
// storage shape is also
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155846518
##
File path: include/mxnet/ndarray.h
##
@@ -35,12 +35,12 @@
#include
#include
#include
+#if
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155846846
##
File path: include/mxnet/ndarray.h
##
@@ -608,6 +549,37 @@ class NDArray {
<<
zheng-da commented on a change in pull request #8302: Refactor operators &
MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r155845973
##
File path: Makefile
##
@@ -40,11 +40,11 @@ endif
# use customized config file
include $(config)
-ifeq
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153394021
##
File path: src/operator/nn/cudnn/cudnn_batch_norm.cu
##
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153394021
##
File path: src/operator/nn/cudnn/cudnn_batch_norm.cu
##
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153381774
##
File path: src/operator/nn/cudnn/cudnn_batch_norm.cu
##
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153369457
##
File path: src/operator/activation-inl.h
##
@@ -1,198 +0,0 @@
-/*
Review comment:
I tried `git mv` and rebased
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153368427
##
File path: src/operator/nn/batch_norm.cc
##
@@ -313,45 +314,76 @@ void BatchNormOp
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r153355527
##
File path: src/operator/nn/batch_norm.cc
##
@@ -313,45 +314,76 @@ void BatchNormOp
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150330094
##
File path: src/operator/nn/fully_connected-inl.h
##
@@ -176,124 +162,80 @@ class FullyConnectedOp : public Operator {
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150124107
##
File path: src/operator/nn/batch_norm-inl.h
##
@@ -212,150 +212,43 @@ class BatchNormOp : public Operator {
}; //
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150124188
##
File path: src/operator/nn/activation-inl.h
##
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150123672
##
File path: src/operator/nn/batch_norm.cc
##
@@ -313,45 +314,76 @@ void BatchNormOp
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150123512
##
File path: src/operator/nn/fully_connected-inl.h
##
@@ -176,124 +162,80 @@ class FullyConnectedOp : public Operator {
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r150122710
##
File path: src/operator/activation-inl.h
##
@@ -1,198 +0,0 @@
-/*
Review comment:
I agree. I will probably need
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r148698275
##
File path: tests/python/unittest/test_operator.py
##
@@ -883,7 +883,6 @@ def test_nearest_upsampling():
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r148698178
##
File path: src/operator/activation-inl.h
##
@@ -1,198 +0,0 @@
-/*
Review comment:
break up this pull request?
zheng-da commented on a change in pull request #8302: Refactor operators
URL: https://github.com/apache/incubator-mxnet/pull/8302#discussion_r144995243
##
File path: src/operator/nn/convolution.cc
##
@@ -0,0 +1,433 @@
+/*
+ * Licensed to the Apache Software Foundation
70 matches
Mail list logo