mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[dynamo] fix potentially missing _torchdynamo_inline from ScriptFunction (#125447)
Fix https://github.com/pytorch/pytorch/issues/119747 Pull Request resolved: https://github.com/pytorch/pytorch/pull/125447 Approved by: https://github.com/jansel
This commit is contained in:
parent
ad9a27f3e5
commit
bdaa7bbd7d
2 changed files with 1 additions and 0 deletions
|
|
@ -1391,6 +1391,7 @@ def script(
|
|||
_check_directly_compile_overloaded(obj)
|
||||
maybe_already_compiled_fn = _try_get_jit_cached_function(obj)
|
||||
if maybe_already_compiled_fn:
|
||||
maybe_already_compiled_fn._torchdynamo_inline = obj # type: ignore[attr-defined]
|
||||
return maybe_already_compiled_fn
|
||||
ast = get_jit_def(obj, obj.__name__)
|
||||
if _rcb is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue