Commit Graph

2757 Commits

Author SHA1 Message Date
George Hotz
2cfc7b6695 Index everywhere 2 (#7363)
* indexing everywhere [pr]

* fix tests
2024-10-29 19:29:40 +08:00
qazal
7149eabb34 assert set equality in TestTensorMetadata [pr] (#7364) 2024-10-29 19:29:29 +08:00
qazal
0ebdb136e8 revert metadata with graph_rewrite (#7353) (#7362)
This reverts commit 540e4179e7.
2024-10-29 19:16:31 +08:00
George Hotz
0af1212164 use assertEqual with new style uops [pr] (#7360) 2024-10-29 18:43:21 +08:00
George Hotz
572499c71a add indexing to ops_python (#7358)
* add indexing to ops_python

* fix image
2024-10-29 18:11:03 +08:00
qazal
540e4179e7 global UOp to Metadata mapping + inverse DEBUG=2 metadata order [pr] (#7353)
* add ctx.buf_metadata [pr]

* revert metadata insertion order

* lint rename
2024-10-29 17:12:00 +08:00
George Hotz
2fdfcffe4c improve ci speed [pr] (#7357) 2024-10-29 17:00:35 +08:00
George Hotz
b647fa7514 rename MathTraits to maximum [pr] (#7356) 2024-10-29 16:43:04 +08:00
George Hotz
3989bd2682 idiv + reciprocal [pr] (#7354)
* idiv + reciprocal

* remove upcast from div

* fix docs
2024-10-29 15:54:19 +08:00
George Hotz
d9d4dd6756 faster ci [pr] (#7348) 2024-10-29 14:01:44 +08:00
George Hotz
4cb236a495 index in cstyle (#7328)
* index only in cstyle

* fix prefix dtypes

* fix tests

* global indexing

* Revert "global indexing"

This reverts commit 4d507e8abb.

* fix image

* fix image

* ptx tests

* fix CUDA dtype rendering
2024-10-29 13:06:26 +08:00
George Hotz
4fe1945df6 llvm if load (#7345)
* llvm if load

* unneeded line

* local llvm CI
2024-10-29 11:33:22 +08:00
chenyu
6021bf87f4 unify T = TypeVar("T") (#7342) 2024-10-28 18:43:44 -04:00
chenyu
c398f2467c test uop mul min/max do not have nan in 0*inf (#7340) 2024-10-28 17:52:01 -04:00
chenyu
0843734927 clean up nan handling in transcendental (#7332)
* clean up nan handling in transcendental

* skip remu crash
2024-10-28 16:21:49 -04:00
Sieds Lykles
75dcd98e79 Fix calculation of vmin and vmax in multiplication when one src is negative and the other src has negative min and positive max (#7333)
Co-authored-by: chenyu <chenyu@fastmail.com>
2024-10-28 16:01:46 -04:00
qazal
e46edc22aa use unittest helpers in TestTensorMetadata [pr] (#7329)
* use unittest helpers in TestTensorMetadata [pr]

* fix that

* 5 args
2024-10-28 18:38:30 +08:00
chenyu
cb5702f170 tiny cleanup to transcendental xexp2 (#7326)
also added test for exp and log of nan and inf
2024-10-27 21:54:20 -04:00
chenyu
4c855ae692 unit test transcendental helpers (#7325)
added a test to run UOps with const inputs. seems to have issue with both payne_hanek_reduction and cody_waite_reduction
2024-10-27 19:55:00 -04:00
qazal
8d9459f281 always run process replay with contextvars (#7323)
* always run process replay with contextvars [pr]

* not the last two

* extra

* no pr
2024-10-27 20:44:42 +02:00
talati
d4d201d87b fixing branch condition on UOps.IF in the ptx renderer (#7315)
* fixing branch condition on UOps.IF in the ptx renderer

* ptx works

---------

Co-authored-by: Nick Talati <nick.talati@quantworks.com>
Co-authored-by: qazal <77887910+Qazalin@users.noreply.github.com>
Co-authored-by: qazal <qazal.software@gmail.com>
2024-10-27 14:27:38 +02:00
qazal
a410b46c1d unskip test_gated_store_with_if [pr] (#7319) 2024-10-27 14:03:12 +02: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
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
nimlgen
293714610a capture beam log runtime errors (#7311) 2024-10-26 13:59:45 +03:00
nimlgen
3c62315aa8 add resnet pf (#7310)
* add resnet pf

* all platforms
2024-10-26 13:20:32 +03: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
aadf688aeb order flipper as *normal* rewrite rule (#7300)
* instant isn't actually used [pr]

* order flipper as *normal* rewrite rule

* fix inf loop

* need simplify now
2024-10-25 21:28:30 +08:00
George Hotz
3c31497f55 instant isn't actually used [pr] (#7299)
* instant isn't actually used [pr]

* tolerance bump
2024-10-25 21:01:29 +08:00
George Hotz
199a991237 line reduction [pr] (#7296) 2024-10-25 17:05:09 +07: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
George Hotz
004af512e6 try all matches in the function (#7288) 2024-10-25 14:17:04 +08:00
chenyu
90f720d703 limit idiv by neg bound to only if s0 is non-negative [pr] (#7277)
also updated the tests when div by negative const
2024-10-24 15:46:50 -04:00
chenyu
b777cfdcba update test_max_simplify_and_cancel (#7270)
it's fixed and no longer dumb
2024-10-24 10:29:05 -04:00
George Hotz
9a3d498d9c with commutative hack, uops can change. fix that (#7266)
* with commutative hack, uops can change. fix that

* simpler
2024-10-24 18:50:23 +08:00
qazal
d482d927a8 hotfix: nobody uses [run_process_replay] [pr] (#7264) 2024-10-24 13:37:29 +03:00
George Hotz
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
George Hotz
532b7b018c add smin/smax (#7253)
* add smin/smax

* don't create var with var

* better test errors

* add failing test

* enable shape simplification

* fix tests

* Update view.py

* simpler and simplify
2024-10-24 16:10:49 +08:00
George Hotz
b1a30677fe add some tiny tests that should pass everywhere [pr] (#7254) 2024-10-24 14:38:46 +08:00
George Hotz
63048ad880 don't recreate COMMUTATIVE the other way (#7255)
* don't recreate COMMUTATIVE the other way

* add shl and add passing test

* fix tests and move assignment to __new__

* that can stay there

* happy mypy
2024-10-24 14:38:29 +08:00
qazal
aeeb917b6e mask out writable bufs in runtime access_resources (#7234) 2024-10-23 16:13:50 +03:00
qazal
d2b608233a get outbufs by globals idxs [pr] (#7233) 2024-10-23 16:06:35 +03:00
chenyu
f890d1cbbd remove PUSH_PERMUTES from external_test_opt (#7232)
remove old comments and update kernel count for test_convnext
2024-10-23 00:11:34 -04:00
chenyu
e90bbe6bbc failed test cases for 3+ views shapetracker strides (#7226) 2024-10-22 18:49:13 -04:00
qazal
dae908299e full_ast_rewrite api with ScheduleItemContext (#7223) 2024-10-22 23:17:05 +03:00
qazal
2083ac0b4c generic small graph sink -> ScheduleItem pattern matcher [pr] (#7221) 2024-10-22 20:20:26 +03:00
George Hotz
4013c9848c don't use tons of memory for tests non CI [pr] (#7209)
* don't use tons of memory for tests

* fix import and clean up pre-commit

* use pathlib

* no shm on windows

* Revert "use pathlib"

This reverts commit 7c38489820.

* run pre-commit hooks in test

* ugh, fix later
2024-10-22 15:04:51 +08:00
George Hotz
be64ac417e move GGUF test to it's own file [pr] (#7208)
* move GGUF test to it's own file [pr]

* skip tests if modules aren't installed
2024-10-22 13:24:55 +08:00
chenyu
f37e6b453b load_gguf -> gguf_load in doc and test (#7199) 2024-10-21 14:03:33 -04:00