Commit Graph

1286 Commits

Author SHA1 Message Date
George Hotz
baf64c14ac cleanups, simple padding in the processing op 2023-01-25 07:37:52 -08:00
George Hotz
3acf62d489 cleanups for IMAGE=2 conv 2023-01-25 07:18:34 -08:00
George Hotz
6d7658db12 delete opencl <celebration> 2023-01-24 14:18:35 -08:00
George Hotz
e313c8af20 update openpilot tests from OPENCL to GPU 2023-01-24 14:05:20 -08:00
George Hotz
2e1d47b166 there's a bug in scc for empty string 2023-01-24 12:06:06 -08:00
George Hotz
e9c293361b fix typo 2023-01-24 12:03:58 -08:00
Comma Device
9e2af0a972 too far with the OPTWG 2023-01-24 13:14:59 -06:00
Comma Device
3590848b93 a little more local workgroup options 2023-01-24 12:50:27 -06:00
Comma Device
4b74752c42 fix hotspots by improving the workgroup optimizer 2023-01-24 12:46:28 -06:00
George Hotz
fd760a390a fix incremental time 2023-01-24 10:19:04 -08:00
George Hotz
7a369b856b nope, no default NATIVE_EXPLOG 2023-01-24 10:01:52 -08:00
George Hotz
78fedc13d1 native_explog is default 2023-01-24 08:09:43 -08:00
George Hotz
5d350d4883 the ast test is actually a test now 2023-01-24 07:53:24 -08:00
George Hotz
7a159b9b04 tinygrad got big...make it tiny again 2023-01-23 21:33:56 -08:00
George Hotz
6286ace4f1 does this work yet (#471) 2023-01-23 20:36:17 -08:00
George Hotz
c22554f44a floats for nvidia 2023-01-23 16:36:10 -08:00
George Hotz
6fe9edf30f torch cuda is very fast 2023-01-23 16:24:46 -08:00
George Hotz
a949de873b reduce 2.0 (#469)
* reduce 2.0

* works

* hacks

* DEBUG=3 for shapes

* fix types

* 0s weren't being folded

* cleaner

* last_reduce is no longer needed

* comments and cleanup
2023-01-23 15:11:13 -08:00
George Hotz
a6de94b444 test partial sum 2023-01-22 21:28:40 -08:00
George Hotz
f1196984e6 harmless to intertwine the math and the stores 2023-01-21 09:31:56 -08:00
George Hotz
708215d06b Typing (#468)
* we typing

* types look good in theory

* most tests pass

* gpu tests pass

* TEST_AST

* delete comments

* i must have written that bug so many times

* bugfix

* don't merge the small ones

* add f to constants

* commits from reduce

* don't GCD the mod nodes

* broken and a hack IMAGE=3

* group for reduce

* fix linter + mypy

* move out test ast

* insource TENSOR_TYPE_TO_NP_TYPE

* does this fix it?

* move imports out
2023-01-21 09:09:22 -08:00
George Hotz
b29614592a first conv/second conv 2023-01-19 13:26:11 -08:00
George Hotz
3d697577b2 print_ast 2023-01-19 13:22:03 -08:00
George Hotz
325a440cb5 pass in op_estimate in opencl 2023-01-19 11:02:23 -08:00
George Hotz
844c645834 add flops for processing op 2023-01-19 10:58:44 -08:00
George Hotz
0881d504c1 move shapetracker (#466)
* move shapetracker

* shapetracker test

* move ast

* move a few things

* fix print kernel

* fix test

* symbolic fixups
2023-01-19 09:56:31 -08:00
George Hotz
2b47ee401f Symbolic for indexes (#464)
* indexer

* works

* all use indexer

* boolean in the indexer too

* symbolic is a better name than indexer

* better symbolic API

* min and max

* symbolic tests

* work

* more tests

* fix demodder

* __str__ in the superclass

* NumNode

* awesome that works

* still works

* fix up parens

* fix zeroviews

* dead lines

* expr_node

* works

* still works

* refactor to not use __new__ methods

* ugh something went wrong a while ago

* this fixes it

* mod and div at the end

* test

* symbolic

* working

* one linter issue fixed

* other division

* more simplifys

* works

* validhacks

* VALIDHACKS passes thneed

* no str replace stuff

* inline indexes

* NATIVE_EXPLOG and factoring

* factor both ways

* cl indexing

* split on mod, not just full

* onnxlimit

* fix output shape

* op_estimate is a function of the program

* no ones in the index

* four_float4

* ALLOW_4FLOAT4

* test passes

* compute then store

* loads first

* bugfix

* better, but doesn't match

* select xb in smart way

* new test and bugfix

* no change to lazy

* Node fixes linter

* fix opencl with op_estimate

* fix mypy

* revert valid

* remove unused
2023-01-19 07:21:30 -08:00
George Hotz
3a3400e3a2 more from indexer 2023-01-18 18:11:51 -08:00
George Hotz
9245f4650a indexer changes for master 2023-01-18 18:02:02 -08:00
George Hotz
15d04f13ce expr_idxs 2023-01-15 10:41:59 -08:00
George Hotz
70b771a175 idx idy 2023-01-15 09:39:22 -08:00
George Hotz
7ea89779fa add returns between views 2023-01-15 08:58:10 -08:00
George Hotz
287699c32c simplify ones after axis splitting 2023-01-14 10:51:43 -08:00
George Hotz
1b5def5b9d flip image x/y to match OPENCL 2023-01-12 17:45:37 -08:00
George Hotz
49c6e6d472 Latest attempt to add image (#462)
* add image

* load + store + boring stuff:

* image tests pass

* thneed print GFLOPS

* op conv test

* more debugging

* hack for multiview image

* shapetracker creates less views

* disable image tests

* working better

* ugh, lkey not key

* print in DEBUG, and allow views

* works

* simple padding conv2d

* use index for image

* that was bad code

* debug print

* fix types

* less lines

* save lines
2023-01-12 17:36:30 -08:00
George Hotz
698143aebc shapetracker creates less views 2023-01-12 14:04:04 -08:00
George Hotz
281b0db773 three from image 2023-01-12 12:26:58 -08:00
George Hotz
7824ba256e no fake contiguous 2023-01-11 21:27:53 -08:00
George Hotz
795285ce43 actually fix early alloc 2023-01-11 21:12:50 -08:00
George Hotz
0724fd61f1 fix early alloc 2023-01-11 21:07:27 -08:00
George Hotz
f1378b3ea1 fix linter and force allocation on hostbuf 2023-01-11 21:04:21 -08:00
George Hotz
3ea38cac72 IMAGE == 1, add reshape to the ast 2023-01-11 20:56:03 -08:00
George Hotz
9ff6c532eb Prereqs for IMAGE=1 (#461)
* contig

* move ast, debug prog

* add Token

* cleanup reduce

* exec_ast
2023-01-11 20:18:42 -08:00
George Hotz
74fb772e2a rawcpu is junk, replace with llvm 2023-01-10 19:18:45 -08:00
George Hotz
fff1f046b0 Simple version of the new GPU backend (#458)
* newgpu

* more to delete

* hmm, tests pass with constant folding

* fix lint/type

* fix constant folding

* comment and rerun tests

* lazy touchups

* fix graph_batchnorm test

* smaller transformer to fix OOM

* Revert "smaller transformer to fix OOM"

This reverts commit a44ef8edc2.

* no func cache

* introspect

* touchups

* CLASTKernel

* ugh, it was lru_cache

* codegen

* spacing

* old gpu still in opencl

* typing fix
2023-01-10 19:16:02 -08:00
George Hotz
66123c99b9 gpubuffer repr match llvmbuffer 2023-01-09 20:02:22 -08:00
George Hotz
0a7d2b1a2e fix kernel_cnt type 2023-01-09 19:34:57 -08:00
George Hotz
4356683081 gpu: rename kernels 2023-01-09 19:32:22 -08:00
George Hotz
1e1abb450e fromcpu 2023-01-09 19:18:57 -08:00
George Hotz
90121482fa oops, don't assign self 2023-01-09 18:02:12 -08:00