mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-07 03:00:26 -04:00
apply NOOPT in test_arange complexity (#4774)
with hcopt, arange(2560) uses less ops than arange(256)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import unittest
|
||||
from tinygrad import Tensor, GlobalCounters
|
||||
from tinygrad.helpers import Context
|
||||
|
||||
class TestArange(unittest.TestCase):
|
||||
def _get_flops(self, N):
|
||||
GlobalCounters.reset()
|
||||
Tensor.arange(N).realize()
|
||||
with Context(NOOPT=1):
|
||||
Tensor.arange(N).realize()
|
||||
return GlobalCounters.global_ops
|
||||
|
||||
def test_complexity(self):
|
||||
|
||||
Reference in New Issue
Block a user