Commit Graph
13471 Commits
Author SHA1 Message Date
George HotzandGitHub f7291f6ca3 fixes big KOPT, breaks opencl (#505)
* fixes big KOPT, breaks opencl

* fix optimizer

* KernelCache

* oops, broke batchnorm

* hack to fix it

* fix llvm, less hacky gpu

* disable the cache

* cache just breaks things
2023-02-05 10:46:17 -08:00
Martin LoretzandGitHub 97f0a82be7 Cache pip packages in github actions (#522)
* Cache pip dependencies in github actions

* Add setup.py as cache-dependency-path

* Test caching

* Test caching

* Upgrade setup python action

* Test caching

* Remove setup.py from cache-dependency-path

* Don't remove cache-dependency-path

* Don't cache linter package's

* Test caching

* Test caching

* Test caching

* Upgrade actions/checkout to v3
2023-02-03 20:04:20 -08:00
Martin LoretzandGitHub 4ad67b4bbc Refactor triton buffer to use CLBuffer of cuda runtime (#524)
* Refactor triton buffer to use CLBuffer of runtime

* Fix opencl GT0
2023-02-03 20:02:41 -08:00
Jacky LeeandGitHub ad4f6aa2cf Add test for quick_gelu (#526)
* Add test for quick_gelu

* Bump PyTorch version for approximate
2023-02-03 20:01:39 -08:00
James RobertsandGitHub db0a9b0a2d Refactor CL.time_sum into GlobalCounters (#519) 2023-02-01 20:13:56 -08:00
Martin LoretzandGitHub 45e847d284 Update triton to work in master (#517)
* Update triton to work in master

* Move mem_estimate out of runner
2023-02-01 12:58:14 -08:00
geohot 5e37f084db stable diffusion: clean up constant folding 2023-02-01 12:53:16 -08:00
geohot 175c38d1b3 triton: it already was GT0 2023-02-01 12:00:33 -08:00
Jacky LeeandGitHub 486f023e81 Rename Normalize and move to nn (#513)
* Rename Normalize and move to nn

* Match PyTorch for dim>1
2023-02-01 11:55:03 -08:00
cd97b036cc A Triton backend for tinygrad (#470)
* triton can add

* print stuff from triton

* write out file

* ops triton working

* reduce ops

* sort of works

* Triton bugfixes & implementation of remaining ops (#490)

* padding

* support pow, max, relu, gt0

* allocate return buffer

* Fix reduce

* Add tests for power op

* Fix triton illegal memory accesses and memory leak (#512)

* Fix mypy issue

* Add triton to setup.py

* Replace torch with pycuda

* Use one cuda stream for data transfer and kernels

* Remove triton submodule

* Fix memory leak by using weakrefs for caching

* Fix memory access by adding valid as mask for load

* Fix invalid kernel launches by flattening the grid (#515)

---------

Co-authored-by: Martin Loretz <[email protected]>
2023-02-01 11:53:57 -08:00
geohot 4e24002bbe no generic exceptions 2023-02-01 11:14:37 -08:00
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 <[email protected]>
2023-02-01 11:01:39 -08:00
Jacky LeeandGitHub 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
geohot d91b6711ea oops, broke BN 2023-01-31 08:18:48 -08:00
geohot 21f2af08d5 getenv + graphing 2023-01-30 19:15:03 -08:00
Jacky LeeandGitHub 491e78d203 Add symbolic tests for correctness (#494)
* [WIP] Add symbolic tests for correctness

* Fix typo

* Fix expected value for test_and_fold

* Add more tests for symbolic

* It is indeed right

* Clean up

* Check all strings

* Put TODO back
2023-01-30 18:40:16 -08:00
geohot 60ccddb58b reenable SWAP 2023-01-30 17:32:02 -08:00
geohot c1a769b68b fix bug in gpu copy out 2023-01-30 16:51:28 -08:00
geohot e87410c531 fix multiple accumulators 2023-01-30 16:22:26 -08:00
geohot aea55eb196 found failing upcast 2023-01-30 16:12:56 -08:00
geohot b67f997864 tests pass w/o float4 2023-01-30 15:40:49 -08:00
geohot c6f570a2e6 improve progress bar 2023-01-30 14:50:28 -08:00
Kevin GilpinandGitHub 4685c9c095 Big changes (#498)
Use make_pair
2023-01-30 14:42:22 -08:00
geohot 7118602c97 goat progress bar 2023-01-30 14:37:26 -08:00
geohot 7ee0d99c70 CLCACHE 2023-01-30 14:02:06 -08:00
geohot 7457f0d755 KOPT=2 2023-01-30 13:28:06 -08:00
geohot cccfea4b25 factor out KOPT code 2023-01-30 13:13:55 -08:00
geohot de2c419fd4 make_pair and first attempt at hlb_cifar10 2023-01-30 11:07:23 -08:00
AllentDanandGitHub 7b6b1f32b1 [Fix] fix typo: test_mnist -> datasets (#492)
* test_mnist -> datasets

* fix mnist_gan
2023-01-29 21:30:47 -08:00
George HotzandGitHub 2db272c7f7 Kernel Optimizer (#489)
* kernel optimizer

* 10x faster, but wrong. not good deal

* move test -> extra

* print x speedup

* clcache

* fix clcache + DEBUG

* GFLOPS estimate

* i==3
2023-01-29 17:15:00 -08:00
Martin LoretzandGitHub 43abbd3d00 Use force_create to allocate return buffer (#491) 2023-01-29 17:13:10 -08:00
geohot bb0cdc2442 111.51x speedup for reduce 2023-01-29 03:06:00 -08:00
geohot 45c0aa6e2d search with SHIFT, REDUCE 2023-01-29 02:42:20 -08:00
geohot 87879cf4b6 improve search more 2023-01-29 02:08:57 -08:00
geohot f6bbd43cb8 improve search 2023-01-29 01:33:47 -08:00
geohot ebdec2b72f fix optimizer 2023-01-29 00:23:06 -08:00
geohot a9cabce791 oops, broke mem estimates 2023-01-28 20:21:31 -08:00
geohot a500e79bd1 don't OPTWG on OS X, it's way slower 2023-01-28 20:02:33 -08:00
geohot b0df4d99a0 os x profiling: this ratio is exact i believe 2023-01-28 19:02:51 -08:00
geohot c0963b723e should fix tests 2023-01-28 15:13:03 -08:00
geohot b134a4f3d1 don't upcast already upcasted 2023-01-28 14:58:28 -08:00
geohot 2f194aadad loop unrolling upcast 2023-01-28 14:51:24 -08:00
geohot 381f3e92da fix prints, add third conv 2023-01-28 14:10:27 -08:00
geohot 92001a06e1 openpilot/go.sh 2023-01-28 13:57:43 -08:00
geohot aea29f8a6e fix CUDA reduce 2023-01-28 13:38:58 -08:00
geohot 0f34c24aeb move expr_idxs to shapetracker 2023-01-28 12:25:05 -08:00
geohot f2e81f7208 line reduction and cleanups 2023-01-28 12:17:40 -08:00
geohot 03dd1201dc local buffer implied 2023-01-28 12:06:28 -08:00
George HotzandGitHub b3e4e678e8 Use ShapeTracker for tracking shapes in kernels (#485)
* local is a normal buffer

* remove extra shapes and strides

* fix opt

* fix llvm
2023-01-28 11:56:32 -08:00
geohot 259c48f235 discord image is invite link 2023-01-28 11:42:11 -08:00