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

[MXNET-1315] Add checks for dynamic-shaped operators in CachedOp #14018

Merged
merged 7 commits into from
Feb 14, 2019

Conversation

junrushao
Copy link
Member

Description

This PR is part of the effort that enables dynamic while loop. #13419

CC: @szha @zheng-da

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: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

  • Added the field is_dynamic in CachedOp for upstream control flow operators to create a dynamic operators.
  • Allow infer shape to determine whether a graph contains unknown nodes.

Comments

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

@vandanavk
Copy link
Contributor

@mxnet-label-bot add [pr-awaiting-review, Operator]

@marcoabreu marcoabreu added Operator pr-awaiting-review PR is waiting for code review labels Feb 4, 2019
@junrushao
Copy link
Member Author

@szha Hi, just passed the CI. Could you help review this PR?

@junrushao
Copy link
Member Author

@zheng-da Hi could you help review this PR?

@@ -222,8 +222,12 @@ void LoopState::Forward(int iter_no,
// If an input and an output share the array, the output array will be changed
// by CachedOp. We need to copy data to the real output.
for (size_t i = 0; i < out_bufs.size(); i++)
if (!out_bufs[i].IsSame(coutputs[i]))
if (!out_bufs[i].IsSame(coutputs[i])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add comments to explain this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

@junrushao
Copy link
Member Author

Should be good to merge once CI passes

@junrushao
Copy link
Member Author

@zheng-da Finally get CI passed. Could you help merge this PR? Thanks!

@zheng-da zheng-da merged commit df5310b into apache:master Feb 14, 2019
stephenrawls pushed a commit to stephenrawls/incubator-mxnet that referenced this pull request Feb 16, 2019
…che#14018)

* Initial commit

* Try this

* Boy next door!

* Add comments per discussion with Da

* Try this

* boy try this

* change the boss of the gym
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 19, 2019
…che#14018)

* Initial commit

* Try this

* Boy next door!

* Add comments per discussion with Da

* Try this

* boy try this

* change the boss of the gym
drivanov pushed a commit to drivanov/incubator-mxnet that referenced this pull request Mar 4, 2019
…che#14018)

* Initial commit

* Try this

* Boy next door!

* Add comments per discussion with Da

* Try this

* boy try this

* change the boss of the gym
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
…che#14018)

* Initial commit

* Try this

* Boy next door!

* Add comments per discussion with Da

* Try this

* boy try this

* change the boss of the gym
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
…che#14018)

* Initial commit

* Try this

* Boy next door!

* Add comments per discussion with Da

* Try this

* boy try this

* change the boss of the gym
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Operator pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants