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

fix SoftmaxOutput resource bug #14302

Merged
merged 10 commits into from
Mar 5, 2019
Merged

Conversation

wkcn
Copy link
Member

@wkcn wkcn commented Mar 2, 2019

Description

Fix #14301

It seems that BackwardResource in src/operator/softmax_output-inl.h is not used in SoftmaxOutput since it is not a legacy operator.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Tiny change. 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:https://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

  • Remove BackwardResource in src/operator/softmax_output-inl.h
  • Add ResourceRequest in src/operator/softmax_output.cc
  • Add the testcase for SoftmaxOutput.

Comments

SoftmaxOutput is not a legacy operator, which is registered by NNVM_REGISTER_OP rather than MXNET_REGISTER_OP_PROPERTY, so BackwardResource is not used for it.
Meanwhile, I check all operators. Only SoftmaxOutput has the problem.

@wkcn wkcn changed the title fix SoftmaxOutput resource bug [WIP]fix SoftmaxOutput resource bug Mar 2, 2019
@wkcn wkcn closed this Mar 2, 2019
@wkcn wkcn reopened this Mar 2, 2019
@wkcn wkcn changed the title [WIP]fix SoftmaxOutput resource bug fix SoftmaxOutput resource bug Mar 2, 2019
@wkcn wkcn added the pr-awaiting-review PR is waiting for code review label Mar 2, 2019
@pengzhao-intel
Copy link
Contributor

Thanks for the quick fix :)
@wkcn would you mind adding a test case?

@wkcn
Copy link
Member Author

wkcn commented Mar 2, 2019

@pengzhao-intel I will add the test case for SoftmaxOutput. Thanks!

Edit: I have written the test case : )

@wkcn wkcn changed the title fix SoftmaxOutput resource bug [WIP]fix SoftmaxOutput resource bug Mar 2, 2019
@wkcn wkcn added pr-work-in-progress PR is still work in progress and removed pr-awaiting-review PR is waiting for code review labels Mar 2, 2019
@wkcn wkcn changed the title [WIP]fix SoftmaxOutput resource bug fix SoftmaxOutput resource bug Mar 2, 2019
@wkcn wkcn added pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress labels Mar 2, 2019
@wkcn wkcn merged commit 5065f13 into apache:master Mar 5, 2019
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* fix SoftmaxOutput resource

* remove BackwardResource since SoftmaxOutput is not a legacy op

* add test_SoftmaxOutput_normalization

* igore_label=-1 when use_ignore=False

* retrigger CI

* add multi_output test for SoftmaxOutput

* rename test_SoftmaxOutput_normalization to test_softmax_output_normalization

* retrigger CI

* retrigger CI

* fix test bug
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* fix SoftmaxOutput resource

* remove BackwardResource since SoftmaxOutput is not a legacy op

* add test_SoftmaxOutput_normalization

* igore_label=-1 when use_ignore=False

* retrigger CI

* add multi_output test for SoftmaxOutput

* rename test_SoftmaxOutput_normalization to test_softmax_output_normalization

* retrigger CI

* retrigger CI

* fix test bug
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SoftmaxOutput crashes with normalization "valid"
4 participants