MCPcopy Create free account
hub / github.com/ByteDance-Seed/Triton-distributed / __init__

Method __init__

python/little_kernel/core/expr.py:230–234  ·  view source on GitHub ↗
(self, value: Union[int, float, bool, str], expr_type: LLType)

Source from the content-addressed store, hash-verified

228 """Literal expression (integer, float, boolean constants)"""
229
230 def __init__(self, value: Union[int, float, bool, str], expr_type: LLType):
231 super().__init__(expr_type)
232 assert type(value) in [int, float, bool,
233 str], f"Literal value must be int, float, bool, or str, but got {type(value)}"
234 self.value = value # Literal value
235
236 def __str__(self) -> str:
237 return f"Literal(value={self.value}, type={self.type})"

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected