This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-498] Test MKLDNN backward operators #11232
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azai91
force-pushed
the
test/backwards-mkldnn
branch
13 times, most recently
from
June 18, 2018 16:54
60e1d0b
to
28a7931
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 18, 2018 18:50
3173f71
to
528e515
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 18, 2018 20:06
5542745
to
09164ac
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
2 times, most recently
from
June 18, 2018 21:46
73d7357
to
bb941ae
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 18, 2018 22:01
bb941ae
to
dbe80b0
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 18, 2018 22:11
042857b
to
b009a74
Compare
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 18, 2018 23:04
b32c6e1
to
bfc729e
Compare
zheng-da
reviewed
Jun 20, 2018
@@ -93,40 +93,26 @@ TEST(MKLDNN_UTIL_FUNC, MemFormat) { | |||
|
|||
// Init arrays with the default layout. | |||
static void InitDefaultArray(NDArray *arr, bool is_rand = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you decide to remove this Init function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to have two inits. We can just have one that covers negative and positives.
tests/cpp/operator/mkldnn.cc
Outdated
std::vector<OpReqType> req(1); | ||
std::vector<DispatchMode> dispatches = attrs.dispatches; | ||
|
||
TEST(MKLDNN_BASE, MKLDNNSum) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you move this test back to the end of the file? It's kind of hard for me to tell what you changed in the test.
azai91
force-pushed
the
test/backwards-mkldnn
branch
from
June 20, 2018 06:30
22ff293
to
6085cce
Compare
zheng-da
approved these changes
Jun 20, 2018
zheng-da
pushed a commit
to zheng-da/incubator-mxnet
that referenced
this pull request
Jun 28, 2018
* add act backwards test * use only verifyfn template * fix param name * update number of inputs * fix assertion for act backwards * limit rand num range * change to assert * wait to read on correct vector * add writeinplace test * fix params * add copy backwards test * add missing fixture * fix lint * add sum backwards verify * use correct num of inputs for sum backwards * switch input / output * wait for both outputs * limit input/output * limit input/outputs for relu/sum * fix var source * reorder backwards if view * add another entry to reqs in ttest * uncomment write in place sumbackwards * refactor testunary and testbinary into testop * remove special testbackwardsop and use testop * fill reqs vector with num of outputs * change req size to num outputs * create mulitple output ndarrays * wait for all outputs * remove unused comments * remove redundant VerifyCopyResult method * remove redundant VerifySumResult * remove unused var * use only InitDefaultArray * move MKLDNNSum near copy test * use fallback compute for backwards sum * fix verifydefmem test * fix lint * move MKLDNNSum test back to bottom
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
* add act backwards test * use only verifyfn template * fix param name * update number of inputs * fix assertion for act backwards * limit rand num range * change to assert * wait to read on correct vector * add writeinplace test * fix params * add copy backwards test * add missing fixture * fix lint * add sum backwards verify * use correct num of inputs for sum backwards * switch input / output * wait for both outputs * limit input/output * limit input/outputs for relu/sum * fix var source * reorder backwards if view * add another entry to reqs in ttest * uncomment write in place sumbackwards * refactor testunary and testbinary into testop * remove special testbackwardsop and use testop * fill reqs vector with num of outputs * change req size to num outputs * create mulitple output ndarrays * wait for all outputs * remove unused comments * remove redundant VerifyCopyResult method * remove redundant VerifySumResult * remove unused var * use only InitDefaultArray * move MKLDNNSum near copy test * use fallback compute for backwards sum * fix verifydefmem test * fix lint * move MKLDNNSum test back to bottom
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
add backwards C++ unit tests for mkldnn operators
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments