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

Class BinOp

python/little_kernel/core/expr.py:388–401  ·  view source on GitHub ↗

Binary operation expression (e.g., a + b, a && b)

Source from the content-addressed store, hash-verified

386
387
388class BinOp(Expr):
389 """Binary operation expression (e.g., a + b, a && b)"""
390
391 def __init__(self, op: BinOpKind, left: Expr, right: Expr, expr_type: LLType):
392 super().__init__(expr_type)
393 self.op = op # Operator kind
394 self.left = left # Left operand
395 self.right = right # Right operand
396
397 def __str__(self) -> str:
398 return f"BinOp(op={self.op}, left={self.left}, right={self.right}, type={self.type})"
399
400 def __repr__(self) -> str:
401 return f"({self.type}({repr(self.left)} {bin_op_kind_str(self.op)} {repr(self.right)}))"
402
403
404# Tensor Access

Callers 15

setUpMethod · 0.90
test_initializationMethod · 0.90
test_reprMethod · 0.90
__add__Method · 0.85
__sub__Method · 0.85
__mul__Method · 0.85
__truediv__Method · 0.85
__mod__Method · 0.85
__and__Method · 0.85
__or__Method · 0.85

Calls

no outgoing calls

Tested by 5

setUpMethod · 0.72
test_initializationMethod · 0.72
test_reprMethod · 0.72