Commit Graph

4433 Commits

Author SHA1 Message Date
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
leopf
815e1a340c GGUF Cleanup - raise if type is not supported (#7194)
* raise if ggml type is unsupported

* test raise
2024-10-21 11:32:11 -04:00
leopf
87877d7a91 GGUF cleanup (#7192)
* cleanup

* remove vocab size hard code
2024-10-21 10:44:54 -04:00
chenyu
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
qazal
7a9f3dea54 assert a schedule double realize (#7178)
* assert this

* maybe use lazycache

* Revert "maybe use lazycache"

This reverts commit 7368102906.

* set enable_cache=True

* assert 1 schedule
2024-10-21 14:16:21 +03:00
George Hotz
be1806df47 fast sym infer [pr] (#7177)
* fast sym infer [pr]

* fix pylint
2024-10-21 17:31:32 +08:00
leopf
b6d9b276bb GGUF support (#7046)
* basic loader, untested

* testing

* remove utils import in test

* q8_0

* q4_1

* end to end testing

* minor cleanup

* fix casting

* moved to state

* move tests

* move dequant to fn

* fix lint elif

* remove gguf from extra

* fix dict union

* q6_k simpler

* naming and spacing

* gpt2-gguf example

* cleanup

* move gguf example

* minor cleanup

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2024-10-21 16:15:34 +08:00
qazal
8074c0ec8f skip test_bfloat16_unary on AMD (#7169) 2024-10-21 01:00:47 +03:00
qazal
713461129b scheduler ast rewrite reorders from big graph [pr] (#7168)
* scheduler ast rewrite reorders from big graph [pr]

* update test_uops.py
2024-10-21 00:47:58 +03:00
qazal
1383df95af track_rewrites by function call [pr] (#7165)
* named track_rewrites [pr]

* group all of create_schedule_with_vars
2024-10-20 17:45:25 +03:00
chenyu
98de58260b simplify valid itself (#7112) 2024-10-19 19:39:25 -04:00
chenyu
f511ad9103 No pyint again (#7156)
* Revert "bring back pyint (#7150)"

This reverts commit 37e83ca6fc.

* remove truncate in const folding

* truncate_output=False
2024-10-19 13:48:59 -04:00
nimlgen
54c6a317f8 test_failure_54 (#7155)
* test_failure_54

* metal
2024-10-18 23:31:18 +03:00
chenyu
37e83ca6fc bring back pyint (#7150)
fixed test_failure_52 and resnet. need to understand this better
2024-10-18 14:54:37 -04:00
George Hotz
b0a13896d7 PtrDType is dataclass [pr] (#7125)
* PtrDType is dataclass [pr]

* new dataset

---------

Co-authored-by: chenyu <chenyu@fastmail.com>
2024-10-18 09:40:33 -04:00
chenyu
ea016b55d1 don't throw in fuzz_linearizer (#7148)
already broken on master and needs fix. don't throw to not block other pr
2024-10-18 09:28:30 -04:00
Bhavya Gada
b7b2017cb9 only ignore warnings not errors (#7146) 2024-10-18 07:41:11 -04:00
ignaciosica
8bcdd7c97d Refactor AMD pm rules to remove handwritten bf16 bool alus (#7136)
* refactor pm rules

- remove unused handwritten methods
- refactor amd pm rules to fix bug with bool alu

* add bf16 bool alu tests

* add bf16 tests

* hotfix: make atol consistent
2024-10-18 09:00:46 +08:00
Bhavya Gada
534597e753 fix all test warnings (#7024)
* fix pytorch warning in nn.conv2d for same padding

* fix future warning in torch load

* fix overflow warning in tensor list test: https://github.com/numpy/numpy/issues/23606#issuecomment-1512752172

* fix floating point warnings in dtype tests using docs https://numpy.org/doc/stable/reference/generated/numpy.errstate.html and a neat solution https://stackoverflow.com/questions/53634965/change-np-seterr-behavior-inside-a-function-only

* put err state in one place; comment taken care of by function hover

* enter np errstate context manager on test setup

* put decorator on class
2024-10-18 08:56:40 +08:00
chenyu
0cd4b93441 remove CStyleLanguage from test_uop_symbolic (#7142) 2024-10-17 19:39:34 -04:00
chenyu
72ed66205d enable test_resnet_half (#7141)
already worked so just fixed the test
2024-10-17 19:02:20 -04:00
chenyu
12ff52b88b test_failure_52 fails on real METAL (#7138) 2024-10-17 15:37:28 -04:00
chenyu
84e98900e8 test linearizer failure 53 (#7137)
variable scope issue caused compile error
2024-10-17 15:23:43 -04:00
nimlgen
45db7d9045 fuzz qcom vs opencl (#7130)
* fuzz qcom vs opencl

* fix nv

* bettre?

* typo

* open both devs
2024-10-17 18:49:08 +03:00
chenyu
287a198c4f increase test_strongly_connected_DAG threshold (#7131)
flaky
2024-10-17 11:08:50 -04:00