MCPcopy
hub / github.com/tinygrad/tinygrad / alu

Method alu

tinygrad/tensor.py:159–159  ·  view source on GitHub ↗
(self, op: Ops, *src: Tensor)

Source from the content-addressed store, hash-verified

157
158 # alu and const_like are used by the mixins
159 def alu(self, op: Ops, *src: Tensor) -> Tensor: return self._apply_uop(lambda *u: u[0].alu(op, *u[1:]), *src)
160 def const_like(self, b:ConstType) -> Tensor: return Tensor(self.uop.const_like(b))
161 @staticmethod
162 def const(dtype:DType, b:ConstType|UOp, device:str|tuple[str, ...]|None=None) -> Tensor:

Callers

nothing calls this directly

Calls 1

_apply_uopMethod · 0.95

Tested by

no test coverage detected