MCPcopy
hub / github.com/tinygrad/tinygrad / f

Function f

examples/torch_cuda_kernel.py:11–11  ·  view source on GitHub ↗
(tg_out, tg_data)

Source from the content-addressed store, hash-verified

9
10@TinyJit
11def f(tg_out, tg_data): return tg_out.assign(tg_data[:, :, 0] * 0.2989 + tg_data[:, :, 1] * 0.5870 + tg_data[:, :, 2] * 0.1140).realize()
12
13def custom_kernel(data: torch.Tensor, device="CUDA") -> torch.Tensor:
14 assert data.dtype == torch.float32

Callers 4

custom_kernelFunction · 0.70
upsample_backwardFunction · 0.50
_wrap_outFunction · 0.50
nfFunction · 0.50

Calls 2

realizeMethod · 0.80
assignMethod · 0.45

Tested by

no test coverage detected