Skip to content

[jit] Remove stray @script#34938

Closed
driazati wants to merge 4 commits intodriazati/lazyscriptfrom
driazati/lazy3
Closed

[jit] Remove stray @script#34938
driazati wants to merge 4 commits intodriazati/lazyscriptfrom
driazati/lazy3

Conversation

@driazati
Copy link
Contributor

@driazati driazati commented Mar 18, 2020

Stacked PRs

Differential Revision: D20569793

facebook-github-bot pushed a commit that referenced this pull request Mar 24, 2020
Summary:
Stacked PRs
 * #34938 - [jit] Remove stray `script`
 * **#34935 - [jit] Add lazy script decorator**

Some users maintain libraries of code that is largely trace-able but not
script-able. However, some functions may need to be `torch.jit.script`ed if
they contain control flow so the tracer will use the compiler version.
This however impacts library start up time as in #33418, so this PR adds
a workaround in the form of a `torch.jit._lazy_script_while_tracing`
that will only initialize the compiler if the function is called while
actually tracing.

Pull Request resolved: #34935

Pulled By: driazati

Differential Revision: D20569778

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

@driazati merged this pull request in b7e4dd1.

@facebook-github-bot facebook-github-bot deleted the driazati/lazy3 branch July 13, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants