Joe Donovan
fa549d198d
Remove type: ignore comments ( #2533 )
...
* remove some type ignore comments and fix errors
* remove unnecessary get_args import
* revert triton changes
* remove changes not in tinygrad
2023-11-30 22:15:55 -08:00
George Hotz
12fa846122
zero copy ( #2531 )
...
* zero copy
* zero copy test
* loads coder in milliseconds
* zero copy for cpu and torch
* src_from_buffer is None
* SLOW_METAL_COPY there
2023-11-30 18:38:41 -08:00
Matthias Kronberg
5394a05b9d
Fix: Get item from ndarray before casting to int ( #2525 )
...
Directly casting is deprecated and will error in the future.
2023-11-30 18:34:31 -08:00
George Hotz
2c363b5f0b
new style device ( #2530 )
...
* cpu tests pass
* torch works
* works
* metal works
* fix ops_disk
* metal jit works
* fix openpilot
* llvm and clang work
* fix webgpu
* docs are rly broken
* LRU works on metal
* delete comment
* revert name to ._buf. LRU only on Compiled
* changes
* allocator
* allocator, getting closer
* lru alloc
* LRUAllocator
* all pass
* metal
* cuda
* test examples
* linearizer
* test fixes
* fix custom + clean realize
* fix hip
* skip tests
* fix tests
* fix size=0
* fix MOCKHIP
* fix thneed
* copy better
* simple
* old style metal copy
* fix thneed
* np reshape
* give cuda a device
2023-11-30 17:07:16 -08:00
chenyu
e56511b59a
more type annotation for tensor and lazy ( #2528 )
...
* more type annotation for tensor and lazy
* don't need that
2023-11-30 17:50:22 -05:00
Davi Silva
ddeec24fa8
Cleanup & fix llama.py ( #2524 )
...
* docs, cleanup crap
* comma AI
* fix 70B
* this is why lexical scope exists
2023-11-30 16:00:17 -05:00
chenyu
7d26452305
call ruff with --preview ( #2522 )
...
some checks are ignored without --preview
2023-11-30 13:59:00 -05:00
chenyu
5db0cdfbd3
support list of ints (or other Tensorable) in tensor indices ( #2520 )
...
* support list of ints (or other Tensorable) in tensor indices
* enable some index test cases
2023-11-30 12:46:33 -05:00
chenyu
bd941a0df1
first version of test_indexing ( #2515 )
...
* first version of test_indexing
* move to test/imported
2023-11-30 00:03:59 -05:00
chenyu
d210f6a786
minor device.py cleanups ( #2510 )
2023-11-29 18:16:25 -05:00
qazal
370cfbb957
Cleanup vectorized hip renders ( #2497 )
...
* add typedefs and make_dtypen functions
use ext_vector_type for half16 kernels
* remove the old test_render because we just use whatever cstyle has
* align vectors
2023-11-29 14:02:12 -08:00
George Hotz
abfc99187d
cleanup realize ( #2505 )
...
* delete reallocs
* cleaner
* that's real
* less lines
2023-11-29 11:38:38 -08:00
George Hotz
3dedeaae74
rebalance tests ( #2504 )
...
* rebalance
* balance
* parallel apt-get for all
* .local/lib/python3.11/site-packages
* what is user doing
* is that path right
* Update test.yml
* okay where are you
* site-packages
2023-11-29 11:18:22 -08:00
George Hotz
065aff747e
make webgpu test reliable ( #2502 )
...
* remove retry that doesn't work
* fix cleanup
* process exit in cleanup
* add space
2023-11-29 10:02:24 -08:00
George Hotz
6707f2588e
use copyin ( #2500 )
...
* it's always copyin
* all RawBuffer are RawBufferCopyIn
* cleanups
* this fixes it
* requirements='C'
* more correct
2023-11-29 09:34:00 -08:00
George Hotz
947711a532
split metal and webgpu tests ( #2501 )
2023-11-29 09:32:09 -08:00
chenyu
3eb3c74675
metal ci tests everything ( #2499 )
...
* metal ci tests everything
* pretty good
* METAL
2023-11-29 12:04:37 -05:00
George Hotz
889acefe85
Support weird loads in Image ( #2498 )
...
* image support weird loads
* umm, that was always wrong
* openpilot compile fails with a weird error
* image test passes
* we have valids now
* clean that up
* no more required opts
* add fastvits test, fix bug
* minor cleanups
2023-11-29 08:30:46 -08:00
George Hotz
e333672675
realize cleanup ( #2496 )
...
* move that logic
* revert that change
* clean up transfer and asserts
* what's that junk
2023-11-28 21:08:39 -08:00
George Hotz
5629fc368c
Use Buffer.STORE at the end of ASTs ( #2494 )
...
* work
* store broken
* interpreteds work
* this passes
* symbolic cpu
* fix tests
* fix opt tests
* images fail
* fix InterpretedFlopCounter
* stupid hack for images
2023-11-28 20:11:37 -08:00
Liam
cf0c9096a9
Removing METAL Skips as CI works ( #2488 )
...
* Test metal CI
* remove metal and CI restrictions
* enable dtype tests for metal ci
2023-11-28 19:46:59 -08:00
Jake
5588922884
Update cuda_matmul.py ( #2495 )
2023-11-28 19:46:01 -08:00
George Hotz
cdc3b95729
if you don't appreciate a 15 second timeout, you get a 10 second timeout
2023-11-28 17:44:09 -08:00
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
ab5d14d4ba
MEM -> LOAD ( #2492 )
...
* MEM -> LOAD
* keep legacy working
2023-11-28 16:46:37 -08:00
chenyu
a739c6646e
fp16 in gpt2 attention ( #2491 )
...
* fp16 in gpt2 attention
* HALF
2023-11-28 19:27:03 -05:00
chenyu
847f0a02b1
non-simplifiable mod should result in ModNode ( #2490 )
...
* non-simplifiable mod should result in ModNode
* space
2023-11-28 16:52:19 -05:00
George Hotz
3f137b134a
jax parallel matmul example
2023-11-28 13:48:11 -08:00
mmmkkaaayy
ddb6a33ae5
improve test assertions for jit cache len with graph executor ( #2476 )
...
* improve test assertions for jit cache len with graph executor
* delete newline
* unused import
* another unused import
2023-11-27 23:02:45 -08:00
chenyu
28a67106ca
enable symbolic ops tests for hip ( #2485 )
2023-11-27 22:33:41 -08:00
Christopher Mauri Milan
7f01dd04f0
Apply ruff linting rules to tests ( #2473 )
...
* everything except F821
* enable F821 with noqa
* dumb fix
* fix remaining imports and (former) lambdas
* replace _ with noqa to avoid gc
2023-11-27 21:24:06 -08:00
Davi Silva
136dbd8b36
HIP CI that compiles (to RDNA3) but doesn't have to run ( #2482 )
...
* hip amd compilation
* gate the test properly
* cleanup unused import
* remove superfluous numpy conversion
* add SpeedyNet tests (f32 [passes] & f16 [fails])
* make CI verbose (error log from hip compiler)
* test the real ops_hip
* Merge branch 'tinygrad:master' into ci/hip-compilation
* fix CI
* cleanup
* really fix CI
* Fix CI Three: the refixening
---------
Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com >
2023-11-27 21:17:06 -08:00
George Hotz
756b01f46f
why were these ever called buffer ( #2483 )
2023-11-27 21:02:07 -08:00
George Hotz
acbe6d1b53
Revert "HIP compilation on CI targeting RDNA3 ( #2459 )" ( #2481 )
...
This reverts commit d275ff930a .
2023-11-27 20:41:21 -08:00
qtkite
cb507a9389
Remove the toCPU copy ( #2445 )
...
* Remove the rawbuffer copy in runtime/lib.py on line 44
* remove buffer view
* added metadata back, oops
* delayed cpu testcase
* whitespace
* whitespace
* buffer behavior as is
* Update test_jit.py
2023-11-27 20:37:13 -08:00
Davi Silva
d275ff930a
HIP compilation on CI targeting RDNA3 ( #2459 )
...
* hip amd compilation
* gate the test properly
* cleanup unused import
* remove superfluous numpy conversion
* add SpeedyNet tests (f32 [passes] & f16 [fails])
* make CI verbose (error log from hip compiler)
* test the real ops_hip
* Merge branch 'tinygrad:master' into ci/hip-compilation
* fix CI
* cleanup
* really fix CI
2023-11-27 20:33:11 -08:00
Yingbo Ma
d43485ae9e
Fix graph_uops ( #2457 )
...
* Load networkx when we need to graph uops
* Document GRAPHUOPS
* import nx in `graph_uops`
2023-11-27 18:42:48 -08:00
Paul Gustafson
98cd9e8926
Add assertion to prevent nonsense mod values ( #2474 )
2023-11-27 18:37:44 -08:00
Davi Silva
186ac77ec3
Update hip_matmul.py ( #2480 )
2023-11-27 18:36:19 -08:00
chenyu
7f9a4c1285
fp16 and noshow flags for gpt2 ( #2470 )
2023-11-27 16:23:03 -05:00
qazal
e267a93124
reset seed on every run ( #2468 )
2023-11-27 12:55:54 -08:00
George Hotz
9e07824542
move device to device.py ( #2466 )
...
* move device to device.py
* pylint test --disable R,C,W,E --enable E0611
* fix tests
2023-11-27 11:34:37 -08:00
qazal
262cd26d28
Simplify openpilot kernel ( #2460 )
...
* a conditional with the same results either way is a noop
* add unit test
2023-11-27 10:02:27 -08:00
chenyu
61a80a0675
asserts LtNodes of SumNode with MulNode of Nodes ( #2465 )
2023-11-27 12:56:59 -05:00
chenyu
c4dfde761e
remove the commented import ( #2463 )
2023-11-27 11:50:41 -05:00
Akshay Kashyap
a031afb2f6
Update display_name in resnet50 example ( #2454 )
2023-11-26 16:07:36 -08:00
Paul Gustafson
1d89c018fa
Add isinstance check before gcd call in SumNode.__lt__ ( #2450 )
...
* Add isinstance check before gcd call
* Delete blank lines
* Fix unit test typo
* Delete blank lines again
---------
Co-authored-by: Paul Gustafson <paul.gustafson@theambrusgroup.com >
2023-11-26 13:05:04 -08:00
Paul Gustafson
58b1dd463e
Add error code to type: ignore ( #2451 )
...
Co-authored-by: Paul Gustafson <paul.gustafson@theambrusgroup.com >
2023-11-26 13:04:10 -08:00
George Hotz
8e9cdef61f
clean up the buffers ( #2447 )
...
* clean up the buffers
* remove allocate_output
* functools.lru_cache is methodcache
* add TestShapeTrackerSize
* cache_clear
* no 0 sz buffer, add _ on functions that shouldn't be imported
* fix size
* if -> while
2023-11-26 11:02:29 -08:00
George Hotz
f6f712e609
split out the three steps of exec_ast ( #2446 )
...
* split out the three steps of exec_ast
* clean up extra args
* cleanups, bugfix
* allocate is a more normal name
* get_optimized_linearizer is better
2023-11-26 09:07:37 -08:00