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

[v1.5.x] [MKLDNN] Independent gradients requests check with respect to weights… #15805

Merged
merged 2 commits into from
Aug 13, 2019

Conversation

juliusshufan
Copy link
Contributor

… and bias of convolution (#15497)

  • Independent req[kBias] and req[kWeight] check

  • Add UT for independent conv gradient requests

  • Update conv independent grad UT with no_bias enabled

  • Check req[kWeight] for avoiding unnecessary prim registration

  • Check OpReqTpye in CommitOutput automatically

  • Lock cudnn autotune for accurate conv output

  • Ignore independent gradients test on GPU

  • Trigger CI

  • Sets a low bar for autotuned cudnn convolution

Description

cherry-picking PR#15497

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@juliusshufan
Copy link
Contributor Author

@zixuanweeei This PR is cherrypicking your commit merged on master branch for v1.5.1, could you please review? Thanks.

@@ -1906,6 +1906,88 @@ def test_depthwise_convolution():
for arr1, arr2 in zip(exe1.outputs + exe1.grad_arrays, exe2.outputs + exe2.grad_arrays):
np.testing.assert_allclose(arr1.asnumpy(), arr2.asnumpy(), rtol=1e-3, atol=1e-3)


@with_seed()
def test_convolution_independent_gradients():
Copy link
Contributor

@zixuanweeei zixuanweeei Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have reported flakiness on this UT and added some notes. Seems the the cherry-picked commit is behind the merged one on master branch. And it looks good on master. Would you mind checking it again? Thanks. https://github.com/apache/incubator-mxnet/blob/57927a932610581a351e4aed4fb7c9209d0e57c2/tests/python/unittest/test_operator.py#L2003-L2006

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for a mistake. The flakiness is fixed by #15631. I think these two should be taken into v1.5.x together.

@juliusshufan juliusshufan force-pushed the v1.5.1_pr15497 branch 2 times, most recently from aafe905 to 1420bc0 Compare August 12, 2019 10:14
@juliusshufan
Copy link
Contributor Author

@zixuanweeei thanks for the information, the one for test case changes also taking, please kindly review.
@TaoLv

… and bias of convolution (apache#15497)

* Independent req[kBias] and req[kWeight] check

* Add UT for independent conv gradient requests

* Update conv independent grad UT with no_bias enabled

* Check req[kWeight] for avoiding unnecessary prim registration

* Check `OpReqTpye` in CommitOutput automatically

* Lock cudnn autotune for accurate conv output

* Ignore independent gradients test on GPU

* Trigger CI

* Sets a low bar for autotuned cudnn convolution
…ients (apache#15631)

* Skip test_convolution_independent_gradirents

* Add an issue link

* Fix inconsistent context of input array and binding op

* Trigger CI

* Retrigger CI
@zixuanweeei
Copy link
Contributor

LGTM. Thanks.

Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TaoLv TaoLv merged commit bb54b2a into apache:v1.5.x Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants