George Hotz
a4dab3ec3f
add name uop ( #9149 )
...
* add name uop, TODO: refactor renderer to use
* renderer uses name uop
* fix tests
* render
* ptx
2025-02-18 15:26:58 +08:00
George Hotz
df3b320f46
rewriter -> devectorizer [pr] ( #9147 )
2025-02-18 12:42:08 +08:00
quortus
638d925e4e
Prevent const folding in test_payne_hanek_reduction ( #9088 )
...
* Prevent const folding in test_payne_hanek_reduction
* Do not use list as a default parameter
2025-02-17 17:31:10 +08:00
chenyu
a092b6395d
Tuple -> tuple, List -> list [pr] ( #8936 )
2025-02-06 14:21:19 -05:00
qazal
ba17786068
do not construct unmasked VALID ( #8759 )
...
* new lines that exist in codegen/ops
* update tests
* update sops.gz (13071 -> 13070 asts)
* fix viz too
* remove that TODO
* diff pruning
* mask assert + device
* work
* diff pruning
* re: fix viz too
---------
Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com >
2025-01-28 20:51:21 +02:00
George Hotz
98d01a059d
rename uopgraph to rewriter [pr] ( #8682 )
2025-01-19 17:03:12 -08:00
qazal
a70d1bf439
move print_diff to process replay [pr] ( #8566 )
...
* move print_diff to process replay [pr]
* ruff rightfully complians
2025-01-11 09:28:45 -05:00
George Hotz
e276b6eecd
use Tensor.replace [pr] ( #8455 )
2024-12-30 23:20:46 -05:00
George Hotz
205befa788
move is_dtype_supported to device [pr] ( #7575 )
2024-11-07 20:38:03 +08:00
George Hotz
bac251d2c1
idx_load_store in lowerer [pr] ( #7477 )
...
* idx_load_store in lowerer [pr]
* fix tests (#7513 )
Co-authored-by: John Doe <null@mail.com >
* work
---------
Co-authored-by: Carl Basho <76494676+oldpondplop@users.noreply.github.com >
Co-authored-by: John Doe <null@mail.com >
2024-11-04 10:18:40 +08:00
chenyu
df49439b9a
remove reassoc from LLVM flags ( #7512 )
...
reassoc reorders compute and breaks transcendental
2024-11-03 13:11:56 -05:00
George Hotz
c8bf09b7d4
s/UOps/Ops ( #7500 )
...
* s/UOps/Ops [pr]
* fix
2024-11-03 11:26:10 +08:00
George Hotz
a7ba3d2d91
move reduce to lowerer [pr] ( #7462 )
...
* move reduce to lowerer [pr]
* simpler
2024-11-01 16:39:20 +08:00
George Hotz
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
chenyu
16e60d25b9
move polyN to helper [pr] ( #7405 )
...
also move `eval_uop` to `test.helpers`
2024-10-30 10:09:57 -04:00
George Hotz
0af1212164
use assertEqual with new style uops [pr] ( #7360 )
2024-10-29 18:43:21 +08:00
chenyu
6021bf87f4
unify T = TypeVar("T") ( #7342 )
2024-10-28 18:43:44 -04: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
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
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
3169cb386d
remove graph [pr] ( #7085 )
2024-10-16 11:40:07 +08:00
qazal
09de958855
move print_diff to test/helpers ( #7071 )
2024-10-15 22:00:39 +03:00
George Hotz
85a45164fb
remove pyint [pr] ( #7016 )
...
* remove pyint
* bump time on tp [pr]
* dont truncate in const fold
* remove dead code
* Revert "dont truncate in const fold"
This reverts commit 29c81db0f7 .
* remove define_var
2024-10-12 22:36:24 +08:00
George Hotz
a71bb09ec3
remove symbolic file [pr] ( #7012 )
2024-10-12 18:44:44 +08:00
qazal
982086f54c
UOps.VALID try 2 ( #6623 )
...
* make UOps.VALID compile
* fixable tests
* bufs dedup
* cleanup the CONST spec
* regenerate dataset with graph_rewrite
```py
def rewrite_const(const:UOp, st_src:UOp) -> UOp:
st: ShapeTracker = st_src.arg
return UOp(UOps.VALID, dtypes.bool, (st.to_uop(),)).where(UOp.const(const.dtype, const.arg), UOp.const(const.dtype, 0))
pm = PatternMatcher([(UPat(UOps.CONST, name="const", src=(UPat(UOps.SHAPETRACKER, name="st_src"),)), rewrite_const)])
```
* rm arg
* remove arg
* revert arg removal
This reverts commit 2c35c75c95 .
* red test_pickle_define_var
2024-09-21 14:19:25 +08:00
George Hotz
dbd4536167
Revert "add UOps.VALID ( #6387 )" ( #6441 )
...
This reverts commit 8186e4e7d6 .
2024-09-09 21:33:00 +08:00
George Hotz
8186e4e7d6
add UOps.VALID ( #6387 )
...
* uops valid
* broke full_shape
* fixup that st (hardcoded asts still red)
* fixup DEFINE_VAR
debug
more debug
* start moving stuff to ast_const
* move test_linearizer
* move test_linearizer_failures to ast_const
* fixup test_schedule
* small diff change
* regenerate dataset
* fixup test_multitensor
* regen dataset try 2
---------
Co-authored-by: qazal <qazal.software@gmail.com >
2024-09-09 16:58:43 +08:00
qazal
442150a8df
more ast_const for hardcoding consts [run_process_replay] ( #6418 )
2024-09-09 11:35:08 +08:00
qazal
935b4ddff6
use ast_const in test_linearizer asts [run_process_replay] ( #6407 )
2024-09-09 08:46:58 +08:00
qazal
e7f6b654ad
cleanup uop eq asserts for swizzle [run_process_replay] ( #6362 )
...
* cleanup uop eq asserts for swizzle [run_process_replay]
* more stuff
2024-09-05 13:36:36 +08:00
qazal
539654fbe1
graph_rewrite complexity tests [run_process_replay] ( #6317 )
2024-08-29 22:39:08 +03:00
qazal
3b8cc5a3e0
more multireduce tests prep for neg removal [run_process_replay] ( #6220 )
2024-08-21 12:45:24 +03:00
qazal
28c75bf2a6
merge uops with ops ( #6111 )
...
Co-authored-by: chenyu <chenyu@fastmail.com >
2024-08-16 18:17:57 -04:00
qazal
2bf7b56485
minor test fixups from the AST is UOp diff ( #6081 )
...
* add assert_equiv_uops cache
* dont expect lowering and schedule errors
2024-08-14 23:58:04 +03:00
qazal
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
qazal
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
chenyu
7ce716b3a0
bigint -> pyint [run_process_replay] ( #6040 )
...
it's a python int. priority should be higher than bool, but we are not using it in type promo now.
2024-08-12 09:12:23 -04:00
qazal
b918e3c255
cache assert_equiv_uops ( #6033 )
2024-08-11 12:17:05 +03:00
chenyu
794796256c
UOp.const_factor [run_process_replay] ( #5945 )
...
* UOp.const_factor [run_process_replay]
simplify mod and div folding
* test does not work now
2024-08-06 18:18:29 -04:00
chenyu
4a65010de8
remove CUDACPU flag in tests [run_process_replay] ( #5902 )
...
no longer used
2024-08-04 16:06:38 -04:00
chenyu
d5de44340e
UOp add mod folding ( #5862 )
...
* UOp add mod folding
* that passes now
2024-08-02 18:31:46 -04:00
George Hotz
e8191479a3
add bigint type for indexing [run_process_replay] ( #5387 )
2024-07-11 11:37:10 -07:00
chenyu
5b8fda3c65
fix: JIT=0 means no JIT ( #5188 )
2024-06-27 10:31:37 -04:00
qazal
24c89a2a33
move assert_equiv_uops to helpers + use == for dtypes ( #5067 )
...
* dtypes should use ==
* use TestUOps
* should use assertIs
2024-06-20 16:39:34 +03:00
chenyu
67e8df4969
remove numpy from dtype ( #4969 )
...
replaced all dtype.np with _to_np_dtype defined in tensor.py.
after this, the only numpy usages are (1) Tensor(np.ndarray), (2) construct .numpy() output, (3) numpy random buffer
2024-06-14 15:38:45 -04:00
nimlgen
654a8b9ef7
retire hsa ( #4885 )
...
* retire hsa
* EMULATE_AMD
2024-06-09 11:33:03 +03:00
Szymon Ożóg
84255069e7
Fix int8 and uint8 on PTX ( #4711 )
...
* Fix mem type for uchar
* Bring tests back
2024-05-24 11:08:52 -04:00
nimlgen
eb9689336e
nv mockgpu ( #4600 )
...
* mockgpu nv
* works
* comment that out
* fix merge
* setup gpuocelot
* install packages
* not run all of them
* passes
* fix ci
* almost
* should pass
* linter
* linter 2
* try this?
* ugn, not supported
* ci
* remove ticket from description
* better descs
2024-05-15 23:46:08 +03:00
nimlgen
9b02aef45a
remove rhip ( #4579 )
...
* remove rhip
* remove hip runner
2024-05-14 17:58:19 +03:00
nimlgen
2131556c2c
amd mockgpu ( #4535 )
...
* start mock amd gpu
* virt files
* cleaner
* init ci
* small fixes
* linter
* better?
* ugh
* linter
* fix
* diable some
* run shorter
* fixes
* add hcq test
* fix
* fix cmd revert
2024-05-14 14:28:04 +03:00