Commit Graph

159 Commits

Author SHA1 Message Date
Hey 4f72eb823c
Outdated repository URL (#1218)
* Update outdated repo url

* Update more outdated repo url's
2023-07-11 23:14:19 -07:00
兰天游 0222ee7bd2
feat: fix shell alias on readme (#1022)
* feat: fix shell alias on readme

* feat: edit the install command
2023-06-23 00:00:34 -07:00
George Hotz 18892242b0
global -> group (#1007)
* global -> group

* allow None for local_size in custom function

* lil local

* comment on shape

* fix cuda

* smart local cast

* better local heuristic

* fix ptx, and work_dim cleanup

* fix metal

* fix ops test

* fix openpilot jit

* no more optlocal

* might fix metal tests

* try metal now

* see generated metal code

* test free removal. REVERT THIS

* mergable
2023-06-21 11:50:43 -07:00
George Hotz 76ab379f9b readme updates 2023-06-05 12:20:14 -07:00
kposborne2 00360da05b
Update broken `docs/abstractions.py` for changed ops, and add to CI (#930)
* fix and add to ci

* still have those

* ocd

* update other doc
2023-06-04 19:21:20 -07:00
George Hotz 3e0b37f050 randn slow 2023-06-04 08:52:13 -07:00
wozeparrot e9c1ae3825
Add a quick start guide (#900)
* feat: initial quick start guide

* fix: fix link

* feat: add note about jit

* feat: add note about load/store ops

* feat: add link to discord

* feat: add note about saving and loading models

* fix: correct code for saving and loading

* feat: overhaul docs

* fix: fix link

* feat: wording

* feat: add link to discord

* feat: contributing guidelines

* feat: make contributing section more doc focused

* feat: add link to env_vars from readme

* fix: wording

* feat: move community to bottom

* feat: showcase

* feat: linebreak

* feat: redesigned header

* feat: tweaks

* feat: tweaks

* feat: badge for lines of code

* feat: move installation instructions to repo readme

* feat: readme overhaul number 2

* feat: move visualization to quick start guide

* feat: readme 2 electric boogaloo

* fix: grammar

* fix: formatting

* feat: no ugly line

* feat: add line back

* feat: new load method

* feat: split adding accelerator docs out

* feat: showcase whisper

* feat: smaller tweaks

* feat: bring back oneliner
2023-06-04 08:51:20 -07:00
George Hotz eea3542975 remove other install method 2023-05-28 08:36:21 -07:00
George Hotz 803587b8b4 update readme 2023-05-26 06:11:05 +00:00
Benedikt 3c465470f2
pip installation one liner (#793) 2023-05-25 16:43:42 -07:00
George Hotz 133521e730 relu UnaryOp is back 2023-04-14 07:12:53 -07:00
Jacky Lee 7a45b989a1
Device: make GPU default and METAL/CUDA if possible (#732)
* Make GPU the default device

* Compile EfficientNet with CPU

* don't print device

* use METAL and CUDA if possible

* Revert some changes to workflow

* Fix import error when checking device availability

* device lookup is now optional

* hopefully fix linter and tests

* fix workflow

* Skip device if not available

* don't change default if CPU=1

* simplify device selection

* Default to CPU if no GPU

* don't print device name...

* No need to change default in llama

* Make GPU the default device

* Compile EfficientNet with CPU

* don't print device

* use METAL and CUDA if possible

* Revert some changes to workflow

* Fix import error when checking device availability

* device lookup is now optional

* hopefully fix linter and tests

* fix workflow

* Skip device if not available

* don't change default if CPU=1

* simplify device selection

* Default to CPU if no GPU

* don't print device name...

* No need to change default in llama

* run github workflow

* Fix logic to select default

* pass if an error occurs

* use separate function for try except
2023-04-04 09:41:52 +05:30
George Hotz 30b795874a remove RMSprop, nobody uses it anymore 2023-03-20 12:31:34 -07:00
George Hotz 902906f909
Fix constant folding (#713)
* fix

* codegen

* contiguous is real

* no bufs_to_delete

* don't assign rawconst

* remove neg and not

* need exec to fix custom function jit
2023-03-18 17:52:46 -07:00
Connor Henderson 5e8fdfa956
Update path for test_mnist in README (#706) 2023-03-15 18:42:17 -07:00
George Hotz 0b03216cc3
losing lines (#678)
* losing lines

* FLIP -> STRIDE

* shapetracker refactor
2023-03-10 21:57:05 -08:00
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