Commit Graph

26 Commits

Author SHA1 Message Date
George Hotz
592e86f6f5 remove UOp.st (#12716)
* remove UOp.st

* fix tests

* torch backend disable
2025-10-16 14:44:09 +08:00
Shun Usami
2a72b00679 Add test for 2D tensor indexing in setitem (#12193)
* Add test for 2D tensor indexing in setitem

* Fix _masked_setitem to handle multi dim indexing correctly

* Fix indent

* Add fuzz test for 3D tensor indexing in setitem

* Skip indexing fuzz test (slow)
2025-09-16 14:57:25 -04:00
Shun Usami
34a05b31fe Fix advanced tensor indexing setitem (#12128)
* Add failure test case for advanced tensor indexing setitem

* Fix advanced tensor indexing setitem when permuted

* Reduce line count

* Revert unnecessary change

* Combine two lines into one
2025-09-14 15:22:40 -04:00
Eitan Turok
cba3655de5 Add Test for Setitem (#10559)
* init

* update

* better

* failing test

* works

* Delete test file

* clean

* lint

* simplify variable name

* rm contigious, rm int dtype, and add assertEqual

---------

Co-authored-by: chenyu <chenyu@fastmail.com>
2025-07-30 22:03:41 -04:00
George Hotz
d049639221 little setitem test (#11064)
* setitem has one less realize, why broken

* put realize back
2025-07-02 15:10:24 -07:00
George Hotz
32e9949052 rename lazydata to uop (#10698) 2025-06-08 08:42:22 -07:00
Sieds Lykles
e75be6eafc [bounty] [pr] index validation with z3 (#9981)
* index validation with z3

* Change comment

* toposort -> toposort()

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2025-04-24 08:06:08 -04:00
qazal
dd16087f62 fold double ASSIGN to same target (#9941) 2025-04-20 19:06:38 +08:00
qazal
9a9aba4cd5 setitem tests (some failing) from kernelize (#9940) 2025-04-20 18:47:55 +08:00
George Hotz
46a8c5e1e5 delete forced_realize (#8615)
* delete forced_realize

* put that back

* expectedFailures

* cleaner create_subbuffer

* more comments

---------

Co-authored-by: qazal <qazal.software@gmail.com>
Co-authored-by: qazal <77887910+Qazalin@users.noreply.github.com>
2025-01-20 09:40:36 -08:00
qazal
a1f70ce7d0 only use BUFFER_VIEW in disk [pr] (#8629)
* only use BUFFER_VIEW in disk [pr]

* delete can_view

* BUFFER_VIEW op on DISK

* remove that allow_buffer_view=False

* notes

* bitcast is a low-level op too

* this passes on AMD and LLVM
2025-01-15 12:34:15 -05:00
ttomsa
9adeb1041c fix advanced setitem with 1 in shape (#7797)
* fix advanced setitem with 1 in shape

* linter
2024-11-19 20:04:59 -05:00
ttomsa
170ece6605 fix advanced setitem overlap with 0 (#7793)
* fix advanced setitem overlap with 0

* fix comment
2024-11-19 16:03:55 -05:00
geohotstan
aeaf574a05 add failure test for setitem bug (#7786)
* add failure test

* rename

* improve tests

* improve tests and no need numpy
2024-11-19 08:54:21 -05:00
chenyu
91a3b27fa9 disable test_setitem_inplace_operator again (#7495)
it was flaky, not broken broken
2024-11-02 19:01:23 -04:00
chenyu
ba0c246cfd update test_setitem_overlapping_inplace1 (#7494)
failed on LLVM and remu, not real AMD
2024-11-02 18:40:53 -04:00
chenyu
f887de0fd6 update test_setitem (#7493)
some tests passed now
2024-11-02 17:53:04 -04:00
Maximilian Wolf
3c992250d5 Failing test: different behavior on different devices (#7193)
* add minimal failing test

* more tiny makes linter happy

* tinyfy

* no walrus in assert

* a tiny bit simpler

* minimal

* better place, better name, expected failure

* skip devices with correct behavior
2024-10-27 09:53:58 +08:00
qazal
9d5342976e skip TestSetitem.test_setitem_inplace_operator (#7103) 2024-10-16 18:59:08 +03:00
ttomsa
76bd4c7d5f advanced setitem (#6262)
* advanced setitem draft

* add setitem tests

* fix for tests

* small change

* handle repeated indices with test

* fix v broadcasting to mask

* clean up a bit

* open more tests

* clean up, fixes issue with scalar tensor index

* fix

* fix index_put_ and linter

* add type annotation

* done

* remove non contiguous hack

* woops linter

* name fix

* add back type notation

* more type notation

* final

* linter

* check lazydata not shared

* no numpy

* no numpy

* rename

* index benchmark

* linter

* no cloning time

* rm benchmark

* new function

* rm contiguous and cast early

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
Co-authored-by: chenyu <chenyu@fastmail.com>
2024-09-24 22:14:59 -04:00
geohotstan
089eeec271 setitem in-place operator tests (#4577)
* tests and error

* rename to in-place

* add a note

* more comments

* more comments

* disable folded advanced setitem tests for now
2024-05-14 01:28:02 -04:00
chenyu
0fa57b8ce9 raise error if setitem tensors have requires_grad (#4575)
* raise error if setitem tensors have requires_grad

working on supporting this, first properly raises error

* NotImplementedError
2024-05-13 18:56:47 -04:00
geohotstan
874dfc556c update setitem tests to test for currently supported cases (#4334)
* tests, tests, tests

* one more test

* tests tests tests tests

* t e s t

* a few more
2024-05-05 11:59:13 -04:00
geohotstan
17328ded7d setitem no return value (#4266)
* no ret value and just force contiguous

* ok revert contiguous stuff

* actually do force it contiguous

* revert again lol

* add simple regression test

* add assert for MLB

* guess we're contiguous everything from now on

* lol ugly af empty return...

* don't change order cuz i don't get disk
2024-04-23 16:28:14 -04:00
chenyu
dbd39ab78a setitem support setting python const (#4111) 2024-04-08 11:37:50 -04:00
chenyu
92c0675ccf setitem initial support (#4093)
* wip setitem

it's an eager assign to output shapetracker view

* cleanups and tests

* more cleanups
2024-04-07 20:35:22 -04:00