Sieds Lykles and GitHub
1f3950a484
Invalid idx ( #12067 )
...
* merge index_dtype_3
* new lowering with Invalid idx
* remove that dtype from range
* finish merge
* annotate better
* indentation
* dont need that anymore
* always process replay for openpilot
* more uop_given_valid for idx
* valid past index_child
* fix bug preventing load getting an alt value
* add track_match_stats back in in shapetracker and remove cache
* get_valid_idx -> get_valid and get_idx
* fix heuristics with new idx
* split line
* fix typo
* fix signature
* dont skip idx if stride is 0
the idx may still be invalid
* lower const with new valid
* delete to_indexed_uops
* update shapetracker test
* delete axis_is_masked
* add cache back
* move around comment
* fix get_valid bug
* move invalid fold to symbolic so its earlier
* cleanup
* update applying padto to new idx
* add unit tests
* cleanup
* fold line
* improve spec
* dont try to render Invalid as a float
* more consistent invalid index
* update some tests
* Fold index with true cond
* skip test
* vconst min max if Invalid in arg
* fix signature of UOp.const
* add test for min/max of Invalid CONST/VCONST
* add InvalidType to as_const signature
* is Invalid to isinstance
* Add InvalidType to ConstLike
* index gate is a where gate
* make that a metaclass
* fix heurisics for new idx
* mypy happy
2025-09-12 01:42:02 +02:00
Sieds Lykles and GitHub
3989f5b559
Revert "Simplify valid in symbolic ( #12104 )" ( #12108 )
...
This reverts commit 73d479a016 .
2025-09-10 23:36:40 +02:00
Sieds Lykles and GitHub
73d479a016
Simplify valid in symbolic ( #12104 )
...
* cleanup cast_folding
* from sym to symbolic
* no more sym in dtype lowering
* move around simplify_valid
* update test
2025-09-10 23:26:19 +02:00
Sieds Lykles and GitHub
0e420e68b4
delete axis_is_masked ( #12092 )
2025-09-10 05:26:19 +02:00
ea1be2e4cd
[bounty] Remove using reshape to register symbolic shape ( #11771 )
...
* Modify tests and start work towards removing symbolic reshape
* Refactor symbolic reshape
* fix small error
* much cleaner + fix more tests
* Can remove this now
* Update test_symbolic_ops and test_tiny
* Couple more tests
* Unused import
* More tests and add EXPAND to Tensor.empty
* Fix test beam search
* all int
* Fix rangeify by adding shrink
* Remove OOB check and so fix test_symbolic_jit
* test_symbolic_jit doesn't need OOB Context anymore either
* Should remove that test now
* Cleanups part 1
* fix linters
* Final cleanups
* Don't reassign inside for loop
---------
Co-authored-by: chenyu <[email protected] >
2025-08-28 12:30:49 -04:00
George Hotz and GitHub
6540bb32a6
move into codegen late [pr] ( #11823 )
2025-08-24 10:23:25 -07:00
chenyu and GitHub
d5fc6af4a2
remove unused ShapeTracker.consecutive [pr] ( #11426 )
2025-07-29 18:36:19 -04:00
George Hotz and GitHub
32e9949052
rename lazydata to uop ( #10698 )
2025-06-08 08:42:22 -07:00
George Hotz and GitHub
a07caaca0d
handle stride 0 variable reshape ( #10536 )
2025-05-27 10:00:24 -07:00
George Hotz and GitHub
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
George Hotz and GitHub
df3b320f46
rewriter -> devectorizer [pr] ( #9147 )
2025-02-18 12:42:08 +08:00
7647cd8428
[bounty] Stride is flip ( #8792 )
...
* replace stride with flip
* Complete replacing stride with flip
clean flip function in view.py
fix tests
* fix tests for multi shapetracker
* fix tests for fuzz shapetracker
* fix tests for fuzz shapetracker
* debug
* debug
* fix
* fix
* fix
---------
Co-authored-by: George Hotz <[email protected] >
Co-authored-by: George Hotz <[email protected] >
2025-01-31 11:34:10 +09:00
George Hotz and GitHub
98d01a059d
rename uopgraph to rewriter [pr] ( #8682 )
2025-01-19 17:03:12 -08:00
0289fbb1c2
limit real_size to the size of first View of ShapeTracker ( #8628 )
...
* fix real_size
* add fuzzer; typing
* spacing
---------
Co-authored-by: chenyu <[email protected] >
2025-01-16 16:27:39 -05:00
chenyu and GitHub
ef3752625b
add test case of realize_size with 0 in shape ( #8011 )
2024-12-03 09:19:50 -05:00
chenyu and GitHub
74b4d1c1e1
rewrite idx again in real_strides after uop_given_valid ( #7600 )
...
uop_given_valid does not guarantee output to be flat. fixed one last real_strides test.
2024-11-08 14:30:32 -05:00
chenyu and GitHub
c6189e38c1
simplify_valid in real_strides ( #7599 )
...
improved one more real_strides. after finishing the last one will think about always applying these in to_indexed_uops
2024-11-08 10:45:22 -05:00
chenyu and GitHub
4378b100ad
make UOp.range arg a tuple [pr] ( #7583 )
...
* make UOp.range arg a tuple [pr]
so render works on output of ShapeTracker.to_indexed_uops
* fix
2024-11-07 11:58:09 -05:00
chenyu and GitHub
bb7b5362be
uop_given_valid in real_strides ( #7231 )
...
simplified idx allows deriving more strides
2024-11-07 09:41:16 -05:00
George Hotz and GitHub
c8bf09b7d4
s/UOps/Ops ( #7500 )
...
* s/UOps/Ops [pr]
* fix
2024-11-03 11:26:10 +08:00
chenyu and GitHub
e90bbe6bbc
failed test cases for 3+ views shapetracker strides ( #7226 )
2024-10-22 18:49:13 -04:00
chenyu and GitHub
08a3b97ddc
more generic lt_folding ( #7171 )
...
* more generic lt_folding
instead of checking gcd for all uop, check the gcd of the ones that have const_factor() > 1 and still can simplify if others are smallish
* fixed that stride too
2024-10-21 09:41:02 -04:00
chenyu and GitHub
bd8ecf7fd6
remove NumNode ( #7035 )
2024-10-13 16:42:19 -04:00
George Hotz and GitHub
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 and GitHub
a71bb09ec3
remove symbolic file [pr] ( #7012 )
2024-10-12 18:44:44 +08:00
George Hotz and GitHub
5ae2de9845
UOp.variable ( #7010 )
...
* UOp.variable [pr]
* fix tests
* clean
* improve name rendering
* last bug
2024-10-12 18:20:44 +08:00
George Hotz and GitHub
a0cb16ac61
node cleanup + local metal test speed [pr] ( #6880 )
...
* node cleanup [pr]
* fix tests, including the double one on metal
* no time tqdm tests
2024-10-04 18:14:23 +08:00
George Hotz and GitHub
738a5794a9
last update for new symbolic [pr] ( #6877 )
2024-10-04 14:58:51 +08:00
George Hotz and GitHub
eaa1e0eeeb
rename constant_folder to sym [run_process_replay] ( #6780 )
2024-09-27 14:54:54 +08:00
chenyu and GitHub
26ebb7cab4
don't use div_folding in lt_folding ( #6666 )
...
* don't use div_folding in lt_folding
valids 35 -> 13
* fails the same as before
2024-09-23 01:50:18 -04:00
George Hotz and GitHub
52c2c4df9c
fix match of sz 0 + dedup kernel ast [run_process_replay] ( #6663 )
...
* fix match of sz 0 [run_process_replay]
* empty graph rewrite to dedup st
2024-09-23 11:56:53 +08:00
George Hotz and GitHub
67a03e72bb
remove expr_idxs [run_process_replay] ( #6567 )
...
* remove expr_idxs [run_process_replay]
* goodbye that test
2024-09-17 18:34:51 +08:00
00578a021b
re:6125 switch real_size to use uops [run_process_replay] ( #6138 )
...
* switch real_size to use uops [run_process_replay]
* enough to pass
---------
Co-authored-by: George Hotz <[email protected] >
2024-08-19 13:20:24 -04:00
chenyu and GitHub
f7950fc2b6
add E275 missing-whitespace-after-keyword linting rule ( #6149 )
...
requires space after keywords like `assert`, `not`, `return`, `else`
2024-08-17 16:44:34 -04:00
George Hotz and GitHub
88edc2902d
axis_is_masked with graph_rewrite [run_process_replay] ( #6144 )
2024-08-17 10:28:49 -07:00
George Hotz and GitHub
d9cb45af09
only axis is masked [run_process_replay] ( #6123 )
2024-08-16 21:01:17 -07:00
George Hotz and GitHub
94aa5f11b5
Revert "use vmax for real_size [run_process_replay] ( #6120 )" ( #6122 )
...
This reverts commit a6e3211444 .
2024-08-16 20:33:19 -07:00
George Hotz and GitHub
a6e3211444
use vmax for real_size [run_process_replay] ( #6120 )
...
* use vmax for real_size [run_process_replay]
* axis is masked
2024-08-16 20:17:23 -07:00
975b811ad9
names shadowing builtins ( #5179 )
...
Co-authored-by: chenyu <[email protected] >
2024-06-27 08:15:01 -04:00
chenyu and GitHub
1ffa5ec492
unit test ShapeTracker.consecutive ( #4800 )
2024-06-01 10:10:51 -04:00
Obada Khalili and GitHub
e4befa41d7
Fix in _reshape_mask ( #4332 )
...
* handle reshape with remainder in _reshape_mask
* remove trailing whitespce
* use helper_test_op to generate tensors from shapes
* test in shapetracket too
* remove whitespace
* revert property name in other class tests
2024-04-28 11:57:39 -04:00
chenyu and GitHub
f6c8032e5d
assert if expr_idxs return might be outside of int32 ( #4157 )
2024-04-12 14:18:35 -04:00
chenyu and GitHub
d459956966
move TestGetContraction to test_helpers ( #3313 )
...
also cleaned long lines in test_shapetracker and enabled the line length check
2024-02-04 06:05:01 -05:00
George Hotz and GitHub
d2aab65958
remove unused expr node ( #3170 )
...
* remove unused expr node
* still works
* simple expr_idxs
* fixup typing
2024-01-18 14:18:43 -08:00
George Hotz and GitHub
f0c178b7e9
move get_contraction to helpers ( #3162 )
...
* move get_contraction to helpers
* move simplify
* lines
* to_movement_ops is not generic
2024-01-17 19:13:11 -08:00
George Hotz and GitHub
655c6f61d3
St real size ( #3046 )
...
* track the size in the lazybuffer
* shapetracker real size
* lint
2024-01-08 14:44:53 -08:00
George Hotz and GitHub
c003be7309
Revert "track size in shapetracker" ( #3043 )
...
* Revert "track size in shapetracker (#3026 )"
This reverts commit a8ba1ac08f .
* st.size
2024-01-08 13:13:39 -08:00
George Hotz and GitHub
a8ba1ac08f
track size in shapetracker ( #3026 )
...
* track size in shapetracker
* shapetracker adapter
* size is an int
* create Buffer with st.size
* only compare the views for the jit
* fix webgpu
2024-01-05 20:15:53 -08:00
Peter Cawley and GitHub
dae8976889
Fix reshape merging with masks ( #2877 )
2023-12-20 14:00:58 -08:00
chenyu and GitHub
5a739e8c20
update one skipped pad_reshape test that was fine ( #2860 )
...
* update one skipped pad_reshape test that was fine
had a typo
* this one passed
2023-12-19 23:25:52 -05:00