Skip to content

[Static Runtime] Make canEnableStaticRuntime examine sub-blocks#87396

Closed
mikeiovine wants to merge 1 commit intopytorch:masterfrom
mikeiovine:export-D40564452
Closed

[Static Runtime] Make canEnableStaticRuntime examine sub-blocks#87396
mikeiovine wants to merge 1 commit intopytorch:masterfrom
mikeiovine:export-D40564452

Conversation

@mikeiovine
Copy link

Summary:
Someone was running into problems where

  1. Static Runtime enablement would fail
  2. We would try to fall back to the JIT interpreter after trying to create StaticModule
  3. The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of canEnableStaticRuntime is to catch issues in the module before Static Runtime messes with it.

With this diff, StaticModule instantiation can be avoided by querying canEnableStaticRuntime and the issue is fixed.

Test Plan: New unit test

Differential Revision: D40564452

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 20, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87396

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 12ca662:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Oct 20, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

mikeiovine pushed a commit to mikeiovine/pytorch that referenced this pull request Oct 20, 2022
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: c40f0fb03c974db476e1d3525b45320cd1aac91e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 20, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

mikeiovine pushed a commit to mikeiovine/pytorch that referenced this pull request Oct 21, 2022
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: f304746c52198d38b2a9a1b48a0f8a0059e654da
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

mikeiovine pushed a commit to mikeiovine/pytorch that referenced this pull request Oct 24, 2022
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: f1111ae4628dc778be063b098d11931e64eb4352
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

mikeiovine pushed a commit to mikeiovine/pytorch that referenced this pull request Oct 25, 2022
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: 4415dd3a67bcc1d3594a97a3c94a3149d5c93401
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

mikeiovine pushed a commit to mikeiovine/pytorch that referenced this pull request Oct 25, 2022
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: 04bf5c2962ef2e97540373e1fb5edfe621df1a89
…rch#87396)

Summary:
Pull Request resolved: pytorch#87396

Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Reviewed By: tenpercent

Differential Revision: D40564452

fbshipit-source-id: 440cb09c0120b8dd8c2b0734c18e741a5963966d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D40564452

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@github-actions
Copy link
Contributor

Hey @mikeiovine.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
…rch#87396)

Summary:
Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Differential Revision: D40564452

Pull Request resolved: pytorch#87396
Approved by: https://github.com/tenpercent
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
…rch#87396)

Summary:
Someone was running into problems where

1) Static Runtime enablement would fail
2) We would try to fall back to the JIT interpreter *after trying to create `StaticModule`*
3) The fallback fails because Static Runtime mangled the graph.

We don't want to prevent Static Runtime from mutating its input due to memory concerns. The intent of `canEnableStaticRuntime` is to catch issues in the module before Static Runtime messes with it.

With this diff, `StaticModule` instantiation can be avoided by querying `canEnableStaticRuntime` and the issue is fixed.

Test Plan: New unit test

Differential Revision: D40564452

Pull Request resolved: pytorch#87396
Approved by: https://github.com/tenpercent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: jit release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants