Commit Graph

23 Commits

Author SHA1 Message Date
George Hotz d87a246439
move to new cached fetch (#2493)
* move to new cached fetch

* extra.utils is over

* loads

* bump download cache

* bump timeout
2023-11-28 17:36:55 -08:00
George Hotz 0cbf6c1811
move things, clean up extra (#2292)
* move things

* idk why pylint needs that now

* delete unused
2023-11-13 20:18:40 -08:00
Yixiang Gao 8d6662a741
.cpu().numpy() -> .numpy() (#1594)
* .cpu().numpy() -> .numpy()

* restore ops_torch

* restore test_speed_v_torch
2023-08-21 09:53:29 -07:00
Kirill 7944cfdadc
Remove Tensor.data (#565) 2023-02-18 16:36:12 -08:00
Jacky Lee f08187526f
Fix examples (#540)
* Fix examples

* Remove training in parameters

* Simplify a bit

* Remove extra import

* Fix linter errors

* factor out Device

* NumPy-like semantics for Tensor.__getitem__ (#506)

* Rewrote Tensor.__getitem__ to fix negative indices and add support for np.newaxis/None

* Fixed pad2d

* mypy doesn't know about mlops methods

* normal python behavior for out-of-bounds slicing

* type: ignore

* inlined idxfix

* added comment for __getitem__

* Better comments, better tests, and fixed bug in np.newaxis

* update cpu and torch to hold buffers (#542)

* update cpu and torch to hold buffers

* save lines, and probably faster

* Mypy fun (#541)

* mypy fun

* things are just faster

* running fast

* mypy is fast

* compile.sh

* no gpu hack

* refactor ops_cpu and ops_torch to not subclass

* make weak buffer work

* tensor works

* fix test failing

* cpu/torch cleanups

* no or operator on dict in python 3.8

* that was junk

* fix warnings

* comment and touchup

* dyn add of math ops

* refactor ops_cpu and ops_torch to not share code

* nn/optim.py compiles now

* Reorder imports

* call mkdir only if directory doesn't exist

---------

Co-authored-by: George Hotz <geohot@gmail.com>
Co-authored-by: Mitchell Goff <mitchellgoffpc@gmail.com>
Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2023-02-10 12:09:37 -06:00
Jacky Lee 799b3f185a
Refactor getenv into helpers (#508)
* Refactor getenv into helpers

* Remove unused os

* Fix default value

* Fix more defaults for CI

* Fix bracket

* Revert changes to openpilot/compile.py

* Use getenv from helpers when possible
2023-01-31 15:09:09 -08:00
George Hotz c0c2c0b041 support larger ViT models 2021-12-12 10:45:10 -08:00
George Hotz 4b7c31b5b7 break vit into it's own file 2021-11-30 11:19:22 -05:00
George Hotz 835869974c clean up vit code 2021-11-30 10:58:03 -05:00
George Hotz 535f02cc64 use sequential 2021-11-30 00:25:39 -05:00
George Hotz de938c2d9d vit is now tested 2021-11-30 00:23:06 -05:00
George Hotz aff810e722 unify transformer block 2021-11-29 18:58:15 -05:00
George Hotz 58ed46963e fix broadcastdot 2021-11-29 18:54:57 -05:00
George Hotz 125e74293f promote layernorm to tensor op 2021-11-29 18:08:21 -05:00
George Hotz dca076dbf1 remove dumb nn ops 2021-11-29 18:05:31 -05:00
George Hotz 70544e7e9f sum hook override 2021-11-29 17:14:24 -05:00
George Hotz 8097b8f7d6 vit works 2021-11-29 16:28:14 -05:00
George Hotz 7c07c5efdd plz fix vit 2021-11-29 15:45:19 -05:00
George Hotz ca160504e1 affine is always the last dim 2021-11-29 15:22:49 -05:00
George Hotz e86f7a4aa3 deterministic 2021-11-29 15:10:15 -05:00
George Hotz f909ab194f gelu with broken test 2021-11-29 15:00:50 -05:00
George Hotz 9ce881f88c fix bug in getitem, drop int axis 2021-11-29 14:01:24 -05:00
George Hotz 99b6051467 add ff_dim to transformer 2021-11-29 12:40:52 -05:00