mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Add None return type to init -- functorch and torchgen (#132351)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132351 Approved by: https://github.com/jamesjwu ghstack dependencies: #132335
This commit is contained in:
parent
72d2dba992
commit
a6985c09cb
5 changed files with 5 additions and 5 deletions
|
|
@ -383,7 +383,7 @@ _orig_getitem = torch.Tensor.__getitem__
|
|||
|
||||
|
||||
class dim_tracker:
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.dims = llist()
|
||||
self.count = []
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ def run(mod, input):
|
|||
|
||||
|
||||
class Foo(nn.Module):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.param = nn.Parameter(torch.randn(1))
|
||||
self.register_buffer("buf", torch.randn(1))
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ mpl.use("Agg")
|
|||
|
||||
|
||||
class ThreeLayerNet(nn.Module):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.fc1 = nn.Linear(1, 40)
|
||||
self.relu1 = nn.ReLU()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from torch._inductor.fx_passes.pad_mm import pad_mm_operations
|
|||
|
||||
|
||||
class AHTrainPadMM(AHTrain):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
def add_new_features(self, results):
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class AHTrain:
|
|||
torch/_inductor/autoheuristic/artifacts/ directory.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.parser = argparse.ArgumentParser()
|
||||
self.add_base_arguments()
|
||||
self.args = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue