mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE][Easy] enable postponed annotations in torchgen
(#129376)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129376 Approved by: https://github.com/ezyang ghstack dependencies: #129375
This commit is contained in:
committed by
PyTorch MergeBot
parent
59eb2897f1
commit
494057d6d4
@ -1,6 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import threading
|
||||
from contextlib import contextmanager
|
||||
from typing import Iterator, Optional
|
||||
from typing import Iterator
|
||||
|
||||
|
||||
# Simple dynamic scoping implementation. The name "parametrize" comes
|
||||
@ -17,8 +19,8 @@ from typing import Iterator, Optional
|
||||
|
||||
|
||||
class Locals(threading.local):
|
||||
use_const_ref_for_mutable_tensors: Optional[bool] = None
|
||||
use_ilistref_for_tensor_lists: Optional[bool] = None
|
||||
use_const_ref_for_mutable_tensors: bool | None = None
|
||||
use_ilistref_for_tensor_lists: bool | None = None
|
||||
|
||||
|
||||
_locals = Locals()
|
||||
|
Reference in New Issue
Block a user