Commit Graph

49 Commits

Author SHA1 Message Date
George Hotz
e822aae9ec reorg opts, nicer graph 2022-07-02 22:29:09 -07:00
George Hotz
7276f8d6bf improve constant folding, detach before moving tensor 2022-07-02 15:29:40 -07:00
George Hotz
07b438aa8b move that to resolve time 2022-07-02 14:26:13 -07:00
George Hotz
dbf4aa09db assert and tuple 2022-06-27 09:19:54 -07:00
George Hotz
37a6c0ef59 create with new ShapeTracker 2022-06-27 09:07:45 -07:00
George Hotz
e55a9833fb a little more readable 2022-06-27 08:54:04 -07:00
George Hotz
3a414d7f50 cleanup, add flops tracking 2022-06-26 22:43:39 -07:00
George Hotz
a699f7cb0b debug cleanups 2022-06-26 21:58:44 -07:00
George Hotz
15a16b98e6 remove get_root 2022-06-26 21:18:02 -07:00
George Hotz
e3c2579537 flip stride to match canonical 2022-06-26 19:19:53 -07:00
George Hotz
49c954b389 comments 2022-06-26 17:20:25 -07:00
George Hotz
8c483fbdc9 maxpool lazy fix 2022-06-26 17:07:03 -07:00
George Hotz
bdde95f16e CACHE_LAZYBUFFERS options + benchmark. only a couple x from torch 2022-06-24 22:33:53 -07:00
George Hotz
3e13e3330a UNSAFE_FLOAT4 env 2022-06-22 08:20:29 -07:00
George Hotz
73415e20ab this fixes 2 of the conv recomputes...but it's ugh 2022-06-22 08:18:12 -07:00
George Hotz
b2d5df6049 3 convs are being recomputed 2022-06-22 07:54:52 -07:00
George Hotz
ba2defcdef elif False 2022-06-21 23:54:09 -07:00
George Hotz
9cb0522574 noargs 2022-06-21 23:48:58 -07:00
George Hotz
1074dfbb71 unstrided 2022-06-21 23:42:21 -07:00
George Hotz
9ae01290ba pass in shorts 2022-06-21 23:33:23 -07:00
George Hotz
18d74c01b1 float4 opt 2022-06-21 21:27:51 -07:00
George Hotz
ff3d5fe962 debugging while we compile 2022-06-21 21:12:04 -07:00
George Hotz
9d06a86f7f CL class, debugging 2022-06-21 20:16:29 -07:00
George Hotz
0b820f7966 FOLD_CONSTANTS_INTO_KERNELS and shapetracker OOB tweak 2022-06-21 19:47:15 -07:00
George Hotz
1ebc2b5545 lazy opencl works 2022-06-21 19:41:08 -07:00
George Hotz
c53c91f949 opencl tests passed (#347) 2022-06-21 18:57:09 -07:00
George Hotz
8fbe2e4aed No ctx in llops (#345)
* remove ctx from gpu ops

* ctx for the others

* this is okay

* mlops are not static. fix lazy

* cl is property, _processing_op is class method

* kernel_name

* contiguous_op
2022-06-21 10:07:49 -07:00
George Hotz
159a2d1a80 Simple Lazy (#340)
* simple lazy

* simple

* fix graph and make realize simpler

* SHUFFLE_MOVEMENT_OPS already works

* MERGE_MOVEMENT_OPS and REMOVE_MOVEMENT_NOPS

* it works, but it's slow

* constant inlining

* cache misses are the reason for loss

* fix non determinism

* cleanup, a few tests fail

* profile

* cache lazyop

* cleanups

* create namedtuple once

* bunch of caches

* it's not deleting

* nograd

* caching allocator

* reduce_op

* fromCPU if you want fromCPU

* complain

* nvidia fix

* realized on Tensor

* numpy is very slow

* no loads in second run

* caching in View

* 10ms speedups on batman

* remove old profiler

* bunch of refactors

* contiguous on view

* elementwise_op_compile for conv

* support ewop after processing op

* this still works

* conv folding works

* all we do is conv conv conv no matter what

* all args to the conv

* still works

* unify conv and ewop

* ops_gpu cleanup

* move around ops_gpu

* remove caching allocator

* remove unused

* find_conv shorten

* gpu refactors

* simpler gpu

* and that

* cmp is fast

* 18ms on mac

* it's a lot of lines, but it's faster

* minor

* tests pass

* LoadOps.CONTIGUOUS

* remove dups

* torch converter doesn't support slice

* move lazy out for merge

* LoadOps are only for lazy
2022-06-20 22:45:11 -07:00
George Hotz
77f5cef8a6 First batch from lazy branch (#332)
* test and helpers from lazy

* lazy pt2
2022-06-18 17:26:59 -07:00
George Hotz
52505faaf4 minor 2022-06-16 15:53:45 -07:00
George Hotz
d5b3e18540 Accelerate with CL (#325)
* accelerated opencl

* it's running, it's just wrong

* bugfix

* model is correct in opencl

* lazy image convert

* add padding support to convolution

* that stuff was all upstreamed

* remove HEAD

* oops

* test_simple_conv2d_4 passes, add dilation support

* put logic in ops_opencl

* fix crash

* hmm, stride seems okay

* padding for batched inputs

* just an issue now with cout%4

* op model still passes

* fix startPackedInputChannel

* pre and post processing ops for graph

* don't break other llops

* shapetrackering

* reshapes are free

* lazy movement ops
2022-06-16 15:40:52 -07:00
Adrian Bakke
8a7bbcc240 Accel/cuda (#319)
* start work

* right a wrong

* mimimal reduce example

* save

* get tests to pass

* fix stupid bug

* tests passing

* out of bounds error fixed, all tests passing

* revert changes to other files

* clean

* getting better, will drink a glass of wine and finish over the weekend

* clean
2022-05-14 21:25:30 -07:00
George Hotz
0e6832a8ea support torch GPU, only autoinit cuda in the buffer 2022-01-15 19:15:12 -08:00
George Hotz
52918fbf78 cuda stub 2022-01-15 19:02:17 -08:00
George Hotz
5efb6653c4 a bit of work on metal 2021-12-30 13:53:08 -05:00
George Hotz
b4839eb6bb factor out binary_broadcast 2021-11-29 03:49:12 -05:00
George Hotz
ca154f8b59 add sub and a few refactors 2021-11-29 03:35:23 -05:00
George Hotz
7b3c442f3b sum in metal 2021-11-29 03:13:41 -05:00
George Hotz
c6fb087695 fix old list behavior 2021-11-29 01:49:21 -05:00
George Hotz
7c160c6cee metal: got relu working and add somewhat working 2021-11-29 01:40:18 -05:00
George Hotz
7d12482d80 refactor efficientnet loading 2021-10-30 17:02:17 -07:00
George Hotz
fc6597a6d9 only resnet18, it's too slow otherwise 2021-10-30 16:48:39 -07:00
George Hotz
c05867dcbb header 2021-10-30 16:41:05 -07:00
George Hotz
e10dc90524 tpu docs 2021-10-30 16:38:19 -07:00
George Hotz
63f50cff45 move back again 2021-10-30 16:13:29 -07:00
George Hotz
3d646272d6 move back 2021-10-30 16:12:12 -07:00
George Hotz
ac8afd24fa refactor accel 2021-10-30 16:10:59 -07:00
Wenjun.Zhang
5402fd7f05 Fix: (#279)
1. python create model not match swift model in ane build folder.
2. fix ane lib path and add a dummy backward function for use_ane.py
can run in examples folder.
2021-08-06 07:58:13 -07:00
George Hotz
0eda3eb421 move ane and fpga to accel folder 2021-06-19 11:26:20 -07:00