remove allow-untyped-defs from torch/backends/cusparselt/__init__.py (#157232)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157232
Approved by: https://github.com/jingsh
ghstack dependencies: #157231
This commit is contained in:
Bob Ren 2025-07-01 14:24:24 -07:00 committed by PyTorch MergeBot
parent 9d8cf24b3b
commit e38a335d7f

View File

@ -1,4 +1,3 @@
# mypy: allow-untyped-defs
from typing import Optional
import torch
@ -20,7 +19,7 @@ __MAX_ALG_ID: Optional[int] = None
if _cusparselt is not None:
def _init():
def _init() -> bool:
global __cusparselt_version
global __MAX_ALG_ID
if __cusparselt_version is None:
@ -35,7 +34,7 @@ if _cusparselt is not None:
else:
def _init():
def _init() -> bool:
return False