PYLITERAL has dtypes.void (#17705)

also deleted Ops.WIAT, it currently does not have entry in dtype_from_uop
This commit is contained in:
chenyu
2026-08-24 14:37:15 -04:00
committed by GitHub
parent 9b481a4893
commit 7b21ffac00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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