[pytorch] remove AutoNonVariableTypeMode guard around forward() call#28399
Closed
ljk53 wants to merge 1 commit intogh/ljk53/66/basefrom
Closed
[pytorch] remove AutoNonVariableTypeMode guard around forward() call#28399ljk53 wants to merge 1 commit intogh/ljk53/66/basefrom
ljk53 wants to merge 1 commit intogh/ljk53/66/basefrom
Conversation
Summary: This is also to address issue #26764 Turns out it's incorrect to wrap the entire forward() call with NonVariableTypeMode guard as some JIT passes has is_variable() check and can be triggered within forward() call, e.g.: jit/passes/constant_propagation.cpp Since now we are toggling NonVariableTypeMode per method/op call, we can remove the guard around forward() now. Test Plan: - With stacked PRs, verified it can load and run previously failed models. [ghstack-poisoned]
This was referenced Oct 22, 2019
ezyang
approved these changes
Oct 22, 2019
Contributor
thiagocrepaldi
pushed a commit
to thiagocrepaldi/pytorch
that referenced
this pull request
Feb 4, 2020
…8399) Summary: Pull Request resolved: pytorch#28399 This is also to address issue pytorch#26764 Turns out it's incorrect to wrap the entire forward() call with NonVariableTypeMode guard as some JIT passes has is_variable() check and can be triggered within forward() call, e.g.: jit/passes/constant_propagation.cpp Since now we are toggling NonVariableTypeMode per method/op call, we can remove the guard around forward() now. Test Plan: - With stacked PRs, verified it can load and run previously failed models. Differential Revision: D18055850 Pulled By: ljk53 fbshipit-source-id: 3074d0ed3c6e05dbfceef6959874e5916aea316c
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stack from ghstack:
Summary:
This is also to address issue #26764
Turns out it's incorrect to wrap the entire forward() call with
NonVariableTypeMode guard as some JIT passes has is_variable() check and
can be triggered within forward() call, e.g.:
jit/passes/constant_propagation.cpp
Since now we are toggling NonVariableTypeMode per method/op call, we can
remove the guard around forward() now.
Test Plan:
Differential Revision: D18055850