[BE][Easy] enable postponed annotations in tools (#129375)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375
Approved by: https://github.com/malfet
This commit is contained in:
Xuehai Pan
2024-06-29 12:48:06 +08:00
committed by PyTorch MergeBot
parent 58f346c874
commit 8a67daf283
123 changed files with 1274 additions and 1053 deletions

View File

@ -5,6 +5,7 @@ import sys
import traceback
import warnings
MIN_CUDA_VERSION = "11.6"
MIN_ROCM_VERSION = "5.4"
MIN_PYTHON_VERSION = (3, 8)
@ -141,7 +142,7 @@ def check_rocm():
return rocm_ver if torch.version.hip else "None"
def check_dynamo(backend, device, err_msg):
def check_dynamo(backend, device, err_msg) -> None:
import torch
if device == "cuda" and not torch.cuda.is_available():
@ -203,7 +204,7 @@ _SANITY_CHECK_ARGS = (
)
def main():
def main() -> None:
python_ver = check_python()
torch_ver = check_torch()
cuda_ver = check_cuda()