resnet50 hand coded optimization (#1945)

* resnet50 hand coded opt

* hand optimize one kernel

* opt in both places to fix test
This commit is contained in:
George Hotz
2023-09-29 09:34:51 -07:00
committed by GitHub
parent a677a1e2cd
commit 90326dbdc3
5 changed files with 90 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
import tinygrad.nn as nn
from tinygrad.tensor import Tensor
from extra.utils import get_child
class BasicBlock:
@@ -114,7 +115,7 @@ class ResNet:
return out
return features
def __call__(self, x):
def __call__(self, x:Tensor) -> Tensor:
return self.forward(x)
def load_from_pretrained(self):