Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Refactor operators and add MKLDNN #9677

Merged
merged 72 commits into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4e9db27
Use NNVM interface.
zheng-da Nov 27, 2017
9e071f8
Remove MKL code.
zheng-da Oct 20, 2017
f668b68
Integrate MKLDNN.
zheng-da Oct 21, 2017
6ca9354
revert modification in test_executor.
zheng-da Jan 17, 2018
56e8c2c
Fix a bug in FlattenStorageType.
zheng-da Jan 17, 2018
c3d1683
Remove BN debug.
zheng-da Jan 17, 2018
27caf85
Remove remaining MXNET_USE_MKL2017
zheng-da Jan 17, 2018
585d837
Remove unused code in pooling.
zheng-da Jan 18, 2018
6a54f28
Fixing bugs in gtests.
zheng-da Jan 18, 2018
ffdd860
Fix lint errors.
zheng-da Jan 18, 2018
3ca549d
a lot of minor updates to address comments.
zheng-da Jan 19, 2018
8abbcc1
Fix coding style in MKLDNN Pooling (#22)
TaoLv Jan 19, 2018
9203748
revert the code change in the previous code refactor.
zheng-da Jan 19, 2018
407a972
Fix a bug in pooling.
zheng-da Jan 19, 2018
d4e7c58
LRN coding style changes (#21)
Jan 19, 2018
856aec9
cast storage with MKLDNN properly.
zheng-da Jan 19, 2018
b8deaab
Minor updates to address comments.
zheng-da Jan 19, 2018
bc1d164
some minor updates.
zheng-da Jan 19, 2018
b77ae3e
Switch to the master branch of MKLDNN.
zheng-da Jan 19, 2018
1766dc2
Minor updates to address comments.
zheng-da Jan 19, 2018
d0ae271
Update activation.cc
zheng-da Jan 20, 2018
ff78b02
Fix a bug in convert NDArray.
zheng-da Jan 23, 2018
5d6d604
Add gluon model zoo tests.
zheng-da Jan 23, 2018
b1e2983
Update GPU tests on model zoo.
zheng-da Jan 23, 2018
67359d9
Avoid using mobilenet for GPU tests with gluon models.
zheng-da Jan 23, 2018
e02de9d
Update GPU tests on gluon.
zheng-da Jan 24, 2018
01a1f54
change cmake to compile MKLDNN.
zheng-da Jan 25, 2018
69cb72c
update cmake for MKLDNN.
zheng-da Jan 25, 2018
f16fdfd
Implement align myself.
zheng-da Jan 26, 2018
4fb0c9f
Switch to intel/mkl-dnn.
zheng-da Jan 26, 2018
35c2665
Fix errors in align unittest.
zheng-da Jan 26, 2018
af9e811
Add unit test for LRN.
zheng-da Jan 26, 2018
8c15676
fix a compilation error.
zheng-da Jan 26, 2018
65c0242
use storage_type_assign to determine storage type.
zheng-da Jan 26, 2018
cb2af66
avoid global pooling in mkldnn.
zheng-da Jan 29, 2018
a1b2a06
compare all MKLDNN ops with native impls.
zheng-da Jan 30, 2018
2e2f55b
Fix a bug in testing correctness.
zheng-da Jan 30, 2018
a027011
print the name of buggy operator.
zheng-da Jan 30, 2018
6d7880a
undo some modifications.
zheng-da Jan 30, 2018
1451790
Fix a bug on reshaped array.
zheng-da Jan 30, 2018
eef3114
avoid testing outputs with NullOp.
zheng-da Jan 30, 2018
e59bdee
turn on MKLDNN tests in Jenkins.
zheng-da Jan 30, 2018
5e74b76
print each operator in MKLDNN tests.
zheng-da Jan 30, 2018
6ff193e
rename test_gluon_model_zoo.py
zheng-da Jan 31, 2018
ea1dd46
Create hashcode for operator parameters properly.
zheng-da Jan 31, 2018
c0f14c5
Add USE_MKL2017 back.
zheng-da Jan 31, 2018
4795960
Print warning messages.
zheng-da Feb 1, 2018
ac88417
move batchnorm tests to nnvm interface.
zheng-da Feb 1, 2018
3a6d8ae
Delete batchnorm v1 tests.
zheng-da Feb 1, 2018
6a25a20
Get inputs and outputs in batchnorm tests.
zheng-da Feb 2, 2018
2de47bd
disable batchnorm tests for now.
zheng-da Feb 2, 2018
cd46ddd
Remove warnings.
zheng-da Feb 5, 2018
d1e21ce
Fix GPU tests on gluon model zoo.
zheng-da Feb 2, 2018
2b69798
Fix lint complains in tests.
zheng-da Feb 2, 2018
42c3f24
Remove simd from openmp instructions in BatchNorm (#24)
TaoLv Feb 3, 2018
27a0227
Fix compilation errors.
zheng-da Feb 5, 2018
8be6810
Fix MKLDNN 1st compile failure issue (#23)
jinhuang415 Feb 5, 2018
f7f5563
Remove ARCH_OPT in Jenkins.
zheng-da Feb 5, 2018
d3d3c46
Revert "avoid global pooling in mkldnn."
zheng-da Feb 6, 2018
84920f2
Move to the latest MKLDNN.
zheng-da Feb 6, 2018
0ed1f94
WIP unit tests (#25)
cjolivier01 Feb 7, 2018
ecfd2b5
Make more C++ unit tests work for batch norm (#28)
cjolivier01 Feb 12, 2018
7417fdf
Fix lint complains.
zheng-da Feb 13, 2018
e8d1f8b
Fix a minor problem in Makefile.
zheng-da Feb 13, 2018
952a23d
fix GPU pooling.
zheng-da Feb 14, 2018
40a52b5
Disable modelzoo inference tests.
zheng-da Feb 14, 2018
40505b5
update accuracy checks for MKLDNN.
zheng-da Feb 14, 2018
466cea7
Fix MKLDNN pooling for global pooling.
zheng-da Feb 14, 2018
30b6866
Fix Jenkins.
zheng-da Feb 14, 2018
39fef04
Merge branch 'mkldnn' of https://github.com/zheng-da/incubator-mxnet …
zheng-da Feb 14, 2018
a6dec46
Fix a bug in Jenkins.
zheng-da Feb 14, 2018
3f78c29
Fix Jenkins
zheng-da Feb 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint errors.
  • Loading branch information
zheng-da committed Feb 13, 2018
commit ffdd86027b0d55bb0ed64e7fcbe78073ad1a7266
25 changes: 15 additions & 10 deletions tests/cpp/operator/dropout_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ TEST(DROPOUT_PERF, ExecuteBidirectional) {
kwargs_t kwargs = basic_dropout_args;
kwargs.push_back({"mode", "always"});
test::op::CoreOperatorRunner<float> runner;
runner.RunGenericOperatorForward(false, { shape }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "Dropout", "_backward_Dropout"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "Dropout",
"_backward_Dropout");
runner.RunGenericOperatorForward(false, { shape }, kwargs, 1);
}

/*!
Expand All @@ -55,8 +56,9 @@ TEST(DROPOUT_PERF, TimingCPU) {
kwargs.push_back({"mode", "always"});
TShape shape({10, 10, 10, 10});
test::op::CoreOperatorRunner<float> runner;
runner.RunGenericOperatorForward(false, { shape }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "Dropout", "_backward_Dropout"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "Dropout",
"_backward_Dropout");
runner.RunGenericOperatorForward(false, { shape }, kwargs, 1);
std::vector <TShape> shapes;
if (test::performance_run) {
shapes = {
Expand All @@ -73,8 +75,9 @@ TEST(DROPOUT_PERF, TimingCPU) {
};
}
for (const TShape &shape : shapes) {
runner.TimingTest("Dropout Operator CPU", false, false, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "Dropout", "_backward_Dropout"), 2, 10, { shape }, false);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "Dropout",
"_backward_Dropout");
runner.TimingTest("Dropout Operator CPU", false, false, kwargs, 2, 10, { shape }, false);
}
}

Expand All @@ -88,8 +91,9 @@ TEST(DROPOUT_PERF, TimingGPU) {
kwargs.push_back({"mode", "always"});
TShape shape({10, 10, 10, 10});
test::op::CoreOperatorRunner<float> runner;
runner.RunGenericOperatorForward(true, { shape }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "Dropout", "_backward_Dropout"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "Dropout",
"_backward_Dropout");
runner.RunGenericOperatorForward(true, { shape }, kwargs, 1);
std::vector <TShape> shapes = {
{1, 1, 28, 28},
{1, 3, 28, 28},
Expand All @@ -98,8 +102,9 @@ TEST(DROPOUT_PERF, TimingGPU) {
{20, 3, 128, 128}
};
for (const TShape &shape : shapes) {
runner.TimingTest("Dropout Operator GPU", true, false, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "Dropout", "_backward_Dropout"), 2, 10, { shape }, false);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "Dropout",
"_backward_Dropout");
runner.TimingTest("Dropout Operator GPU", true, false, kwargs, 2, 10, { shape }, false);
}
}
#endif // MXNET_USE_CUDA == 1
27 changes: 17 additions & 10 deletions tests/cpp/operator/fully_conn_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ TEST(FULLY_CONNECTED, ExecuteBidirectionalFullyConnected) {
kwargs_t kwargs = basic_fullyconn_args;
test::op::CoreOperatorRunner<float> runner;
runner.set_verbose(true);
runner.RunGenericOperatorForward(false, { shape1, shape2 }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "FullyConnected", "_backward_FullyConnected"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.RunGenericOperatorForward(false, { shape1, shape2 }, kwargs, 1);
}

/*!
Expand All @@ -57,8 +58,9 @@ TEST(FULLY_CONNECTED, FullyConnectedTimingCPU) {
TShape shape1({10, 10, 10, 10});
TShape shape2({250, 1000});
test::op::CoreOperatorRunner<float> runner;
runner.RunGenericOperatorForward(false, { shape1, shape2 }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "FullyConnected", "_backward_FullyConnected"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.RunGenericOperatorForward(false, { shape1, shape2 }, kwargs, 1);
std::vector <TShape> shapes;
if (test::performance_run) {
shapes = {
Expand All @@ -76,8 +78,10 @@ TEST(FULLY_CONNECTED, FullyConnectedTimingCPU) {
}
for (const TShape& shape : shapes) {
TShape shape2({250, shape.ProdShape(1, shape.ndim())});
runner.TimingTest("Fully connected CPU", false, false, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "FullyConnected", "_backward_FullyConnected"), 2, 10, { shape, shape2 }, false);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.TimingTest("Fully connected CPU", false, false, kwargs, 2, 10,
{ shape, shape2 }, false);
}
}

Expand All @@ -90,8 +94,9 @@ TEST(FULLY_CONNECTED, FullyConnectedTimingGPU) {
TShape shape1({10, 10, 10, 10});
TShape shape2({250, 1000});
test::op::CoreOperatorRunner<float> runner;
runner.RunGenericOperatorForward(true, { shape1, shape2 }, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "FullyConnected", "_backward_FullyConnected"), 1);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.RunGenericOperatorForward(true, { shape1, shape2 }, kwargs, 1);
std::vector <TShape> shapes;
if (test::performance_run) {
shapes = {
Expand All @@ -109,8 +114,10 @@ TEST(FULLY_CONNECTED, FullyConnectedTimingGPU) {
}
for (const TShape& shape : shapes) {
TShape shape2({250, shape.ProdShape(1, shape.ndim())});
runner.TimingTest("Fully connected GPU", true, false, test::op::CoreOpExecutor<float>::ArgsWithOpName(
kwargs, "FullyConnected", "_backward_FullyConnected"), 2, 10, { shape, shape2 }, false);
kwargs = test::op::CoreOpExecutor<float>::ArgsWithOpName(kwargs, "FullyConnected",
"_backward_FullyConnected");
runner.TimingTest("Fully connected GPU", true, false, kwargs, 2, 10,
{ shape, shape2 }, false);
}
}
#endif // MXNET_USE_CUDA == 1