tinygrad icon indicating copy to clipboard operation
tinygrad copied to clipboard

Use local memory in kernels ($1000 bounty)

Open geohot opened this issue 2 years ago • 5 comments

Claim the bounty by implementing this and having tinygrad generate GEMM kernels for NVIDIA that are faster than torch/cuBLAS.

Clean code only, must be merged to claim bounty.

geohot avatar Feb 14 '23 17:02 geohot

Forgive me if I ask rudimentary question. During execution of -> tinygrad/accel/triton/ops_triton.py Error -> ImportError: cannot import name 'ExplicitExecAST' from 'tinygrad.ops' At here (tinygrad/tinygrad/ops.py) I can't find anything 'ExplicitExecAST'. What I am missing?

sytandas avatar May 27 '23 02:05 sytandas

triton isn't supported anymore, you'd have to fix it.

geohot avatar May 27 '23 02:05 geohot

@geohot Can you clarify if the goal is to call cuBLAS from tinygrad (e.g. with cupy) or custom GEMM kernel generation that is faster than cuBLAS? The former seems too straightforward, while the latter seems too complex

arandog avatar May 28 '23 07:05 arandog

custom: tinygrad generate GEMM kernel using local memory, faster than cuBLAS/ pytorch.

sytandas avatar May 28 '23 07:05 sytandas

Changes made in tinygrad/:

------------------------------------------------------------
files                             insertions       deletions
------------------------------------------------------------
tinygrad/ast.py                            6               0
tinygrad/llops/ops_gpu.py                218              31
tinygrad/runtime/cuda.py                   9               6
tinygrad/runtime/metal.py                 43               2
tinygrad/runtime/opencl.py                13               1
tinygrad/shape/__init__.py                 1               1
------------------------------------------------------------
total                                    290              41
------------------------------------------------------------
lines added in the tinygrad folder: 249

tinyb0t avatar Jun 01 '23 14:06 tinyb0t

So stale now.

geohot avatar Jul 31 '23 18:07 geohot