This commit is contained in:
George Hotz
2025-10-29 18:45:16 +08:00
parent 154ddd98fd
commit 6853da2a2f
2 changed files with 4 additions and 4 deletions

View File

@@ -32,8 +32,8 @@ class TestBigDoubleMatmul(unittest.TestCase):
outs += (Opt(OptOps.TC, 0, (0, 0, 1, 0)),)
outs += (Opt(OptOps.UPCAST, 0, 4),)
outs += (Opt(OptOps.UPCAST, 1, 4),)
outs += (Opt(OptOps.UNROLL, 0, 4),)
outs += (Opt(OptOps.UNROLL, 1, 4),)
outs += (Opt(OptOps.UNROLL, 0, 2),)
outs += (Opt(OptOps.UNROLL, 1, 2),)
self._test(outs)
@unittest.skipIf(isinstance(Device[Device.DEFAULT].renderer, (NIRRenderer, PTXRenderer, CUDARenderer)), "broken in LVP and PTX")

View File

@@ -16,10 +16,10 @@ def linearize(u:UOp) -> list[UOp]:
in_degree[u] = len(u.src)
# put loads in the beginning of the block and prevent priority inversion. hack for BARRIER grouping too
priority = [0] + [priorities[x] for x in consumers[u]]
if u.op is Ops.LOAD: priority.append(-1000)
if u.op is Ops.LOAD: priority.append(-5000)
if u.op is Ops.BARRIER: priority.append(-1500)
# ranges are scheduled as late as possible so anything that can be outside is
# if u.op is Ops.RANGE: priority = [2000]
if u.op is Ops.RANGE: priority = [2000]
if u.op is Ops.END: priority = [-1000]
# move defines and consts to the top
if u.op in {Ops.DEFINE_GLOBAL, Ops.DEFINE_LOCAL, Ops.DEFINE_REG, Ops.DEFINE_VAR, Ops.SPECIAL, Ops.CONST}: priority.append(-2000)