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

[MXNET-555] Add subgraph storage type inference to CachedOp #11306

Merged
merged 9 commits into from
Jun 21, 2018

Conversation

eric-haibin-lin
Copy link
Member

@eric-haibin-lin eric-haibin-lin commented Jun 15, 2018

Description

Fix #11206
@zheng-da @piiswrong @reminisce

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

@eric-haibin-lin eric-haibin-lin changed the title [WIP] add subgraph storage type inference to _backward_CachedOp Add subgraph storage type inference to _backward_CachedOp Jun 15, 2018
@eric-haibin-lin eric-haibin-lin changed the title Add subgraph storage type inference to _backward_CachedOp [WIP] Add subgraph storage type inference to _backward_CachedOp Jun 15, 2018
@eric-haibin-lin eric-haibin-lin changed the title [WIP] Add subgraph storage type inference to _backward_CachedOp Add subgraph storage type inference to _backward_CachedOp Jun 15, 2018
@eric-haibin-lin eric-haibin-lin changed the title Add subgraph storage type inference to _backward_CachedOp [MXNET-418] Add subgraph storage type inference to _backward_CachedOp Jun 16, 2018
@eric-haibin-lin eric-haibin-lin changed the title [MXNET-418] Add subgraph storage type inference to _backward_CachedOp Add subgraph storage type inference to _backward_CachedOp Jun 16, 2018
exec::DevMaskVector dev_masks(idx.num_nodes(), dev_mask);

// Full graph storage type inference
CheckAndInferStorageType(&g, std::move(dev_masks), std::move(stypes), false);
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use exec::InferShape(std::move(g))? Is it guaranteed that the inference works in one invocation?

Copy link
Member Author

Choose a reason for hiding this comment

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

i haven't seen cases where storage type inference requires multiple runs since it doesn't use outputs to infer inputs. did you?

Copy link
Contributor

Choose a reason for hiding this comment

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

i don't know. but it's easy to make it work for multiple runs.

@eric-haibin-lin eric-haibin-lin changed the title Add subgraph storage type inference to _backward_CachedOp Add subgraph storage type inference to CachedOp Jun 17, 2018
@eric-haibin-lin eric-haibin-lin changed the title Add subgraph storage type inference to CachedOp [MXNET-555] Add subgraph storage type inference to CachedOp Jun 18, 2018
@piiswrong piiswrong merged commit 7a83a75 into apache:master Jun 21, 2018
@leezu leezu mentioned this pull request Jun 22, 2018
9 tasks
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
…1306)

* copy paste

* pass unit test

* remove lock

* save all inputs and outputs

* add one more test

* update test

* update backward stype inference

* + fwd inference
XinYao1994 pushed a commit to XinYao1994/incubator-mxnet that referenced this pull request Aug 29, 2018
…1306)

* copy paste

* pass unit test

* remove lock

* save all inputs and outputs

* add one more test

* update test

* update backward stype inference

* + fwd inference
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.

Embedding(sparse_grad=True) + hybridization fallback issues
3 participants