Commit Graph
3664 Commits
Author SHA1 Message Date
George HotzandGitHub 4df4845b47 cache is_int [run_process_replay] (#6131)
* cache is_int [run_process_replay]

* functools.cached_property is pretty slow
2024-08-17 00:19:03 -07:00
George HotzandGitHub 3a2d724cb2 extra matcher from renderer [run_process_replay] (#6130)
* extra matcher from renderer

* cache_pm [run_process_replay]
2024-08-16 23:53:11 -07:00
George HotzandGitHub 9bc81c6db4 UOps.SHAPETRACKER (#6129)
* UOps.SHAPETRACKER [run_process_replay]

* no process replay
2024-08-16 23:26:34 -07:00
George HotzandGitHub 5048066e79 st_arg, never -1 [run_process_replay] (#6128) 2024-08-16 22:46:56 -07:00
geohot 9e6ad4b40f hotfix: free minor speedup 2024-08-16 21:08:03 -07:00
George HotzandGitHub d9cb45af09 only axis is masked [run_process_replay] (#6123) 2024-08-16 21:01:17 -07:00
George HotzandGitHub 94aa5f11b5 Revert "use vmax for real_size [run_process_replay] (#6120)" (#6122)
This reverts commit a6e3211444.
2024-08-16 20:33:19 -07:00
George HotzandGitHub a6e3211444 use vmax for real_size [run_process_replay] (#6120)
* use vmax for real_size [run_process_replay]

* axis is masked
2024-08-16 20:17:23 -07:00
George HotzandGitHub 912f01ed4b UOpGraph -> linearize_uop [run_process_replay] (#6119) 2024-08-16 19:48:39 -07:00
George HotzandGitHub 7cae152aa2 move uop logic into shapetracker [run_process_replay] (#6118) 2024-08-16 17:47:15 -07:00
George HotzandGitHub 89c7989659 no shapetracker in ops [run_process_replay] (#6117) 2024-08-16 17:23:27 -07:00
George HotzandGitHub 74ee9febec remove iter from uopgraph (#6110)
* remove iter from uopgraph

* linearize returns uops

* fix tests

* linearize in linearize

* tests fix

* touchup

* test failures
2024-08-16 15:58:29 -07:00
28c75bf2a6 merge uops with ops (#6111)
Co-authored-by: chenyu <[email protected]>
2024-08-16 18:17:57 -04:00
chenyuandGitHub 379d080e74 tqdm touchup (#6113)
more precise names and don't repeat set_description
2024-08-16 17:34:21 -04:00
nimlgenandGitHub 5f1554b574 amd fix uaf in program (#6114)
* amd fix uaf in program

* keep it align

* sync before free
2024-08-17 00:22:46 +03:00
qazalandGitHub c23d44c779 AST is UOp (#6030)
* most of the work from the uops2 branch

* schedule

* realize

* kernel

* lowerer

* search

* green

* merge uops with ops

* Revert "merge uops with ops"

This reverts commit 1408a59f12.

* fix benchmark

* remove extra dedup
2024-08-16 22:09:00 +03:00
George HotzandGitHub d6f64c0c1f do better image indexing [run_process_replay] (#6109)
* do better image indexing [run_process_replay]

* fix tests
2024-08-16 09:55:22 -07:00
38fb1e14a2 Intel XMX Tensor Core Support (#5622)
* fixed xmx demo

* i think i'm invoking the DPAS but it's slow

* compiler build arg to stop register spilling, indicated where to fix flop counter

* don't mind this

* do NOT mind me

* do not mind me

* do not view

* i will add bf16 later

* in process of figuring out tc fields

* we figured out the fields!!!

* added check for cl device vendor, added seperate IntelRenderer

* remove tc thread_local_aliases

* cleaning debris before draft pr

* edits for linter

* deduping and checking device extensions

* i will find more line reductions in other places

* before merge upstream

* double grf size in compiler to fix register spilling (bandaid), device checking changes

* tc python emulation

* fixed emulation

* tests for emulated intel tensor core

* TC=0, 1 working on upstream, fixed perf

* test

* debris

* check for specialized cl device when we canonicalize device

* bf16 support, tc=3 test added

* address tests

* revert half2 loads on intel tc, cleanup

* linter

* fold_expanded revert

* lint, whitespace fix

* cuda bf16 (only one with bf16) is skipped in test tensor cores, so i will skip for intel bf16 too

* make line shorter, no need for noqa E501

* removed device intel

* fix python emulation

---------

Co-authored-by: George Hotz <[email protected]>
2024-08-16 09:19:21 -07:00
George HotzandGitHub f82ecd8802 remove uop symobilc rendering [run_process_replay] (#6108) 2024-08-16 09:02:15 -07:00
qazalandGitHub 1ff6c7c519 add more types to search [run_process_replay] (#6096)
* add more types to search [run_process_replay]

* bufs_from_lin
2024-08-16 13:19:25 +03:00
chenyuandGitHub e5da88873b enable UOP_IS_SYMBOLIC (#5954) 2024-08-16 00:15:46 -04:00
George HotzandGitHub 553ae9ebc0 bilinear interp uint8 fails (#6103)
* new test for e2e compile failures

* fix bug

* bilinear interp uint8 fails

* better tests
2024-08-15 19:34:39 -07:00
George HotzandGitHub c850e03758 new test for e2e compile failures (#6101)
* new test for e2e compile failures

* fix bug
2024-08-15 18:56:22 -07:00
chenyuandGitHub e4a7869893 move cancel mod pattern into mod_folding (#6100)
changed some kernel in a good way because x does not go through add chain
2024-08-15 19:04:18 -04:00
qazalandGitHub 11d62668a3 refactor ast ops dtype access [run_process_replay] (#6093)
* refactor ast ops dtype access [run_process_replay]

* fix assert message
2024-08-15 19:13:33 +03:00
chenyuandGitHub 9ef82e1f2b UOp pattern DEFINE_VAR with min==max is also CONST (#6095)
* UOp pattern DEFINE_VAR with min==max is also CONST

* fix tests
2024-08-15 12:09:44 -04:00
qazalandGitHub 25dffb2079 kernel.py more typing [run_process_replay] (#6092) 2024-08-15 17:59:24 +03:00
qazalandGitHub 4d38fec8c1 rename lazyops to parents [run_process_replay] (#6091) 2024-08-15 17:27:32 +03:00
chenyuandGitHub 5accfe26a0 rewrite bool ADD to OR and MUL to AND (#6084)
* rewrite bool ADD to OR and MUL to AND

fixed running `tinyphysics.onnx`, which contains a getitem from a boolean tensor.

only can repro through BEAM_COMPARE, which i think is a different bug in test_linearizer_failure

* fold those, and fix tests

* only for bool

* move dtypes.bool
2024-08-15 10:11:57 -04:00
nimlgenandGitHub b765996d54 hcq remove offset from progs (#6090) 2024-08-15 17:02:54 +03:00
chenyuandGitHub df03dca6e3 move % inside UOp mod_folding and remove deprecated tests (#6085)
[run_process_replay]
2024-08-14 23:25:10 -04:00
George HotzandGitHub c6e117c899 add a single py.typed (#6083) 2024-08-14 17:31:46 -07:00
chenyuandGitHub 95aa6d8ccd remove redundant x/c pattern [run_process_replay] (#6082)
there's no div and 1/c is const folded
2024-08-14 16:57:39 -04:00
chenyuandGitHub a61cb1ff7c move mod mod pattern into generic mod folding (#6077) 2024-08-14 16:24:21 -04:00
George HotzandGitHub 64563abc90 add LSTMCell to nn (#6080)
* add LSTMCell to nn

* lstmcell works with no input on first

* fix no bias 0

* simpler
2024-08-14 12:08:42 -07:00
nimlgenandGitHub 7ab531aede autogen cleanup (#6064)
* start autogen cleanup

* nvgpu

* better?

* better

* amd part

* gpu regen

* fix mockgpu amd

* nv

* amd fix linter

* remove import

* ugh

* nv on master

* amd on master
2024-08-14 20:20:35 +03:00
chenyuandGitHub de773b593e remove redundant div gcd patterns [run_process_replay] (#6076)
covered by generic div_folding
2024-08-14 13:18:28 -04:00
2dc586ffe5 Shape change bitcast for more dtypes (#6047)
* bitcast & tests

* use to_dtype

* put disk tensor tests back

* tests

* bitmask

* no bitmask

---------

Co-authored-by: George Hotz <[email protected]>
2024-08-14 10:03:34 -07:00
George HotzandGitHub e039b2a920 add Tensor.clamp and fix bool loading (#6069) 2024-08-13 15:26:40 -07:00
chenyuandGitHub 1782e4f64d use div folding to do lt folding (#6065) 2024-08-13 16:59:05 -04:00
chenyuandGitHub e3af273fa1 touchup cl_errors (#6058)
* touchup cl_errors

* update test
2024-08-13 13:06:59 -04:00
qazalandGitHub 9145ad52ff revert UOps eq, this needs to be isolated in realize.py (#6063)
This reverts commit dccca7f227.
2024-08-13 18:02:34 +03:00
nimlgenandGitHub fa84e6ec48 init hcq args state (#6046)
* init hcq args state

* cleaner

* amd

* fillargs

* fixes

* myoy

* docs

* fix

* not needed

* spacing
2024-08-13 17:11:58 +03:00
andredapratoandGitHub 18192079a9 Apply transcendental rewrite rules only if required by backend (#6061)
* Apply transcendental folding for missing ops

* Remove comments

* Remove Final type
2024-08-12 22:38:45 -07:00
Tobias FischerandGitHub 6e3eb50fd1 added fix and reg tests (#6060) 2024-08-12 21:00:48 -04:00
chenyuandGitHub 45bd667a78 rewrite pyint after first rewrite [run_process_replay] (#6059) 2024-08-12 19:18:13 -04:00
qazalandGitHub 2ac80576e4 remove BufferOps from log_lazybuffer (#6057)
this is fine because lazy.py doesn't create BufferOps.
2024-08-13 02:06:47 +03:00
qazalandGitHub dccca7f227 test: uop and lazyop have the same compare (#6053)
* test: uop and lazyop have the same compare

* typings

* self.assert_equiv_uops -> assertEqual

* hash dtype

* test nop too

* TestPatternMatcher never used this compare anyway

* nop eq and ne tests
2024-08-13 00:33:19 +03:00
qazalandGitHub 8c501272f3 proposal: MetaOps.EXT (#6054)
`MetaOps.CUSTOM, MetaOps.COPY, MetaOps.EMPTY, MetaOps.VIEW` don't fit into any of our existing UOps.

MetaOps.KERNEL and MetaOps.EXT can be the two paths in realize.py

after AST is UOp:
MetaOps.KERNEL -> UOps.SINK
MetaOps.EXT -> UOps.EXT
2024-08-13 00:29:29 +03:00
wozeparrotandGitHub 059cf2a90d feat: autogen from kernel register offset headers (#6056) 2024-08-12 14:08:35 -07:00