linearizer! (#714)

* linearizer outputs something

* working ish

* cstyle codegen

* clang mostly works

* fix load valid

* fix numberless loop

* fancy gen

* working

* fix enet compiler

* cleanups

* float4 upcasting

* less lines

* supports_float4

* constant folding

* mulacc

* internet tests flaky in CI

* 90% image support

* fix image generic

* bugs exposed with shapetracker and single view

* new llvm

* use vload, remove OLD

* that's really poorly done

* ending up being more lines
This commit is contained in:
George Hotz
2023-03-19 23:43:49 -07:00
committed by GitHub
parent b629fd4cd8
commit 5495c7d64e
20 changed files with 792 additions and 776 deletions

View File

@@ -3,7 +3,7 @@ from tinygrad.helpers import prod, IMAGE, ImageDType, getenv, dtypes
from tinygrad.lazy import get_single_root
FLOAT16 = getenv("FLOAT16", 0)
base_image_type = (100, 2, "image_half", np.float16) if FLOAT16 else (100, 4, "image_float", np.float32)
base_image_type = (100, 2, "imageh", np.float16) if FLOAT16 else (100, 4, "imagef", np.float32)
def image_dot(self, w):
# NOTE: we use a 1x1 conv2d to do the matmul. mxk @ kxn = (1,k,m,1).conv2d(n,k,1,1)