flip IF and RANGE order (#7947)

this is the rest of #7919 prereqs for new block lin
This commit is contained in:
chenyu
2024-11-28 13:35:30 -05:00
committed by GitHub
parent bb23469f93
commit 70f052d2b8
2 changed files with 3 additions and 2 deletions

View File

@@ -155,8 +155,8 @@ class Ops(FastEnum):
# control flow ops
BARRIER = auto()
IF = auto()
RANGE = auto()
IF = auto()
# ops that are not graph nodes
ENDRANGE = auto()

View File

@@ -11,7 +11,8 @@ from tinygrad.codegen.kernel import Kernel
uops_colors = {Ops.LOAD: "#ffc0c0", Ops.PRELOAD: "#ffc0c0", Ops.STORE: "#87CEEB", Ops.CONST: "#e0e0e0", Ops.VCONST: "#e0e0e0",
Ops.DEFINE_GLOBAL: "#ffe0b0", Ops.DEFINE_LOCAL: "#ffe0d0", Ops.DEFINE_ACC: "#f0ffe0", Ops.REDUCE_AXIS: "#FF6B6B",
Ops.RANGE: "#c8a0e0", Ops.ASSIGN: "#e0ffc0", Ops.BARRIER: "#ff8080", Ops.IF: "#c8b0c0", Ops.SPECIAL: "#c0c0ff",
Ops.INDEX: "#e8ffa0", Ops.WMMA: "#efefc0", Ops.VIEW: "#C8F9D4", **{x:"#ffffc0" for x in GroupOp.ALU}, Ops.BUFFER: "#B0BDFF",}
Ops.INDEX: "#e8ffa0", Ops.WMMA: "#efefc0", Ops.VIEW: "#C8F9D4", **{x:"#ffffc0" for x in GroupOp.ALU},
Ops.BLOCK: "#C4A484", Ops.BLOCKEND: "#C4A4A4", Ops.BUFFER: "#B0BDFF",}
# ** API spec