Commit Graph

143 Commits

Author SHA1 Message Date
George Hotz 4b9bc1615b
While fusion (#654)
* try this

* readme

* opt comments
2023-03-06 09:13:23 -08:00
George Hotz 066a65dad5 remove tflop number, i'll never update that when it's fast 2023-03-06 08:30:31 -08:00
George Hotz 6e763dc446 matmul example in readme 2023-03-06 08:25:13 -08:00
Patrick Geneva 10d40d3cf2
Expand the inline loop to prevent stack overflow from `_deepwalk` (#638)
* Expand the inline loop to prevent stack overflow

* Explicitly loop
2023-03-04 15:14:17 -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 8902764167 fit nits in compare 2023-03-02 08:15:26 -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 7ff92550bb slice -> pad, shrink 2023-02-28 19:58:12 -08:00
George Hotz a8de233e12
only div, no reciprocal (#601)
* only div, no reciprocal

* remove reciprocal

* fix pad shuffling
2023-02-25 09:35:03 -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 2e56a4793e rename log_softmax, support dim, fix onnx Softmax 2023-02-24 10:11:24 -08:00
George Hotz 82caa2d5b7 MULACC -> FusedOp 2023-02-23 18:17:57 -08:00
George Hotz 758515dcc0
conv2d is an hlop (#589)
* conv2d is an hlop

* shorter conv

* KOPT=-1

* alt imp

* MULACC

* smarter mulacc

* pop conv

* 7x7 -> 5x5

* didn't fix, that's not going to work

* this is faster and matches old behavior

* oh, non lazy just won't work with mulacc

* mulacc in torch

* bool types were creeping in

* optimizer is actually better with hlop conv

* fix pushing permutes issue

* refactor einsum_mulacc

* fix up readme

* update readme

* _image_conv2d

* fix bias addition location

* pushing permutes gets back to 200 kernels

* conv cleanup

* disable hlop conv

* don't hide that in helpers
2023-02-23 17:52:31 -08:00
Liam 09315ef34f
Add tinygrad.org reference in Readme. (#556) 2023-02-14 09:39:00 -08:00
timmermansjoy d56c57b112
adding more robust install method (#532) 2023-02-06 13:12:05 -06:00
Jacky Lee 54c68defc7
Replace SIGN with GT0 (#511)
* Replace sign with gt0

* Replace sign with gt0

* GT0 works on GPU

* Fix brackets

---------

Co-authored-by: Tom Finet <tom.codeninja@gmail.com>
2023-02-01 11:01:39 -08:00
George Hotz 259c48f235 discord image is invite link 2023-01-28 11:42:11 -08:00
George Hotz d748000ada tinygrad discord 2023-01-28 11:36:15 -08:00
George Hotz 6d7658db12 delete opencl <celebration> 2023-01-24 14:18:35 -08:00
Faisal Memon 538b1d7f5b
Print out the tensor using numpy(). (#454)
This commit resolves issue https://github.com/geohot/tinygrad/issues/453

In the example code in the README.md, when it is run, it prints for Tiny
Grad the tensors as:
<Tensor <LB (3, 3) op:MovementOps.RESHAPE> with grad None>
<Tensor <LB (1, 3) op:MovementOps.RESHAPE> with grad None>

But to be equivalent to the output of the Torch example, we need
to use numpy() to get it to show:
[[ 2.  2.  2.]
 [ 0.  0.  0.]
 [-2. -2. -2.]]
[[1. 1. 1.]]
2023-01-09 10:08:05 -08:00
Nicolai Stoianov 8dbf76268d
Add step for setting up Stable Diffusion (#452) 2023-01-07 08:40:12 -08:00
George Hotz 0994705166 contrib more 2022-11-08 19:14:37 -08:00
George Hotz c0bba9649a more that 2022-11-08 19:13:11 -08:00
George Hotz 5143da6a9f contributing 2022-11-08 19:12:12 -08:00
George Hotz 271446e3eb
set requires_grad to None (#387)
* set requires_grad to None

* some things need gradients

* hmm, why was get_parameters filtering
2022-09-21 11:16:02 -04:00
George Hotz 0516359af8 fix stupid OPENCL=1 OOM 2022-09-06 14:29:23 -07:00
George Hotz 682dc64430 works at work 2022-09-06 08:06:11 -07:00
George Hotz 0ba6179de7 stable diffusion in readme 2022-09-05 18:51:56 -07:00
George Hotz b132de677d
tinygrad.nn (#367)
* tinygrad.nn

* flake8

* working on pylint

* more pylint

* more pylint

* pylint passes

* networkx

* mypy can't infer that type

* junk
2022-08-18 07:41:00 -07:00
George Hotz bdfdbc8f8d broken amfi patch 2022-08-13 10:41:25 +02:00
George Hotz 01de17eeb8 amfi note 2022-08-08 13:17:36 +02:00
George Hotz 3c4565fa21 SLICE -> PAD,SHRINK 2022-07-17 11:33:59 -07:00
George Hotz f6ea7c022a Revert "EXPAND -> REPEAT"
This reverts commit 115d2eadf5.
2022-07-17 08:42:10 -07:00
George Hotz 115d2eadf5 EXPAND -> REPEAT 2022-07-17 08:38:54 -07:00
George Hotz df16b455a7
make lazy the default (#352)
* make lazy the default

* always float32

* while the lazy framework should be default, lazyness itself shouldn't be (for now)

* bugfixes

* remove the need for the ops class

* fxn_for_op

* hmm, my contiguous asserts went away

* move small shape thing

* refactor reduce

* remove the weird unused new functions

* only that install works

* thats broken

* unused imports, should be good if it passes
2022-07-03 11:40:27 -07:00
George Hotz a11deb5150 shapetracker check for noop 2022-06-16 16:29:18 -07:00
George Hotz ff648e9510 remove convt and compute dx with conv 2022-06-15 19:54:15 -07:00
George Hotz 6d98366214 move CONVDW out of llops 2022-06-15 12:05:11 -07:00
George Hotz e057ca23bb add flip 2022-06-14 17:28:43 -07:00
George Hotz dcbca4fdf1
Expand Operator (#327)
* replace broadcasting with expand

* Tensor, not self

* remove broadcasting from mlops

* delete useless A operator

* expand, not repeat

* remove A op

* expand on gpu

* binary_op doesn't broadcast anymore

* expand is still total junk, but the tests should pass
2022-06-12 12:31:48 -07:00
George Hotz fc7eabb86f processing op 2022-06-11 08:12:02 -07:00
George Hotz 72186ebd5a movement ops, reshape is a copy now 2022-06-10 20:01:47 -07:00
George Hotz c8bacd0d8e rename transpose to permute 2022-06-10 19:41:50 -07:00
George Hotz 462f1ce0da
Remove Matmul (#323) 2022-06-10 19:26:23 -07:00
George Hotz 30ab2249eb match order 2022-06-08 11:46:51 -07:00
George Hotz 4a9882d495 hlops 2022-06-08 11:46:09 -07:00
George Hotz e046a2fd9f readme fix typos 2022-06-08 11:43:05 -07:00
George Hotz 4b09ca90a1 readme: still WIP 2022-06-08 11:41:19 -07:00
George Hotz f0fe37bd34 simpler graph demo 2022-06-05 12:40:12 -07:00
George Hotz 89acf6742d more graph docs 2022-06-05 12:16:50 -07:00