forked from tinygrad/tinygrad
stack is fine
This commit is contained in:
@@ -251,9 +251,9 @@ class TestLinearizer(unittest.TestCase):
|
||||
for u in uops:
|
||||
if u.op is Ops.STORE and u.src[0].addrspace is AddrSpace.REG:
|
||||
if uops.index(u) < begin_range:
|
||||
assert u.src[1].op is Ops.CONST
|
||||
assert u.src[1].op is Ops.CONST or (u.src[1].op is Ops.STACK and all(x.op is Ops.CONST for x in u.src[1].src))
|
||||
else:
|
||||
assert u.src[1].op in GroupOp.ALU
|
||||
assert u.src[1].op is Ops.CONST or (u.src[1].op is Ops.STACK and all(x.op in GroupOp.ALU for x in u.src[1].src))
|
||||
assert begin_range < uops.index(u) < end_range
|
||||
# children of END are placed after ENDRANGE
|
||||
if any(x.op is Ops.END and x.src[1].op in GroupOp.ALU for x in u.src):
|
||||
|
||||
Reference in New Issue
Block a user