Commit Graph

4667 Commits

Author SHA1 Message Date
George Hotz
8919ca8163 test cleanups 2023-03-03 06:36:06 -08:00
George Hotz
3915c89fb6 symbolic improvements (#629)
* fixups

* shorter diff

* wow, okay removing that had side effects

* more numeric tests

* MIN MAX tests
2023-03-02 19:50:38 -08:00
George Hotz
0335cb86b9 refactor comparison. there's a bug in the method cache 2023-03-02 10:10:16 -08:00
George Hotz
11f257ddf9 clean up cmp tests 2023-03-02 09:35:16 -08:00
Diogo
52204a7b88 adding comparison operators (#616)
* Less, LessOrEqual, Greater, GreaterOrEqual, Equal

* lint fix

* using built in functions

* overriding __eq__ breaks things

* backwards pass for less - foward only tests

* one other spot

* removing backwards for comparison ops to match pytorch

* raise runtime error

* more tests for comparison ops

* fixed the lineup

* added number upcast tests
2023-03-02 08:10:44 -08:00
George Hotz
2e26286294 speed like you wouldn't believe (#626)
* speed like you wouldn't believe

* fix tests
2023-03-02 07:49:19 -08:00
George Hotz
fca055bd66 NOOP means contiguous 2023-03-01 21:54:51 -08:00
George Hotz
d062cc82b8 put restrict back 2023-03-01 21:34:45 -08:00
George Hotz
b442e75c7a test speed v torch 2023-03-01 19:50:12 -08:00
George Hotz
bfcec234a2 Refactor ASTs (#622)
* ugh worst branch name

* compiler refactor continues

* scc -> cloc

* buf -> _buf

* finish _buf, and program -> runtime

* gpu is still working, clang isn't

* clang in new style

* ops_metal

* something broke it

* improve metal

* clean up tons of cl crap

* hack fix sync

* cleaner gpu

* gpu metal clang

* cleanups

* minor refactor

* GPUCodegen

* fix up LLVM

* blind CUDA refactor

* codegen / runtime

* keep ops naming

* linter passes

* woah, llvm was allocing 4x what it needed to

* bugfixes

* fix openpilot compiler

* fix compile_efficientnet

* method cache should fix tests

* deal with duped functions
2023-03-01 18:57:29 -08:00
Jacky Lee
5e41d5857c Add tests for randomness (#621)
* Add tests for random creation functions

* It worked on my machine!

* Rename to helper_same_distribution

* Remove extra line

* Add tests for equal distribution

* Test without scipy

* Do a different test for randn
2023-03-01 15:39:20 -08:00
George Hotz
e9e71fbfc4 remove mlop (#619)
* remove mlop

* lil simpler
2023-02-28 17:58:24 -08:00
George Hotz
4c4d88aad4 fix the last bug, and make HLOP the default 2023-02-28 17:04:28 -08:00
George Hotz
17c55f051d fix test symbolic 2023-02-28 16:37:08 -08:00
George Hotz
28f52f7c24 improve symbolic 2023-02-28 16:21:58 -08:00
George Hotz
e21df1701b distribute + refactor merge_views 2023-02-28 14:57:56 -08:00
George Hotz
9d539b8ebb more intuitive output shape from _pool 2023-02-28 11:41:48 -08:00
George Hotz
cfa5a12f13 simplify in shapetracker 2023-02-28 00:35:26 -08:00
George Hotz
8478a61cdb simplify in shapetracker 2023-02-28 00:35:26 -08:00
George Hotz
7b999add1d all onnx model tests pass 2023-02-27 11:22:45 -08:00
George Hotz
643e8b0388 fix tests, test bn evaluate too 2023-02-27 10:39:47 -08:00
George Hotz
2f17d151b3 fix batchnorm not realizing 2023-02-27 10:19:54 -08:00
George Hotz
9aaa7edd74 no rnn support in onnx 2023-02-27 08:25:48 -08:00
George Hotz
edc8fbfff2 woah, why isn't OPT=2 2023-02-27 08:03:31 -08:00
George Hotz
a52913b242 test conv shapetracker has one view 2023-02-27 07:54:47 -08:00
George Hotz
f10ccf7ec1 fix up eye and fix gc test 2023-02-27 06:53:18 -08:00
George Hotz
686a74de92 fast zeros and ones 2023-02-27 06:46:26 -08:00
George Hotz
3a2a500e90 prevent race condition, external yolo test for now 2023-02-26 17:08:24 -08:00
Jacky Lee
0f58c4c648 Cleanup yolo and remove stateless classes (#604)
* Add AvgPool2d as a layer

* Clean up a bit

* Remove stateless layers in yolo_nn

* More cleanup

* Save label for test

* Add test for YOLO

* Test without cv2

* Don't fail if cv2 not installed

* Better import

* Fix image read

* Use opencv :)

* Don't download the file

* Fix errors

* Use same version

* Set higher confidence

* Why is the confidence so low?

* Start over

* Remove stateless layers

* Remove extra lines

* Revert changes

* Save a few more lines
2023-02-26 16:55:21 -08:00
George Hotz
1d01842232 remove fake test 2023-02-25 10:21:07 -08:00
George Hotz
8b96522e1d instant identity removal 2023-02-25 09:46:04 -08:00
voidz
94bec40110 moved extras/jit.py -> tinygrad/jit.py (#599)
* moved extras/jit.py to tinygrad/jit.py

* fixed indent

* removed tinygrad.helpers.DEBUG from jit.py
2023-02-25 08:32:33 -08:00
George Hotz
2c5e13a513 Reluless (#600)
* replace relu for maximum

* fix for other backend

* clean up RELU and GT0

* tests for maximum

* had to clean that up

* why reverse a maximum?
2023-02-25 01:21:16 -08:00
George Hotz
f3386c7f09 improve symbolic, hlop conv output is simple now 2023-02-24 22:20:40 -08:00
George Hotz
f8f026e8bb oversized expand for HLOP convs 2023-02-24 21:48:47 -08:00
George Hotz
2edfe64512 improve shapetracker tests 2023-02-24 21:07:53 -08:00
George Hotz
da5643d024 rest of tests shouid be made to pass 2023-02-24 12:52:23 -08:00
George Hotz
85452fbaf3 onnx 58/109/208 2023-02-24 12:19:05 -08:00
George Hotz
e8a153e4e9 onnx : add a whole bunch of ops 2023-02-24 12:00:03 -08:00
George Hotz
f2486a7248 more onnx ops 2023-02-24 10:55:58 -08:00
George Hotz
4d0a3dd653 openpilot expand is bugged 2023-02-24 10:25:59 -08:00
George Hotz
2e56a4793e rename log_softmax, support dim, fix onnx Softmax 2023-02-24 10:11:24 -08:00
George Hotz
5cdfeffe2c fix shape test 2023-02-24 09:36:32 -08:00
George Hotz
e263c0c628 onnx : another model test is passing 2023-02-24 09:22:58 -08:00
George Hotz
d3feea302d much cleaner way to write onnx ops 2023-02-24 08:46:28 -08:00
George Hotz
f6d946853c more bugfixes 2023-02-24 00:21:29 -08:00
George Hotz
b1b2d8f440 onnx : some op tests working 2023-02-23 23:58:13 -08:00
George Hotz
2d59b25ead onnx backend test : enable only the model tests 2023-02-23 22:36:26 -08:00
George Hotz
5b10dfcab8 onnx tests : 22/175/208 2023-02-23 22:00:16 -08:00
George Hotz
d8b6f241f1 external_test_onnx_backend 2023-02-23 21:55:07 -08:00