finally, fast convs

This commit is contained in:
George Hotz
2020-10-25 12:39:44 -07:00
parent 0f02084805
commit ef24aac09e
2 changed files with 23 additions and 1 deletions

View File

@@ -32,6 +32,10 @@ def profile_conv(bs, chans, conv, cnt=10):
class TestConvSpeed(unittest.TestCase):
def test_forward_backward_3x3(self):
# warmup
profile_conv(128, 16, 3, cnt=1)
# profile
pr = cProfile.Profile(timer=lambda: int(time.time()*1e9), timeunit=1e-6)
pr.enable()
fpt, bpt = profile_conv(128, 16, 3)