This repository was archived by the owner on Nov 17, 2023. It is now read-only.
fix a bug in CachedOp.#11675
Merged
eric-haibin-lin merged 5 commits intoapache:masterfrom Jul 21, 2018
Merged
Conversation
marcoabreu
reviewed
Jul 12, 2018
| {'static_alloc': True, 'static_shape': True} ] | ||
| for config in configs: | ||
| layer = TestRNNLayer(cell_type, hidden_size) | ||
| layer.initialize(ctx=mx.cpu(0)) |
Contributor
There was a problem hiding this comment.
Are we sure about hardcoding the context?
szha
reviewed
Jul 14, 2018
| seg = EngineOprSeg{false, nid + 1}; | ||
| seg.opr.reset(CreateEngineOp(default_ctx, seg_execs)); | ||
| seg_execs.clear(); | ||
| seg_start = nid + 1; |
Member
There was a problem hiding this comment.
extract common code outside branch
Contributor
Author
There was a problem hiding this comment.
we can't. the code is used in "if" and "else if". it's not used in "else"
Contributor
Author
|
the PR will be updated after #11566 is merged. |
6f5b965 to
621a6d1
Compare
Contributor
Author
|
@eric-haibin-lin @piiswrong could you please review this PR? |
szha
approved these changes
Jul 20, 2018
Member
|
what's the new test case added for this? |
Contributor
Author
|
It's here. I tested the code in more CachedOp configurations. |
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
* fix a bug. * add tests. * use default context. * move all tests to test_contrib_control_flow.py * fix test.
This file contains hidden or 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
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
After adding kSubgraphExec, some logic in CachedOp is no longer valid. For example, an op executor that requires async execution may not contain output arrays. On the other hand, calling
CreateEngineOpon op executors without output arrays can fail. This PR tries to fix this problem.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.