George Hotz and GitHub
1ce63f8d04
move functions to view and update docs [pr] ( #10904 )
...
* move functions to view and update docs [pr]
* move quantize
2025-06-20 16:47:58 -07:00
George Hotz and GitHub
a493eb396c
fix view add 0 ( #10840 )
2025-06-16 16:46:12 -07:00
chenyu and GitHub
55cdbb9a20
fix mask in expand into symbolic size ( #10730 )
...
failed before when old size is 1 and it expands into symbolic size, because `resolve(s != ns, False)` is False and it does not expand the mask
2025-06-09 17:33:22 -04:00
chenyu and GitHub
49f999d919
update _reshape_mask for symbolic shape expand ( #10726 )
...
* don't merge shape symbolic reshape symbolic
* proper fix
2025-06-09 16:35:02 -04: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
7703dbef99
view substitute [pr] ( #10360 )
2025-05-16 15:08:24 -07:00
George Hotz and GitHub
876d2275a1
changes from new multi ( #10353 )
...
* changes from new multi
* revert hcq change
2025-05-16 13:07:29 -07:00
George Hotz and GitHub
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 and GitHub
5c7b549eab
use functools.cache instead of lru_cache(None) [pr] ( #9714 )
...
* use functools.cache instead of lru_cache(None) [pr]
* more cache
2025-04-03 11:47:13 +08:00
qazal and GitHub
44479f8ad6
raise ValueError in view reshape for negative dims [pr] ( #8988 )
2025-02-09 17:27:15 +01: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
867004fbeb
use unravel in views_to_indexed_uops [pr] ( #8560 )
...
* use unravel in shape
* make process replay work
* earlier View.minify()
* fix
* fix tests
* mypy
* get rid of early minify
* fix
* linter
* clean and add test
---------
Co-authored-by: chenyu <[email protected] >
2025-01-12 10:25:55 -05:00
eliotgolding and GitHub
4c5c32ff5f
Small bug in _reshape_mask ( #8538 )
2025-01-08 22:11:24 -05:00
qazal and GitHub
c7ec0ab674
delete unused View lt support (2) ( #8451 )
...
* delete lt on view (2)
* the scheduler uses symbolic_simple
2024-12-31 07:01:25 +08:00
qazal and GitHub
313bdfa43f
Add View lt support back [pr] ( #8407 )
...
* Revert "remove unused View.t and lt [pr] (#8374 )"
This reverts commit 8fdcb60461 .
* green test_masked_const_elementwise
2024-12-26 01:09:59 +08:00
chenyu and GitHub
afcd70af97
remove untriggered/untested code [pr] ( #8375 )
...
ran with `coverage` on test. not sure about if we still want max_var_const so just commented it out
2024-12-22 04:07:53 -05:00
chenyu and GitHub
8fdcb60461
remove unused View.t and lt [pr] ( #8374 )
2024-12-22 02:26:54 -05:00
George Hotz and GitHub
9c77e9f9b7
replace Tuple with tuple [pr] ( #8344 )
...
* replace Tuple with tuple [pr]
* replace List with list [pr]
* replace Dict with dict [pr]
* replace Set with set [pr]
2024-12-19 21:27:56 -08:00
chenyu and GitHub
7153f7709f
update test_merge_view_recursion_err2 [pr] ( #8339 )
...
the view was not created through View.create, updated the test to show the expected behavior
2024-12-19 18:29:34 -05:00
chenyu and GitHub
2bf47b75da
temp fix for symbolic shape view add [pr] ( #8337 )
...
something is still wrong with symbolic shape shrink, but it should not recurse forever
2024-12-19 16:10:42 -05:00
chenyu and GitHub
accc186c8b
remove a leading 1 check in _reshape_mask [pr] ( #8327 )
...
the only possible mask for it is either (0, 0) or (0, 1). so the logic is no-op
2024-12-18 19:30:10 -05:00
chenyu and GitHub
8a8eaa1ed9
minor change to _reshape_mask [pr] ( #8324 )
...
formatting before logic change
2024-12-18 16:29:12 -05:00
chenyu and GitHub
d2ee304337
minor cleanup to _reshape_mask [pr] ( #8321 )
...
removed usused mask check, and combined if blocks
2024-12-18 15:09:33 -05:00
chenyu and GitHub
4e2d98638d
redundant shape simplify in __unsafe_resize [pr] ( #8301 )
...
also done in View.create.
2024-12-17 19:00:45 -05:00
chenyu and GitHub
a9f46ebf70
un1d -> unravel [pr] ( #8300 )
...
numpy/torch has a similar function called `unravel_index`
2024-12-17 18:08:37 -05:00
chenyu and GitHub
66b92b6061
unused case where View adds invalid masked view [pr] ( #8299 )
...
code path does not hit this, and we might want to assert if it ever hits
2024-12-17 17:31:01 -05:00
chenyu and GitHub
513d765c9e
remove duplicated canonicalize mask in __unsafe_resize [pr] ( #8296 )
...
also more comments and type annotation
2024-12-17 16:54:39 -05:00
chenyu and GitHub
df7ba102c3
minor changes to views add [pr] ( #8279 )
...
naming / style / comments before logic change
2024-12-16 23:53:59 -05:00
chenyu and GitHub
f05fd118a2
few minor code cleanups [pr] ( #8267 )
2024-12-15 23:44:51 -05:00
chenyu and GitHub
16c1b2379d
remove an if in reshape [pr] ( #8246 )
...
not needed, likely a hack to work around pre-resolve?
2024-12-14 16:05:50 -05:00
chenyu and GitHub
0708a169dd
more comments and tests to reshape [pr] ( #8236 )
2024-12-13 23:21:51 -05:00
chenyu and GitHub
e0956c518c
move some ifs from merge_dims to reshape [pr] ( #8229 )
...
the third return value is only used in reshape
2024-12-13 19:56:15 -05:00
chenyu and GitHub
e371a23c45
more comments and tests to reshape [pr] ( #8228 )
2024-12-13 18:50:13 -05:00
chenyu and GitHub
eb0e5a14fd
reorder and comments to reshape [pr] ( #8223 )
...
something feels wrong... contructing a counter example next
2024-12-13 17:02:27 -05:00
chenyu and GitHub
ce41e6572d
unit test merge_dim [pr] ( #8195 )
...
looking for better ways to write this. first adding some tests
2024-12-12 17:55:52 -05:00
chenyu and GitHub
a77ee72d11
clean up reshape size check [pr] ( #8067 )
...
removed a resolve, and remove special case for 0 size assert since it's covered by generic size check
2024-12-06 07:51:19 -05:00
chenyu and GitHub
13b954f22c
unify expand conditions [pr] ( #8065 )
...
same condition (check if old == new or old == 1) in tensor and view. also renamed _pad_left to _align_left because it's not really a pad
2024-12-05 21:40:14 -05:00
chenyu and GitHub
aefdff4ef5
reshape mask cleanups [pr] ( #8064 )
...
don't need canonicalize_st because we always merge 1 in `_merge_dims`
2024-12-05 20:20:43 -05:00
chenyu and GitHub
05dba6e4ee
minor to_indexed_uops cleanup [pr] ( #8063 )
2024-12-05 17:15:03 -05:00
chenyu and GitHub
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 and GitHub
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
chenyu and GitHub
af5d77f684
move sint_to_uop from view.py to ops.py [pr] ( #7848 )
...
both sint and uop are in ops.py
2024-11-22 11:15:02 -05:00
chenyu and GitHub
f6d1201c48
variable_to_uop -> sint_to_uop [pr] ( #7847 )
...
and added type to it
2024-11-22 10:54:59 -05:00
chenyu and GitHub
4453ab51e1
use ceildiv in View.stride [pr] ( #7844 )
2024-11-22 08:38:05 -05:00
chenyu and GitHub
6229d87f45
simpler reshape symbolic shape check [pr] ( #7837 )
2024-11-21 22:53:57 -05:00
chenyu and GitHub
a011562450
fix view add with symbolic shape ( #7569 )
...
the issue is that the symbolic shape is not greedily simplified and canonicalized before reshape
2024-11-06 11:39:20 -05:00
George Hotz and GitHub
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 and GitHub
acad11ea8e
minor cleanup to View add [pr] ( #7247 )
2024-10-24 09:18:47 -04:00
George Hotz and GitHub
e4631a47f4
symbolic arange support ( #7252 )
...
* symbolic arange support WIP [pr]
* smin/smax from old try
* pad2d symbolic works
* real test
* sym arange
* symbolic arange test passes
* double mod is single mod
* lol that's not right
* more tests
* Update ops.py
2024-10-24 17:55:53 +08:00