Sieds Lykles
584fd6af5a
Fix division by zero and mask bug in add views ( #11088 )
...
* merge view infinite loop test
* adjust condition in `x//d -> x//(-d)*-1`
* Fix division by zero in add views
* adjust offset end
* fix typo in comment
* add target to test_merge_views_variable
* fix view incorrectly being masked
* ssimplify strides and offset of the new view to canonicalize
* remove print in test
---------
Co-authored-by: qazal <qazal.software@gmail.com >
2025-07-07 10:05:47 -07:00
George Hotz
a493eb396c
fix view add 0 ( #10840 )
2025-06-16 16:46:12 -07:00
eliotgolding
4c5c32ff5f
Small bug in _reshape_mask ( #8538 )
2025-01-08 22:11:24 -05:00
chenyu
0d6fe6200c
test case view from an empty view ( #8388 )
...
currently it behaves differently depends on first view somehow
2024-12-23 17:40:49 -05:00
chenyu
c587b3b08c
test case view the padded area of a view ( #8386 )
...
these cases view the padded area of first view
2024-12-23 16:47:31 -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
Jyotirmaya Mahanta
45f2fb82d5
add failing tests for merge views ( #8306 )
...
* add failing tests for merge views
* assert is not none
* make linter happy
2024-12-18 01:27:38 -05:00
chenyu
3195bd0d12
more test examples to merge views [pr] ( #8277 )
...
these have masks in self and masks in the merged views
2024-12-16 20:44:35 -05:00
chenyu
6e2e56c0ff
unit test for view add when self has a mask [pr] ( #8276 )
2024-12-16 20:07:35 -05:00
chenyu
0708a169dd
more comments and tests to reshape [pr] ( #8236 )
2024-12-13 23:21:51 -05:00
chenyu
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
e371a23c45
more comments and tests to reshape [pr] ( #8228 )
2024-12-13 18:50:13 -05:00
chenyu
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
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
59c6472b9f
check contiguous in View.create after canonicalizing mask and offset ( #4770 )
...
mask / offset / strides can change during canonicalization, and contiguous can be True at the end
2024-05-29 11:31:13 -04:00
Jyotirmaya Mahanta
b6a2600c86
fix merging condition in merge_dims ( #3363 )
...
* fix merging condition in merge_dims
* add tests
* set contiguous after mask is canonicalized
* minor fix
2024-02-12 11:50:26 +01:00