Commit Graph

1615 Commits

Author SHA1 Message Date
George Hotz
201d9a2d58 remove extra copy on output 2023-03-01 21:19:44 -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
0055f0c2b3 touchups 2023-02-28 20:36:11 -08:00
George Hotz
f4aa3868e3 remove save_for_backward, there's still lines to save in the simplest places 2023-02-28 20:11:05 -08:00
George Hotz
7ff92550bb slice -> pad, shrink 2023-02-28 19:58:12 -08:00
George Hotz
ea3fa07c2a bump tinygrad to 0.5, move reshape logic from mlops 2023-02-28 18:07:03 -08:00
George Hotz
e9e71fbfc4 remove mlop (#619)
* remove mlop

* lil simpler
2023-02-28 17:58:24 -08:00
George Hotz
6b423b675d fix mulacc when both strides are 0 2023-02-28 17:27:52 -08:00
George Hotz
4c4d88aad4 fix the last bug, and make HLOP the default 2023-02-28 17:04:28 -08:00
George Hotz
fde6c2d62b fix image grouping 2023-02-28 16:50:46 -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
1702a5779f remove hacks from can_merge 2023-02-28 15:30:20 -08:00
George Hotz
e21df1701b distribute + refactor merge_views 2023-02-28 14:57:56 -08:00
George Hotz
7e6edfbc64 unbreak onnx conv padding 2023-02-28 13:55:03 -08:00
George Hotz
7d556ca7e0 avg/max pool work in N-D 2023-02-28 13:38:27 -08:00
George Hotz
dcb50a3a9f better hlop image conv 2023-02-28 13:06:58 -08:00
George Hotz
9d539b8ebb more intuitive output shape from _pool 2023-02-28 11:41:48 -08:00
George Hotz
d722ffbd04 _pool2d -> _pool 2023-02-28 11:35:19 -08:00
George Hotz
3c8da6bd03 add typing 2023-02-28 10:54:46 -08:00
George Hotz
922f96e527 DeviceBuffer : shape can be correct type now 2023-02-28 10:08:55 -08:00
George Hotz
a8bbcccc16 debug print shapetrackers 2023-02-28 08:11:40 -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
262f81d795 applegpu everywhere 2023-02-27 22:54:59 -08:00
George Hotz
d584bae5c0 fine, openpilot can have 197 kernels 2023-02-27 11:48:36 -08:00
George Hotz
7b999add1d all onnx model tests pass 2023-02-27 11:22:45 -08:00
George Hotz
652d48ccec onnx : openpilot expand issue was fixed yesterday. remove hack 2023-02-27 11:04:42 -08:00
George Hotz
9d6b63f043 add ConstantOfShape 2023-02-27 10:57:50 -08:00
George Hotz
082134952b CastLike works with one type hack 2023-02-27 10:51:26 -08:00
Jacky Lee
1ffe8d68d5 Add more onnx ops (#615)
* Add Celu

* Add thresholded relu

* Add softsign
2023-02-27 10:43:41 -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
c9252d38b2 mypy cache breaks if you sometimes check untyped defs, no checking tests for now 2023-02-27 09:57:33 -08:00
George Hotz
e74779f19d typing fixup 2023-02-27 09:52:04 -08:00
George Hotz
9aaa7edd74 no rnn support in onnx 2023-02-27 08:25:48 -08:00
Diogo
07e643431c added onnx group norm (#614) 2023-02-27 08:11:01 -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
57aec11736 minor randomness touchup 2023-02-27 07:06:26 -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
Diogo
e68fa18c9b layer norm support in onnx (#607)
* layer norm support

* switched to 1e-05
2023-02-26 22:04:02 -08:00
George Hotz
c4856aa193 fix yolo webcam 2023-02-26 17:24:05 -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
Sohaib
71ae6e5605 fix: avgpool without counting padding (#605) 2023-02-26 07:13:00 -08:00
George Hotz
2b6d8e788d pushing permutes is done 2023-02-25 21:37:46 -08:00