Skip to content

[jit] always use the closure to resolve variable names#27571

Closed
zdevito wants to merge 2 commits intogh/zdevito/122/basefrom
gh/zdevito/122/head
Closed

[jit] always use the closure to resolve variable names#27571
zdevito wants to merge 2 commits intogh/zdevito/122/basefrom
gh/zdevito/122/head

Conversation

@zdevito
Copy link
Contributor

@zdevito zdevito commented Oct 8, 2019

Stack from ghstack:

Resoving variable names using the local activation frames does not work
when using recursive scripting, but our current code tries to do it
(incorrectly) anyway. The reason it works is only because the script
call is in the same local frame as the definition. This will not be
true in practice and makes it seem like the API works in more cases
than it really does. This forces us to always use closure-based annotations,
documents it, and it fixes the tests so that they still pass.

Differential Revision: D17818871

Resoving variable names using the local activation frames does not work
when using recursive scripting, but our current code tries to do it
(incorrectly) anyway. The reason it works is only because the script
call is in the same local frame as the definition. This will not be
true in practice and makes it seem like the API works in more cases
than it really does. This forces us to always use closure-based annotations,
documents it, and it fixes the tests so that they still pass.
[jit] always use the closure to resolve variable names

Resoving variable names using the local activation frames does not work
when using recursive scripting, but our current code tries to do it
(incorrectly) anyway. The reason it works is only because the script
call is in the same local frame as the definition. This will not be
true in practice and makes it seem like the API works in more cases
than it really does. This forces us to always use closure-based annotations,
documents it, and it fixes the tests so that they still pass.

gh-metadata: pytorch pytorch 27571 gh/zdevito/122/head
@zdevito
Copy link
Contributor Author

zdevito commented Oct 8, 2019

accidental diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: pybind Related to our Python bindings / interactions with other Python libraries oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants