MCPcopy
hub / github.com/tinygrad/tinygrad / call

Method call

tinygrad/tensor.py:210–212  ·  view source on GitHub ↗
(self, *lst:Tensor, fxn:Tensor|UOp, grad_fxn:Callable|None=None)

Source from the content-addressed store, hash-verified

208 param = UOp.param(slot, self.dtype, self.shape, self.device)
209 return Tensor(param)
210 def call(self, *lst:Tensor, fxn:Tensor|UOp, grad_fxn:Callable|None=None) -> Tensor:
211 fret = (fxn.uop if isinstance(fxn, Tensor) else fxn).call(*[t.uop for t in (self,)+lst], grad_fxn=grad_fxn)
212 return Tensor(fret.gettuple(0))
213
214 def custom_kernel(self, *lst:Tensor, fxn:Callable, grad_fxn:Callable|None=None) -> list[Tensor]:
215 """

Callers

nothing calls this directly

Calls 2

TensorClass · 0.85
gettupleMethod · 0.80

Tested by

no test coverage detected