Commit Graph

43 Commits

Author SHA1 Message Date
George Hotz
aefabaf774 add AxisType to range (#11798)
* add AxisType to range

* missed them

* fix that test

* fix that test
2025-08-23 11:15:00 -07:00
George Hotz
a38947b4bb move symbolic and transcendental to uop [pr] (#10771) 2025-06-10 20:51:22 -07:00
chenyu
7bfb20757c fix tensor int floor div (#10327)
* fix tensor int floor div

* test_float_floordiv_scalar
2025-05-21 06:46:54 -04:00
Sieds Lykles
db09676250 Dont simplify gate in gate, fix FUSE_ARANGE=1 python test/test_ops.py TestOps.test_scatter_add (#10411)
* substitute out index

* Add test

* change comment
2025-05-19 13:16:21 -04:00
George Hotz
411392dfb7 move files into uop dir (#10399)
* move files into uop dir [pr]

* tinygrad.uop is a thing

* fix uop docs, no pr

* fix viz
2025-05-18 11:38:28 -07:00
Sieds Lykles
02208565de add check (#10257) 2025-05-12 11:03:01 -04:00
Sieds Lykles
7c4b381fbf Extra simplify valid test [pr] (#10256)
* add test

* Change the range

* add todo test
2025-05-12 07:32:03 -04:00
George Hotz
603c03bef2 fix tests for rewrite [pr] (#10167)
* fix tests for rewrite [pr]

* cleaner

* delete linearize_uop

* clean up the rest
2025-05-05 19:19:49 -07:00
George Hotz
c3ff308abb range has only one src now [pr] (#10100)
* range has only one op now

* fix z3 checker

* ci fix

* needs shell

* try pip ensure update

* that ensurepip is useless

* upgrade pip before cache

* windows happy?
2025-04-29 10:31:05 -04:00
George Hotz
c1539b0319 putting add first orders loads as expected (#9991) 2025-04-22 20:12:05 +01:00
chenyu
c20f112e9f example test use z3 to verify valid simplification (#9684) 2025-04-02 01:05:52 -04:00
chenyu
5358b0904b update uop_given_valid if a node becomes const (#9604)
* update uop_given_valid if a node becomes const

* cleanup
2025-03-27 14:57:46 -04:00
qazal
0b20f91ce7 remove move_mask from the devectorizer (#9511)
* remove move_mask from the devectorizer

* add (wrong) ptx

* reason

* enable index addition in PTX, we won't have the INDEX anyways

* space
2025-03-20 11:53:12 +08:00
George Hotz
2cc4cb74f0 reorder binops (#9328)
* reorder binops

* test improvements + fix string tests

* ugh, okay this
2025-03-03 14:58:18 +08:00
George Hotz
df3b320f46 rewriter -> devectorizer [pr] (#9147) 2025-02-18 12:42:08 +08:00
George Hotz
4dd10d03b7 move is_increasing to ops [pr] (#9134) 2025-02-17 19:27:48 +08:00
George Hotz
1bf66d62cf symbolic gets its own file [pr] (#9132) 2025-02-17 18:55:21 +08:00
George Hotz
98d01a059d rename uopgraph to rewriter [pr] (#8682) 2025-01-19 17:03:12 -08:00
chenyu
b7397c1322 more typing cleanups [pr] (#8376)
List, Tuple, DefaultDict
2024-12-22 05:21:03 -05:00
chenyu
791a80a1c7 add failed merge view example to test_simplify_valid_idx [pr] (#8334)
* add failed merge view example to test_simplify_valid_idx [pr]

* !=True is fine
2024-12-19 12:54:03 -05:00
chenyu
0c060fa040 update uop and tests to not use lt/gt/le/ge [pr] (#8023)
just use dunder methods, eventually remove those from ops
2024-12-03 21:02:52 -05:00
George Hotz
09eac42fd6 cache indexed uops in st [pr] (#8008)
* cache indexed uops in st [pr]

* remove arg from range
2024-12-03 21:27:07 +08:00
Sieds Lykles
864758423e Don't take const in gcd and change the "nothing_changed" condition (#7926)
* Don't take const in gcd and change the "nothing_changed" condition

Biggest difference is probably actually that I forgot to check if gcd
changed if nothing else changed
The TODO was fixed by not using the const in the gcd, and then taking it
out

* Fix more tests
2024-11-27 18:07:36 -05:00
chenyu
a1dfd288bb different valid order (#7589)
in simplify_valid, we start with valids that are in others' parent so the others is more likely to be simplified
2024-11-07 20:27:56 -05:00
George Hotz
bac251d2c1 idx_load_store in lowerer [pr] (#7477)
* idx_load_store in lowerer [pr]

* fix tests (#7513)

Co-authored-by: John Doe <null@mail.com>

* work

---------

Co-authored-by: Carl Basho <76494676+oldpondplop@users.noreply.github.com>
Co-authored-by: John Doe <null@mail.com>
2024-11-04 10:18:40 +08:00
George Hotz
c8bf09b7d4 s/UOps/Ops (#7500)
* s/UOps/Ops [pr]

* fix
2024-11-03 11:26:10 +08:00
George Hotz
2cfc7b6695 Index everywhere 2 (#7363)
* indexing everywhere [pr]

* fix tests
2024-10-29 19:29:40 +08:00
chenyu
d66fe7a66f fix simplify_valid (#7313)
the simplex should compare with valid bound, not its vmin
2024-10-26 14:21:12 -04:00
chenyu
0a4d01f6d4 disable simplify_valid (#7312)
fixed test_failure_55. will reenable it later after fixing the bug
2024-10-26 12:42:48 -04:00
chenyu
e7cd21c5e3 remove custom render in test_simplify_valid_idx (#7303)
use UOp render to compare
2024-10-25 10:20:26 -04:00
George Hotz
4812801aa6 try for canonical order (#7286)
* try for canonical order

* cmp better

* disable bad tests

* flip const order

* fix test

* fix tests

* different fix for NOOP

* metaclass here

* fix tests

* narrower scope
2024-10-25 16:04:54 +08:00
chenyu
98de58260b simplify valid itself (#7112) 2024-10-19 19:39:25 -04:00
George Hotz
ded1b38b84 minor dtype cleanup [pr] (#7124)
* minor dtype cleanup [pr]

* use ptr() function
2024-10-17 17:41:23 +08:00
George Hotz
d990a16326 fix tests to use render (#7116) 2024-10-17 14:35:22 +08:00
chenyu
842fe444df test case for valid only simplification (#7108) 2024-10-16 16:40:46 -04:00
chenyu
2008bac6bf use validhack logic to rewrite buffer idx (#6740)
* use validhack logic to rewrite buffer idx

saved a whopping one mod in the conv backward kernel...

* cleanup more
2024-10-14 16:47:31 -04:00
George Hotz
85a45164fb remove pyint [pr] (#7016)
* remove pyint

* bump time on tp [pr]

* dont truncate in const fold

* remove dead code

* Revert "dont truncate in const fold"

This reverts commit 29c81db0f7.

* remove define_var
2024-10-12 22:36:24 +08:00
George Hotz
e7a0ffe46a break out linearization [pr] (#6994) 2024-10-11 15:27:33 +08:00
ignaciosica
555bcb5e54 static access for code_for_op (#6889) 2024-10-05 07:38:01 +08:00
George Hotz
882339f729 remove parens from neg (#6738) 2024-09-25 15:38:20 +08:00
chenyu
ff25bfb1b0 conv backward tests in test_simplify_valid_idx (#6727)
the backward idx is pretty ugly now
2024-09-25 02:51:07 -04:00
chenyu
e6a1b5aa8f more test_simplify_valid_idx cleanup (#6726)
moved UOps.VECTORIZE of idx into the helper
2024-09-24 23:47:42 -04:00
chenyu
14524eeddc test_image_valid.py -> test_simplify_valid_idx.py (#6724)
restructure the tests, will use the same file for non-image tests
2024-09-24 23:32:27 -04:00