Update outdated renderer.render calls (#10044)

This commit is contained in:
quortus 2025-04-26 13:35:19 +02:00 committed by GitHub
commit 5cdc96409e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -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))

View file

@ -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

View file

@ -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)