diff --git a/tinygrad/uop/__init__.py b/tinygrad/uop/__init__.py index d3a516e32a..39b73f3a80 100644 --- a/tinygrad/uop/__init__.py +++ b/tinygrad/uop/__init__.py @@ -73,7 +73,7 @@ class Ops(FastEnum): # ** 5 -- control flow / consts / custom ** # control flow ops - BARRIER = auto(); RANGE = auto(); IF = auto(); END = auto(); ENDIF = auto(); WAIT = auto() + BARRIER = auto(); RANGE = auto(); IF = auto(); END = auto(); ENDIF = auto() # const. CONST = auto() diff --git a/tinygrad/uop/ops.py b/tinygrad/uop/ops.py index ae40f94eb2..4ad771539d 100644 --- a/tinygrad/uop/ops.py +++ b/tinygrad/uop/ops.py @@ -116,13 +116,13 @@ def dtype_from_uop(op:Ops, src:tuple[UOp,...], arg:Any) -> DType|None: match op: case Ops.STORE | Ops.LINEAR | Ops.SINK | Ops.PROGRAM | Ops.SOURCE | \ Ops.END | Ops.BARRIER | Ops.GROUP | Ops.IF | Ops.ENDIF | \ - Ops.TUPLE | Ops.FUNCTION | Ops.CUSTOM_FUNCTION | Ops.REWRITE_ERROR: + Ops.TUPLE | Ops.FUNCTION | Ops.CUSTOM_FUNCTION | Ops.REWRITE_ERROR | Ops.PYLITERAL: # always void return dtypes.void case Ops.CALL: # a CALL of an opaque body is void, a CALL of an address can return a value return dtypes.void if src[0].dtype is dtypes.void else None - case Ops.CUSTOM | Ops.CUSTOMI | Ops.PYLITERAL: + case Ops.CUSTOM | Ops.CUSTOMI: return None case Ops.INS: return None