mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
Update outdated renderer.render calls (#10044)
This commit is contained in:
parent
e055b9422f
commit
5cdc96409e
3 changed files with 5 additions and 5 deletions
2
test/external/external_benchmark_schedule.py
vendored
2
test/external/external_benchmark_schedule.py
vendored
|
|
@ -55,4 +55,4 @@ if __name__ == "__main__":
|
|||
print(sum(len(u) for u in uops))
|
||||
if getenv("SRC", 0):
|
||||
renderer = Device[Device.DEFAULT].renderer
|
||||
for k,u in zip(kernels, uops): print(renderer.render(k.name, u))
|
||||
for k,u in zip(kernels, uops): print(renderer.render(u))
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ class TestUOpGraph(unittest.TestCase):
|
|||
uops = to_uops_list([out])
|
||||
if DEBUG >= 4:
|
||||
from tinygrad import Device
|
||||
print(Device[Device.DEFAULT].renderer.render("test", uops))
|
||||
print(Device[Device.DEFAULT].renderer.render(uops))
|
||||
return uops[-1].src[-1]
|
||||
|
||||
# possible
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ class TestGatedStoreRewrite(unittest.TestCase):
|
|||
val = UOp.const(dtypes.float, 42.0)
|
||||
store = UOp(Ops.STORE, dtypes.void, (idx, val))
|
||||
uops = to_uops_list([store])
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render("test", uops))
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render(uops))
|
||||
if_uop = next(u for u in uops if u.op is Ops.IF)
|
||||
endif = next(u for u in uops if u.op is Ops.ENDIF)
|
||||
assert endif.src[0] is if_uop
|
||||
|
|
@ -270,7 +270,7 @@ class TestGatedStoreRewrite(unittest.TestCase):
|
|||
val = UOp.const(dtypes.float, 42.0)
|
||||
stores = [UOp.store(idx0, val), UOp.store(idx1, val)]
|
||||
uops = to_uops_list(stores)
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render("test", uops))
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render(uops))
|
||||
if_uop = next(u for u in uops if u.op is Ops.IF)
|
||||
endif = next(u for u in uops if u.op is Ops.ENDIF)
|
||||
assert endif.src[0] is if_uop
|
||||
|
|
@ -290,7 +290,7 @@ class TestGatedStoreRewrite(unittest.TestCase):
|
|||
val = UOp.const(dtypes.float, 42.0)
|
||||
stores = [UOp.store(idx0, val), UOp.store(idx1, val)]
|
||||
uops = to_uops_list(stores)
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render("test", uops))
|
||||
if DEBUG >= 4: print(Device[Device.DEFAULT].renderer.render(uops))
|
||||
ifs = [u for u in uops if u.op is Ops.IF]
|
||||
endifs = [u for u in uops if u.op is Ops.ENDIF]
|
||||
self.assertEqual(len(ifs), 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue