Commit Graph
1105 Commits
Author SHA1 Message Date
qazalandGitHub ceda43ce75 always swizzle load st in wmma [pr] (#7908) 2024-11-26 20:00:58 +08:00
qazalandGitHub 5b2c03e865 defer realize folding to kernel splitting [pr] (#7849)
* defer realize folding to schedule breaking [pr]

* this is init

* p2

* need to lookup edges

* refactor image cast folding [pr]

* Ops.LOAD diff

* image works

* refactor can_pad

* fix fold_img_cast
2024-11-23 14:29:14 +08:00
chenyuandGitHub a352a6938f simplify group_for_reduces in get_index [pr] (#7851)
what was that
2024-11-22 11:53:21 -05:00
chenyuandGitHub af5d77f684 move sint_to_uop from view.py to ops.py [pr] (#7848)
both sint and uop are in ops.py
2024-11-22 11:15:02 -05:00
chenyuandGitHub f6d1201c48 variable_to_uop -> sint_to_uop [pr] (#7847)
and added type to it
2024-11-22 10:54:59 -05:00
George HotzandGitHub c5d458ce02 BufferSpec and ProgramSpec [pr] (#7814)
* BufferSpec and ProgramSpec [pr]

* delete preallocate, it's unused

* Revert "delete preallocate, it's unused"

This reverts commit dcfcfaccde.
2024-11-21 12:18:05 +08:00
f02462c5cb swizzle tc [pr] (#7633)
* swizzle tc draft

* further cleanup

* hotfix: remove typing from fix_st and cleanup

* hotfix: revert cache property (moved into separate pr)

* hotfix

* hotfix: rename

* take patterns from schedule

* hotfix: rename vars

* hotfix

* no more view of store

* hotfix: linter

* as view is only used for tc fix up and tc is only enabled for LOAD, remove valid an preload from pm rule

- also remove inner simplify in fix_st

* add typing to fix_st

---------

Co-authored-by: qazal <[email protected]>
2024-11-18 21:08:21 +08:00
597a239e28 Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725)
* remove unaryops

* remove ternaryops

* remove metaops

* hotfix

* remove binaryops

* hotfix: test_pattern_matcher

---------

Co-authored-by: qazal <[email protected]>
2024-11-16 20:56:56 +08:00
Roelof van DijkandGitHub e75a855f51 refactor: efficient syntax [pr] (#7673) 2024-11-13 11:08:48 -05:00
Roelof van DijkandGitHub 433ebecee7 refactor: double if statement [pr] (#7674) 2024-11-13 11:06:59 -05:00
George HotzandGitHub 4f1f823021 add tiny test for randomness + remove ulong buffers (#7648)
* add tiny test for randomness

* Tensor._device_seeds is a Tuple

* no tuple, just a 2 element tensor

* no more longs

* fix tests, and maybe ocelot works now

* NV still doesn't work. cleanup rules

* test + two more rules
2024-11-12 12:45:52 +08:00
qazalandGitHub 9d6b03d691 early assert swizzle in kernel [pr] (#7610)
* early assert swizzle in kernel [pr]

* better

* note changes

* TestIndexing 2
2024-11-09 21:54:43 +08:00
qazalandGitHub 773b036c61 share can_pad in ops [pr] (#7550) 2024-11-05 17:58:50 +08:00
George HotzandGitHub 075bdb81b3 remove Ops.REDUCE (#7541) 2024-11-05 09:41:28 +08:00
George HotzandGitHub ab14fc1f5b GroupOp.Irreducible [pr] (#7540) 2024-11-05 09:35:34 +08:00
George HotzandGitHub d30537494a remove do_reduce [pr] (#7536) 2024-11-05 01:46:11 +08:00
George HotzandGitHub cb57774b64 pre index load and store [pr] (#7535)
* pre index load and store [pr]

* check ptrtype
2024-11-05 01:21:14 +08:00
George HotzandGitHub 76cc59940d only match with op, not arg [pr] (#7534) 2024-11-05 00:43:17 +08:00
George HotzandGitHub 99bd4372a5 Ops.ALU is no more, the arg is just an op (#7525)
* op arg alu [pr]

* more

* more passing

* fix more tests

* more tests passing

* fix single failing test

* so much cleaner

* noop to not have process replay trigger

* fix ptx
2024-11-05 00:22:22 +08:00
George HotzandGitHub e2204378d9 more GroupOp [pr] (#7524) 2024-11-04 18:40:06 +08:00
George HotzandGitHub c1585bcc9e flatten ops (#7523)
* flatten ops

* fix mypy
2024-11-04 18:07:23 +08:00
bac251d2c1 idx_load_store in lowerer [pr] (#7477)
* idx_load_store in lowerer [pr]

* fix tests (#7513)

Co-authored-by: John Doe <[email protected]>

* work

---------

Co-authored-by: Carl Basho <[email protected]>
Co-authored-by: John Doe <[email protected]>
2024-11-04 10:18:40 +08:00
chenyuandGitHub 7758f7211b Revert "s/UPat/Pat (#7506)" [pr] (#7517)
* Revert "s/UPat/Pat (#7506)"

This reverts commit 400011a8c1.

* fix
2024-11-03 16:33:02 -05:00
chenyuandGitHub 400011a8c1 s/UPat/Pat (#7506) 2024-11-03 08:26:19 -05:00
qazalandGitHub 37f8578953 s/BUFFER_UOPS/BUFOPS (#7501) 2024-11-03 10:17:33 +02:00
George HotzandGitHub c8bf09b7d4 s/UOps/Ops (#7500)
* s/UOps/Ops [pr]

* fix
2024-11-03 11:26:10 +08:00
George HotzandGitHub 06f476b371 late transcendental (#7498) 2024-11-03 10:53:58 +08:00
chenyuandGitHub baaec39ffc update get_transcendental_patterns [pr] (#7489)
i think ths is better than `(p[0], cast(Callable, p[1]))`
2024-11-02 14:25:31 -04:00
chenyuandGitHub 55bd136746 clean up reshape_and_permute (#7488)
probably will rewrite it later as reshape and permute function on Kernel, but for now it's shorter with better types
2024-11-02 13:44:14 -04:00
chenyuandGitHub 74c7b9d84a clean up Kernel.name (#7486)
* clean up Kernel.name

* narrow that str
2024-11-02 12:48:37 -04:00
ignaciosicaandGitHub 18bd98c203 Add shl and shr to llvmir (#7449)
* add shl and shr to llvmir

* hotfix: enforce type alignment for shr and shl in all backends

* hotfix: change shl and shr spec

* hotfix: typo

* hotfix: refactor shl and shr rules and add casting to ptx shl

* hotfix: bug

* hotfix: ptx shl and shr require buint32

* hotfix: cleanups
2024-11-01 23:49:34 +08:00
George HotzandGitHub fe78ed8cb7 improve match speed [pr] (#7465)
* improve match speed [pr]

* no sym in expand

* remove useless rule, sym back

* don't track that
2024-11-01 17:33:53 +08:00
George HotzandGitHub a7ba3d2d91 move reduce to lowerer [pr] (#7462)
* move reduce to lowerer [pr]

* simpler
2024-11-01 16:39:20 +08:00
George HotzandGitHub 2cfca230b5 reduce collapse as a rule (#7464)
* reduce collapse as a rule

* better [pr]

* cleaner
2024-11-01 16:25:44 +08:00
George HotzandGitHub 4f6cf1f8cc expand DEFINE_ACC [pr] (#7461) 2024-11-01 15:20:43 +08:00
chenyuandGitHub a21434504b update payne_hanek_reduction [pr] (#7455) 2024-10-31 18:41:22 -04:00
chenyuandGitHub 5777fca904 clean up cody_waite_reduction magic numbers (#7452) 2024-10-31 14:45:04 -04:00
chenyuandGitHub 5648b9788e more xlog2 cleanups (#7451)
following the notations in the paper closer
2024-10-31 13:52:31 -04:00
chenyuandGitHub 4065c3dec8 remove special 0 case in frexp (#7450)
we can safely assume input is non-zero, also removed unneeded bitcast
2024-10-31 13:02:33 -04:00
chenyuandGitHub 53db3478fe cast to float32 for float16 xlog2 (#7447)
formula has 2X error with denormal floats
2024-10-31 10:36:29 -04:00
chenyuandGitHub 5085b2fde7 cleanup xlog2 and remove unneeded functions (#7446)
denormal_map still looks wrong but a lot cleaner
2024-10-31 09:45:16 -04:00
chenyuandGitHub 02636bc05e simpler switch over in xsin (#7426) 2024-10-31 08:56:01 -04:00
George HotzandGitHub a43b7a4b7c less rewrite stages in matcher (#7445)
* less rewrite stages in matcher

* better name
2024-10-31 19:45:21 +08:00
George HotzandGitHub 5dd1ffd5d0 don't const rewrite in cstyle (#7442)
* don't const rewrite in cstyle

* Update cstyle.py

* simple_symbolic

* fix bfloat16 const on AMD
2024-10-31 19:16:49 +08:00
George HotzandGitHub 50ddd11350 lil cleanup matchers [pr] (#7437)
* move delete_redundant_gates [pr]

* simpler uops test

* addr in delete_redundant_gates

* lines

* correct early delete gates

* shorter find_gate
2024-10-31 17:52:22 +08:00
George HotzandGitHub 2e3048fc57 Revert "improve full_graph_rewrite matchers for speed (#7431)" (#7434)
This reverts commit 996152d2de.
2024-10-31 16:16:47 +08:00
George HotzandGitHub 996152d2de improve full_graph_rewrite matchers for speed (#7431)
* remove finalize [pr]

* early transcendental

* fix tests

* load store indexing runs with devectorize

* move delete_redundant_gates

* ptx has to wait for the mask to move
2024-10-31 16:13:11 +08:00
George HotzandGitHub 17c9a9fde4 pm_render [pr] (#7430)
* pm_render [pr]

* test fixes

* use gep, not src

* ptx only symbolic, not sym

* move cast rules
2024-10-31 15:04:50 +08:00
George HotzandGitHub 8fff8fc3e7 replace REDUCE and clean up arange (#7429)
* break apart arange [pr]

* fix missing

* cleanups to add/mul

* UOps.VECTORIZE

* don't vectorize const
2024-10-31 14:02:20 +08:00
George HotzandGitHub fe2bc4c613 clean up arange/indexing matchers [pr] (#7427)
* clean up arange/indexing matchers [pr]

* syntax for assign
2024-10-31 12:12:44 +08:00