-
Notifications
You must be signed in to change notification settings - Fork 24.9k
[export] inline into torch.jit.traced nn module #155381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh/ydwu4/259/base
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155381
Note: Links to docs will display an error until the docs builds have been completed. ❌ 31 New Failures, 1 Unrelated FailureAs of commit 8986294 with merge base 3f34d26 ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -260,7 +260,6 @@ def make_fake_inputs( | |||
args, | |||
kwargs, | |||
dynamic_shapes, | |||
_is_torch_jit_trace=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice!!
def __init__(self, mod): | ||
self.mod = mod | ||
|
||
script_module._orig_module = Wrapped(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to wrap it?
@@ -1318,6 +1318,7 @@ def register_submods(mod, prefix): | |||
finally: | |||
torch.jit._trace._trace_module_map = old_module_map | |||
|
|||
module.forward._original_forward = mod.forward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should put a comment explaining this change. How does serializing/deserializing work here?
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack (oldest at bottom):
cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel