Skip to content

[jit] bake constants into the traced graph, get rid of getNestedValueTrace#21046

Closed
wanchaol wants to merge 6 commits into
gh/wanchaol/13/basefrom
gh/wanchaol/13/head
Closed

[jit] bake constants into the traced graph, get rid of getNestedValueTrace#21046
wanchaol wants to merge 6 commits into
gh/wanchaol/13/basefrom
gh/wanchaol/13/head

Conversation

@wanchaol

@wanchaol wanchaol commented May 28, 2019

Copy link
Copy Markdown
Collaborator

Stack from ghstack:

When tracing a script function, we will stop the tracing state and try to inline the scripted graph, but if the scripted function contains non tensor types, we will fail to trace them as they are not generated by any previous ops or any constants.

This PR helps generate the constants when the tracing call try to inline the script function.

This should fix #21009

Differential Revision: D15530991

@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 28, 2019
…NestedValueTrace"

[jit] bake constants into the traced graph, get rid of getNestedValueTrace

gh-metadata: pytorch pytorch 21046 gh/wanchaol/13/head
@wanchaol wanchaol requested review from driazati, eellison, suo and zdevito May 28, 2019 23:55
…rid of getNestedValueTrace"

[jit] bake constants into the traced graph, get rid of getNestedValueTrace

gh-metadata: pytorch pytorch 21046 gh/wanchaol/13/head
@eellison

Copy link
Copy Markdown
Contributor

Why does is this stacked with the other PRs?

@wanchaol

wanchaol commented May 29, 2019

Copy link
Copy Markdown
Collaborator Author

Why does is this stacked with the other PRs?

@eellison it has no relation with the bottom PRs, it's just that I was lazy at creating a new branch for it lol... I can move it to a separate branch if you prefer :)

@zdevito zdevito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, but needs to have error handling and a test for the error handline.

Comment thread torch/csrc/jit/tracer.cpp
…NestedValueTrace"

[jit] bake constants into the traced graph, get rid of getNestedValueTrace

gh-metadata: pytorch pytorch 21046 gh/wanchaol/13/head
@wanchaol wanchaol requested a review from zdevito June 1, 2019 06:08
Comment thread torch/csrc/jit/tracer.cpp Outdated
wanchaol added 2 commits June 3, 2019 15:31
…id of getNestedValueTrace"

[jit] bake constants into the traced graph, get rid of getNestedValueTrace

gh-metadata: pytorch pytorch 21046 gh/wanchaol/13/head
…NestedValueTrace"

[jit] bake constants into the traced graph, get rid of getNestedValueTrace

gh-metadata: pytorch pytorch 21046 gh/wanchaol/13/head
@wanchaol wanchaol requested a review from zdevito June 4, 2019 01:15
@zou3519 zou3519 deleted the gh/wanchaol/13/head branch June 4, 2019 04:50
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@wanchaol merged this pull request in 113a27e.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…ytorch#21046)

Summary:
Pull Request resolved: pytorch#21046
ghimport-source-id: 5cb3efb

Differential Revision: D15530991

Pulled By: wanchaol

fbshipit-source-id: b096ca5a1cdce496742b7f7e1de3ef8d21e9a8b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants