Commit Graph

6468 Commits

Author SHA1 Message Date
George Hotz
415186da3c Revert "some rules to simplify max (#7258)" (#7260)
This reverts commit b56fab54ea.
2024-10-24 17:15:52 +08:00
qazal
93934c2160 early assert cyclic read [pr] (#7259)
* early assert cyclic read [pr]

* misc
2024-10-24 11:51:12 +03:00
George Hotz
b56fab54ea some rules to simplify max (#7258) 2024-10-24 16:27:21 +08:00
George Hotz
a7be9dfd71 leftover lru_cache on UPat [pr] (#7257)
* leftover lru_cache on UPat [pr]

* fix mypy
2024-10-24 16:11:24 +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
de7b9d7c42 improve pre-commit [pr] (#7256)
* improve pre-commit [pr]

* mypy passes on windows
2024-10-24 15:38:47 +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
George Hotz
1315b8909a strict mode triggers on beam timeout [pr] (#7250) 2024-10-24 11:37:57 +08:00
George Hotz
9f32a6f496 Revert "move metal tc check to renderer [pr] (#7248)" (#7251)
This reverts commit 72ddcdb4d1.
2024-10-24 10:57:09 +08:00
George Hotz
72ddcdb4d1 move metal tc check to renderer [pr] (#7248) 2024-10-24 10:38:57 +08:00
chenyu
451c043552 narrow return type of bool, int, float on UOp [pr] (#7246) 2024-10-23 21:06:43 -04:00
chenyu
9f370cccb3 minor cleanups in apply_opt [pr] (#7243) 2024-10-23 18:21:00 -04:00
qazal
65bbafe3e2 bfs refactors from the big graph branch [pr] (#7235) 2024-10-23 23:24:31 +03:00
nimlgen
ea11382087 nv fix shared_memory_size (#7239) 2024-10-23 21:59:47 +03:00
qazal
ca7b2658b9 start with a fresh ScheduleItemContext in process_replay [pr] (#7236) 2024-10-23 18:01:50 +03:00
qazal
ca6c58527b dfs append_bufs (#7224)
* dfs append_bufs

* fix test_linearizer
2024-10-23 17:14:51 +03: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
qazal
9a2718b30b proposal: add UOps.PRELOAD (#7220) 2024-10-23 10:23:52 +03:00
qazal
3ce1c69c9c split to get_realizes [pr] (#7225) 2024-10-23 10:22:36 +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
24e2442a89 minor tweak to real_strides [pr] (#7230)
only graph_rewrite once on idx (sholuld be idempotent), and always rewrite valid. will co-rewrite idx and valid next
2024-10-22 22:05:57 -04:00
chenyu
169cc348fe move valid related functions to ops.py [pr] (#7229) 2024-10-22 21:10:12 -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
7e36e1d2bb LAZYCACHE to context var [pr] (#7222) 2024-10-22 20:36:06 +03:00
qazal
2083ac0b4c generic small graph sink -> ScheduleItem pattern matcher [pr] (#7221) 2024-10-22 20:20:26 +03:00
qazal
4916095124 compute ScheduleItem writable bufs [pr] (#7214)
* compute ScheduleItem writable bufs [pr]

* don't cache Buffer
2024-10-22 19:02:29 +03:00
qazal
24ed2ed6c8 refactor to ScheduleItemContext [pr] (#7217) 2024-10-22 17:58:06 +03:00
chenyu
7ce12a4b06 fix typing in simplify_valid [pr] (#7216) 2024-10-22 10:01:33 -04:00
nimlgen
cef7078c14 nv limit mappings debug (#7215) 2024-10-22 16:41:43 +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
4438d6a467 Tensor.from_url API [pr] (#7210)
* Tensor.fetch API [pr]

* update docs

* from_url
2024-10-22 14:54:17 +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
George Hotz
ccf4843945 use substitute instead of replace_uop [pr] (#7207) 2024-10-22 13:24:38 +08:00
George Hotz
3b4587fbf9 no need to DEFINE_VAR arg sort [pr] (#7206) 2024-10-22 12:17:50 +08:00
nimlgen
21acfc39d4 qcom cleanup allocs (#7200)
* qcom cleanup allocs

* oops
2024-10-21 23:20:15 +03:00
chenyu
f37e6b453b load_gguf -> gguf_load in doc and test (#7199) 2024-10-21 14:03:33 -04:00
chenyu
f93bd9e2b9 ggml_data_to_tensor touchups (#7196)
* ggml_data_to_tensor touchups

tiny reordering and variable name changes

* return type

* pylint
2024-10-21 13:29:59 -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
qazal
bc9eb324dc group stores by buffer uops [pr] (#7190)
* group stores by buffer uops [pr]

* dedup
2024-10-21 18:04:44 +03: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
chenyu
abd99bb744 unwrap2 is not used (#7187) 2024-10-21 09:40:15 -04:00
qazal
37b829ef0d track metadata with uops [pr] (#7188) 2024-10-21 16:35:46 +03:00
ignaciosica
5551cf6689 add rlshift and rrshift special methods (#7185) 2024-10-21 08:37:02 -04:00
qazal
8f375b71c5 post-schedule lazybuf from Buffer [pr] (#7170) 2024-10-21 15:11:32 +03: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
31fcccc779 hotfix: flip if order 2024-10-21 17:34:23 +08:00