geohot
0b00981cd1
fix wmma
2025-10-15 09:38:07 +08:00
geohot
5d485660da
reproed failure in emulation
2025-10-15 09:19:56 +08:00
geohot
0e06b5cbb6
support emulate in the NullDevice
2025-10-15 09:11:57 +08:00
George Hotz and GitHub
3a4a3e09ea
Merge branch 'master' into new_shape
2025-10-14 21:16:44 +08:00
chenyu and GitHub
70dd297a05
BS=96 for bert ( #12675 )
...
96 trains fine now
2025-10-14 09:07:43 -04:00
geohot
3b0b3dcff3
oops, i didn't mean to change that
2025-10-14 20:12:47 +08:00
geohot
accee5d840
hack for 3 op assign
2025-10-14 20:10:53 +08:00
geohot
e6812bbe63
one less st
2025-10-14 19:54:37 +08:00
geohot
18a6492e98
test is broken
2025-10-14 19:50:17 +08:00
geohot
9723b4f1c1
close
2025-10-14 19:46:52 +08:00
Sieds Lykles and GitHub
852d80dff9
better where on load folding ( #12651 )
...
* move where clauses to load
* shorten line
* drop clauses if they are duplicated
* add rule for swapped where branch
* where on ungated load
* dont move clause if load is in the clause
* parse_valid returns None
* no data dependent branches
* fix rule
* enable swapped rule
* remove those
2025-10-14 13:30:47 +02:00
geohot
07162df323
size doesn't use st
2025-10-14 19:30:24 +08:00
geohot
7a2e206a0d
fix tests
2025-10-14 19:22:16 +08:00
nimlgen and GitHub
c7e63601fd
gfx1200 tc for AMD_LLVM ( #12673 )
2025-10-14 19:17:48 +08:00
George Hotz and GitHub
61855c24a8
Merge branch 'master' into new_shape
2025-10-14 19:15:09 +08:00
George Hotz and GitHub
db4a359374
fix up some slow tests that launch python ( #12672 )
...
* fix up some slow tests that launch python
* svd nonfull in parallel
* split test_advancedindex
2025-10-14 19:13:55 +08:00
geohot
28076d9270
const uses _shape
2025-10-14 19:12:03 +08:00
nimlgen and GitHub
4918c827c2
amd: lib_gpu does not need cpu_access ( #12670 )
2025-10-14 18:34:34 +08:00
nimlgen and GitHub
0c9d47deab
hcq: add alignment to kernargs ( #12669 )
2025-10-14 18:33:12 +08:00
geohot
d51cae1396
shape is good
2025-10-14 18:28:00 +08:00
geohot
0b69698ad4
mostly works
2025-10-14 18:19:02 +08:00
qazal and GitHub
d3bfcd3277
minor patches for SQTT over usb on gfx12 ( #12627 )
...
* disable cpu_access in the sqtt buffer allocation
not sure if this is required, it results in a very slow call to
pcie_mem_write over USB GPU, removing it worked fine.
* fix itrace_se_mask on gfx12
on gfx11 it gave 6 se, on gfx11 this value is 2 so no instructions were
traced.
* Revert "fix itrace_se_mask on gfx12"
This reverts commit 0644adbcd1 .
2025-10-14 18:07:46 +08:00
Sieds Lykles and GitHub
1e6e5a0efd
parse_valid returns None instead of raising (#12663 )
...
* parse_valid returns None
* change there too
2025-10-14 11:57:38 +02:00
geohot
04ead92ebd
_shape is like _device
2025-10-14 17:53:17 +08:00
qazal and GitHub
471bd30d16
cleanup viz/serve.py ( #12665 )
...
* use load_pickle
* update comment
2025-10-14 17:50:39 +08:00
geohot
faddebef07
need to cache it
2025-10-14 17:35:29 +08:00
geohot
a659cb18a4
all mops
2025-10-14 17:24:08 +08:00
geohot
8721b6884c
more mops
2025-10-14 17:20:04 +08:00
geohot
59512a49fa
reshape causing issues
2025-10-14 16:59:25 +08:00
geohot
a73b59caa2
work on shape property
2025-10-14 16:50:43 +08:00
George Hotz and GitHub
fb61f3519f
remove assign contiguous hack ( #12659 )
...
* remove assign contiguous hack
* remove bad contiguous usage in torch backend
* assign
2025-10-14 16:42:14 +08:00
George Hotz and GitHub
30ee7c4c26
cleanup Device usage in Tensor ( #12662 )
2025-10-14 16:22:22 +08:00
Sieds Lykles and GitHub
e06cbfcb8a
combine pm_drop_and_clauses ( #12660 )
...
* combine those
* wino kernels decreased
2025-10-14 10:09:41 +02:00
George Hotz and GitHub
84d4589ed4
remove pylint from pre-commit and CI ( #12658 )
...
* remove pylint from pre-commit and CI
* multidevice test is fast
* faster pre-commit
* 8 is faster than 4
* better name
* how did that typecheck?
2025-10-14 15:39:59 +08:00
qazal and GitHub
8ecaf839e2
cleanup UOp tracing [pr] ( #12657 )
2025-10-14 14:50:59 +08:00
George Hotz and GitHub
b9eb5b5d49
clean up the LLM tokenizer ( #12653 )
...
* clean up the LLM tokenizer
* simple tokenizer is actually simple
* ugh write good code
2025-10-14 14:22:01 +08:00
qazal and GitHub
a9ef93176f
viz: add colored text helper ( #12654 )
2025-10-14 13:05:26 +08:00
George Hotz and GitHub
ecdc7539a2
add typing to MathTraits ( #12650 )
...
* add typing to MathTraits
* fix assign
2025-10-14 12:35:20 +08:00
qazal and GitHub
9bf032de69
viz: keep focused shape in view ( #12648 )
2025-10-14 10:49:08 +08:00
chenyu and GitHub
77b5e6774e
fix bert training config ( #12647 )
...
FREE_INTERMEDIATE=0 REWRITE_STACK_LIMIT=500000
2025-10-13 15:03:47 -04:00
nimlgen and GitHub
f1041dc0ac
pylint 4.0.0 ( #12642 )
...
* cpu: fix spacing
* fix pylint
* fix pylint
* pylint 4.0.0
* lambda
* keep eval for now
* im so sorry
2025-10-13 23:28:36 +08:00
wozeparrot and GitHub
47e0c43976
feat: Tensor.{load, store} ( #12629 )
2025-10-13 08:04:41 -07:00
chenyu and GitHub
0f776c6e46
examples/mlperf/training_submission_v6.0 ( #12644 )
...
copied from v5.1
2025-10-13 09:58:25 -04:00
Sieds Lykles and GitHub
e0139fafc1
UOp symbolic tests use eval to check against string ( #12643 )
2025-10-13 14:19:42 +02:00
218225e8d0
pylint error ( #12630 )
...
Co-authored-by: wozeparrot <[email protected] >
2025-10-13 05:05:12 -07:00
nimlgen and GitHub
9096d7cc2e
amd: support for rx9060 ( #12640 )
2025-10-13 19:44:15 +08:00
qazal and GitHub
066d25f5fb
refactor to trace_num property in buffers ( #12638 )
2025-10-13 18:06:55 +08:00
qazal and GitHub
cd6aeebfee
sqtt: osx decoder installer ( #12637 )
2025-10-13 17:26:12 +08:00
Sieds Lykles and GitHub
e537e895b1
drop unused invalid conditions ( #12635 )
...
* drop where conditions if the ranges are not used inside the index
* remove allow_any_len
2025-10-13 10:52:21 +02:00
wozeparrot and GitHub
9ab06dffad
hotfix: block from env ( #12628 )
2025-10-12 08:07:32 -07:00
wozeparrot and GitHub
12435a2dab
actual tinyfs device ( #12620 )
2025-10-12 07:51:17 -07:00
chenyu and GitHub
8f5f57c7d9
smaller CNT fuzz shapetracker ( #12626 )
2025-10-12 08:52:30 -04:00
George Hotz and GitHub
1ecf403294
cleanup long lines [pr] ( #12623 )
...
* cleanup long lines
* more
* a few more
* all noqa fixed
* fix amd + cuda
* clean that up
2025-10-12 20:18:05 +08:00
qazal and GitHub
fd51ecf983
process_replay for get_rangeify_map ( #12624 )
2025-10-12 15:14:40 +03:00
qazal and GitHub
b5afa3848e
viz: fix memory graph total nbytes ( #12622 )
...
* viz: fix memory graph total nbytes
* post increment
* simple regression test
* loop with markers + slightly off text baseline
* cpu events clear
2025-10-12 14:32:46 +03:00
nimlgen and GitHub
822eab057f
cpu: respect taskset + allow all cores ( #12619 )
...
* cpu: account taskset + allow all cores
* spaces
2025-10-12 14:31:40 +08:00
chenyu and GitHub
7ac74d1550
remove unused type ignore [pr] ( #12618 )
2025-10-11 21:24:04 -04:00
Sieds Lykles and GitHub
772a8dfe31
reshape uses valid when simplifying ( #12597 )
...
* reshape uses valid when simplifying
* try with IGNORE_OOB=0
* is it this test?
* skipif gpuocelot
2025-10-11 17:02:54 +02:00
nimlgen and GitHub
08e62454b6
amd: use cpu_view() in sqtt ( #12610 )
2025-10-11 18:11:25 +08:00
Sieds Lykles and GitHub
a2ae56674a
uop_given_valid try multiple clauses (#12615 )
...
* uop_given_valid uses less simplify
* enable test
* try all expressions together
* enable test
2025-10-11 11:53:42 +02:00
Sieds Lykles and GitHub
dccdd190aa
uop_given_valid uses less simplify ( #12612 )
...
* uop_given_valid uses less simplify
* enable test
2025-10-11 10:57:39 +02:00
qazal and GitHub
9205527db0
viz: draw highlights above shapes ( #12613 )
2025-10-11 11:39:13 +03:00
George Hotz and GitHub
cab034b863
improve typing ( #12611 )
...
* improve typing and bump to 3.11
* no need for Self yet
* improve typing
* binop also
2025-10-11 16:20:23 +08:00
Sieds Lykles and GitHub
4300ebc455
cache apply_movement_op ( #12609 )
...
* cache apply_movement_op
* pyling and clear cache
* fix types
* ignore
* cleanup
2025-10-11 08:53:10 +02:00
George Hotz and GitHub
7596c1b8f5
TestOuterworldReduce works ( #12608 )
2025-10-10 20:06:41 +08:00
chenyu and GitHub
001b3710d3
enable some test_ops tests ( #12607 )
2025-10-10 07:23:21 -04:00
qazal and GitHub
a62dc9ceb5
viz: light up buffer path ( #12603 )
2025-10-10 14:07:30 +03:00
qazal and GitHub
464c56862f
viz: update ansi regex ( #12605 )
...
* viz: update ansi regex
* better
* add ansi_colors_light
* javascript
2025-10-10 13:58:58 +03:00
George Hotz and GitHub
ac96d98745
GROUP_REDUCE is now bright RED instead of green ( #12604 )
2025-10-10 18:23:57 +08:00
nimlgen and GitHub
89be3590aa
amd: sqtt on gfx12 ( #12564 )
...
* amd: sqtt on gfx12
* cleaner
* thi
* and this
* ops
* ugh
* back
* rm this
* rm
2025-10-10 17:54:14 +08:00
chenyu and GitHub
95ad047445
do not use sint_to_uop in renderer [pr] ( #12601 )
2025-10-10 05:29:10 -04:00
Sieds Lykles and GitHub
e625c27598
update min step times openpilot ( #12600 )
2025-10-10 11:24:27 +02:00
nimlgen and GitHub
6ec96f6088
amd: remove dup flags in sqtt ( #12595 )
2025-10-10 17:23:33 +08:00
wozeparrot and GitHub
9471157346
feat: bump llvm version ( #12598 )
2025-10-10 02:20:22 -07:00
qazal and GitHub
36c753bd63
viz: switch llvm mca info to tabulate ( #12596 )
2025-10-10 11:54:34 +03:00
qazal and GitHub
b27470b6db
viz: add buffer details in the timeline sidebar ( #12591 )
2025-10-10 11:36:08 +03:00
chenyu and GitHub
03ef5197fc
move get_contraction to helpers [pr] ( #12594 )
2025-10-10 04:28:57 -04:00
Sieds Lykles and GitHub
965bd194f2
uop_given_valid cleanup ( #12592 )
...
* cleanup
* cleanup there
2025-10-10 10:18:53 +02:00
chenyu and GitHub
af90dc00de
remove some View add logic [pr] ( #12584 )
...
no longer simplify the case of v0+v1 where v0 has a mask
2025-10-10 03:47:56 -04:00
wozeparrot and GitHub
f12e2a75db
feat: add thunderkittens ( #12590 )
2025-10-10 00:32:33 -07:00
qazal and GitHub
caae46cfba
fix process replay progress update ( #12587 )
2025-10-10 10:20:55 +03:00
nimlgen and GitHub
1309cea247
rocprof parser in extra ( #12569 )
...
* rocprof parser
* viewer
* vw
* skip
2025-10-10 14:56:42 +08:00
Sieds Lykles and GitHub
cbdc13279d
fix openpilot gated reads ( #12570 )
...
* fix gated image counts
* slice correctly
2025-10-10 04:52:57 +02:00
chenyu and GitHub
c8dfd10257
ShapeTracker.real_strides -> is_expanded [pr] ( #12579 )
...
only keep the used part
2025-10-09 22:52:45 -04:00
qazal and GitHub
88ce63a49a
remove outdated comment in multi [pr] ( #12580 )
2025-10-10 05:50:49 +03:00
George Hotz and GitHub
5977df267f
outerworld uses expand ( #12578 )
2025-10-10 10:25:25 +08:00
chenyu and GitHub
f2c3a72b0c
remove RANGEIFY flag [pr] ( #12577 )
2025-10-09 21:52:54 -04:00
geohot
9b66c2b0b7
fix weekly commits table (i didn't know we linted extra)
2025-10-10 09:23:33 +08:00
geohot
658b96cbfb
weekly commits table
2025-10-10 09:15:41 +08:00
qazal and GitHub
b86ad6053a
test_schedule independent of RANGEIFY flag ( #12568 )
...
* test_schedule independent of RANGEIFY flag
* comment for expectedFailure + test_cast_padded_view
* test_cast_padded_const works
* don't use full_shape it's fine
* add todos for the rest
2025-10-09 20:00:50 +03:00
nimlgen and GitHub
502e613c9c
amd: clean up uppercased vars ( #12571 )
2025-10-09 19:39:27 +08:00
George Hotz and GitHub
840d2bf1ea
fix div rules ( #12567 )
...
* group div rules
* merge those pattern matchers
* revert
2025-10-09 19:28:21 +08:00
nimlgen and GitHub
8a1c3dc1bf
amd: use soc headers from rocm ( #12566 )
2025-10-09 19:10:46 +08:00
qazal and GitHub
e0694fdb8e
remove UPat.__repr__ [pr] ( #12565 )
2025-10-09 12:35:34 +03:00
chenyu and GitHub
678f83e41b
delete ShapeTracker to_valid_uop and substitute [pr] ( #12563 )
2025-10-09 05:06:10 -04:00
nimlgen and GitHub
a11b686c71
amd: sqtt for all gfx11 ( #12546 )
...
* amd: general sqtt for gfx11
* target
* ops
* no gfx12 here
2025-10-09 17:04:06 +08:00
chenyu and GitHub
a0cbbc35ad
remove LLAMA_LAYERS in ci ( #12562 )
2025-10-09 04:46:41 -04:00
chenyu and GitHub
fe94453d52
delete CONTIGUOUS with RANGE in st [pr] ( #12561 )
2025-10-09 04:32:31 -04:00
chenyu and GitHub
f793cdeb87
clean up shape changing logic to not use st [pr] ( #12560 )
2025-10-09 04:13:02 -04:00
chenyu and GitHub
1bcea19846
remove ShapeTracker.reduce [pr] ( #12559 )
2025-10-09 03:54:11 -04:00
chenyu and GitHub
c1cc277fc3
don't call src[0].shape multiple times in MULTI st [pr] ( #12558 )
2025-10-09 03:40:17 -04:00
qazal and GitHub
2551a60d97
viz: split out shape links ( #12557 )
2025-10-09 10:34:55 +03:00
George Hotz and GitHub
e7aa26ed29
make remove bufferize fast ( #12555 )
...
* add more uop gc test
* make remove bufferize fast
* substitute is fast too
* fix tests
2025-10-09 15:20:02 +08:00
chenyu and GitHub
cf8232ec6a
clean up more RANGEIFY flag ( #12556 )
2025-10-09 03:06:48 -04:00
nimlgen and GitHub
658c566e22
vars in gated_read_image_count ( #12486 )
...
* vars in gated_read_image_count
* nc
2025-10-09 14:54:15 +08:00
George Hotz and GitHub
a8a9ac0e95
add more uop gc test ( #12553 )
2025-10-09 14:49:32 +08:00
chenyu and GitHub
250f05a776
run some hashing test only on METAL ( #12554 )
...
quite slow on CPU
2025-10-09 02:39:49 -04:00
qazal and GitHub
da9425c1a7
viz: sum all buffers in zoomed out memory graph ( #11898 )
...
* viz: switch to transformation matrix
* simpler axes domains
* less domain
* split loops
* flatten
* tiny rects
* solid proxy but still too big
* cache FileNotFound
* gridlines instead of padding
* not this
* like METAL -> METAL memory -> graph
* less colors
* better
* more grid work
* glitch
* clamp
* add range index
* pixel grids
* set min width
* y cords
* pruning
* test: clip in world units
* keep linear scan
* switch to interval tree
* fps counter
* work
* visible is the easiest
* shapes api
* math
* test bitgrid
* checkout
* work
* simpler
* work
* draw
* it's just a polygon
* merge polygons
* cleanup old stuff
* switch to hashmap there too
* add tooltips
* fix that
* better color
* better
2025-10-09 09:30:37 +03:00
chenyu and GitHub
ae51bdd06a
remove trivial use of RANGEIFY flag ( #12550 )
...
some tests need update still
2025-10-09 02:29:38 -04:00
George Hotz and GitHub
80d99d52a5
reduce_unparented only checks ranges ( #12548 )
2025-10-09 14:14:03 +08:00
nimlgen and GitHub
375ee2c576
faster backward_slice ( #12515 )
...
* not cached backward_slice
* mypy
* just speed
* faster
2025-10-09 14:12:20 +08:00
George Hotz and GitHub
1dc500426e
remove restrictions on range ending in indexing ( #12543 )
...
* remove restrictions on range ending in indexing
* early simplify
* Revert "early simplify"
This reverts commit 657d9972c2 .
* disable const folding tests
2025-10-09 13:53:08 +08:00
chenyu and GitHub
585bd95b50
fix ruff 0.14.0 [pr] ( #12547 )
2025-10-09 01:52:30 -04:00
qazal and GitHub
6af29b913b
viz: format rewrite time as a comment ( #12545 )
...
* viz: format rewrite time as a comment
* put above
2025-10-09 07:14:27 +03:00
qazal and GitHub
baab7e334d
put match times in viz ( #12544 )
...
* put match times in viz
* float
2025-10-09 06:56:10 +03:00
George Hotz and GitHub
51420d1f99
rangeify profiling ( #12540 )
...
* clean up stable diffusion weight loading
* add profiling to run_rangeify
* fix tests
2025-10-09 11:32:34 +08:00
chenyu and GitHub
43bce1f39f
delete View minify [pr] ( #12538 )
2025-10-08 23:25:53 -04:00
qazal and GitHub
9f9a8b0b5b
viz: fix tiny device linking ( #12541 )
2025-10-09 06:25:33 +03:00
George Hotz and GitHub
6e6059dde0
clean up stable diffusion weight loading ( #12452 )
2025-10-09 11:13:11 +08:00
chenyu and GitHub
20d98b19c3
delete more unused ShapeTracker stuff ( #12536 )
2025-10-08 23:09:44 -04:00
qazal and GitHub
bb5671a837
some more ops.py cleanups ( #12525 )
...
* remove GroupOp.Meta and st_arg
* inline axis_arg
* only allow .buffer on reshapes (or the buffer)
* gate is the other way
* still want can_pad?
* use op_in_backward_slice_with_self
* .buffer is recursive
* lint
* pathlib there
2025-10-09 06:06:44 +03:00
chenyu and GitHub
be05028419
move ASSERT_MIN_STEP_TIME to compile3 ( #12535 )
...
threshold is current time +20%
2025-10-08 22:16:59 -04:00
George Hotz and GitHub
615ec6acf0
refactor to apply_movement_op ( #12533 )
...
* refactor to apply_movement_op
* new pm_mops is fine
* make mypy happy
* cleanup apply_movement_op function
2025-10-09 10:16:09 +08:00
chenyu and GitHub
c4732a18bd
update tests that depend on SPLIT_REDUCEOP ( #12534 )
2025-10-08 21:53:30 -04:00
chenyu and GitHub
5986d656a2
tighter ASSERT_MIN_STEP_TIME ( #12531 )
...
set to about 1.2x of actual time now
2025-10-08 21:22:54 -04:00
George Hotz and GitHub
fc2bd53700
chatgpt nits ( #12529 )
...
* tsink_base wasn't needed
* nits from chatgpt
2025-10-09 07:34:44 +08:00
nimlgen and GitHub
89ec2b3a74
memory: move bump allocator ( #12505 )
2025-10-08 23:12:04 +08:00
George Hotz and GitHub
84fc34b274
tsink_base wasn't needed ( #12528 )
2025-10-08 22:46:06 +08:00
chenyu and GitHub
28edea5d67
delete FUSE_CONV_BW ( #12527 )
2025-10-08 10:41:38 -04:00
George Hotz and GitHub
2653147cb7
delete the lowerer ( #12526 )
2025-10-08 21:58:18 +08:00
George Hotz and GitHub
0774575442
delete the old rangeify path and all the children stuff ( #12524 )
...
* delete the old rangeify path and all the children stuff
* remove the on_stack stuff and any retries
* don't use the p word
* Revert "remove the on_stack stuff and any retries"
This reverts commit 49a2b328b9 .
2025-10-08 21:24:04 +08:00
Rudeus and GitHub
a65ec5c693
fix fromarray depreceation ( #12512 )
2025-10-08 09:13:26 -04:00
qazal and GitHub
b6835f4134
remove Ops.VIEW and related UOp methods ( #12522 )
...
* remove Ops.VIEW and related UOp methods
* update abstractions2.py
* no ShapeTrackers in abstractions2.py
* it's a size 1
2025-10-08 14:47:02 +03:00
George Hotz and GitHub
3b0b3a2e64
fast RANGEIFY ( #12504 )
...
* rtoposort is fast, can replace rangeify with this
* fast rangeify
* work
* fast rangeify works for mnist
* should work
* progress
* pad fix
* FAST
* tests passing
* don't delete those shape ops
* put in rangeify map
* ending ranges fix
* tests
* mstack/mselect no hacks
* move to indexing.py
* touch up tests + add comments
* disable failing test
* actually make the file readable
* failing
* error
2025-10-08 19:38:06 +08:00
qazal and GitHub
9448924d9e
update gpt2 kernel count tests in CI=0 ( #12523 )
2025-10-08 14:29:11 +03:00
qazal and GitHub
c5a1f9f5f9
no ShapeTrackers in multi.py ( #12521 )
...
* switch multi to all movement ops
* inline dvars
2025-10-08 14:04:05 +03:00
chenyu and GitHub
ee0382ad99
remove ShapeTracker.invert ( #12520 )
2025-10-08 18:37:34 +08:00
chenyu and GitHub
d5058427ea
remove ShapeTracker.real_size ( #12519 )
2025-10-08 06:15:29 -04:00
qazal and GitHub
6f26603f06
delete swizzler.py ( #12518 )
...
* delete swizzler
* remove merge_views tests
* don't need rewrites_for_views
* apply_rewrites
2025-10-08 13:02:34 +03:00
qazal and GitHub
7e0b14243e
delete grouper and kernelize ( #12517 )
...
* delete grouper and kernelize
* +sys.setrecursionlimit
2025-10-08 12:27:26 +03:00
chenyu and GitHub
942022c309
smaller LLAMA_LAYER in Test llama 3 training ( #12516 )
...
very slow now
2025-10-08 05:10:51 -04:00
chenyu and GitHub
e701106a64
remove FUSE_ARANGE ( #12511 )
...
it was the default already
2025-10-08 04:54:07 -04:00
qazal and GitHub
291a19650b
move Kernel dataclass to rangeify ( #12510 )
2025-10-08 11:30:06 +03:00
qazal and GitHub
ad49f8148b
switch process_replay to rangeify ( #12509 )
2025-10-08 11:26:43 +03:00
chenyu and GitHub
da1f46ff3f
remove RANGEIFY specific test jobs ( #12507 )
2025-10-08 04:12:04 -04:00
1e567a5cf8
make RANGEIFY=1 the default ( #12161 )
...
Co-authored-by: chenyu <[email protected] >
Co-authored-by: Sieds Lykles <[email protected] >
Co-authored-by: qazal <[email protected] >
2025-10-08 03:46:09 -04:00
nimlgen and GitHub
9e7103647d
amd: rename cmd_id to sqtt_next_cmd_id ( #12503 )
...
* amd: rename cmd_id to sqtt_next_cmd_id
* and typo
2025-10-08 15:16:19 +08:00
nimlgen and GitHub
4a756a37d8
amd: support rocm7 ( #12502 )
...
* amd: support rocm7
* mock
2025-10-08 14:30:39 +08:00
qazal and GitHub
60b6dca5ba
update some tests instead of expect_rangeify_fails ( #12500 )
...
* update test_clone_doesnt_dedup to use base
* new_flat_buffer passes
* fix test_reorder_expand
* remove the view stuff
* remove that test, we don't want this view const behavior
* test_setitem_becomes_subbuffer is good
2025-10-08 07:42:31 +03:00
qazal and GitHub
84597ed53c
early assert for device mistmatched asts in rangeify ( #12499 )
...
* early assert for device mistmatched asts in rangeify
* alt also passes
2025-10-08 07:19:36 +03:00
qazal and GitHub
2e19354c1c
viz: reorder timeline graphs ( #12498 )
...
* viz: reorder timeline graphs
* update test_viz with the new order
2025-10-08 07:10:23 +03:00
George Hotz and GitHub
d06226b575
fix SPEC and all_tensors iterator ( #12496 )
2025-10-07 23:18:17 -04:00
qazal and GitHub
a7cb80bfab
use recursive_property in UOp device ( #12477 )
...
* simple failing test with RecursionError
* switch to @recursive_property
* merge 2
* diff
2025-10-08 06:15:05 +03:00
George Hotz and GitHub
a6d59a0b45
backward_slice to get srcs recursively ( #12494 )
...
* change name to backward_slice
* faster check
* clean up comments and names
* comment
2025-10-08 10:31:42 +08:00
chenyu and GitHub
eb3bc277b3
remove ASSERT_MIN_STEP_TIME in external_benchmark_openpilot ( #12495 )
...
should add for compile3 and compile 3 only
2025-10-07 22:13:42 -04:00
qazal and GitHub
239f9a3029
update viz to not use children [pr] ( #12493 )
2025-10-08 04:35:01 +03:00
Sieds Lykles and GitHub
b465c17b56
Revert "UOp.factor and add chain sorting ( #12413 )" ( #12492 )
...
This reverts commit e74be4a140 .
2025-10-08 03:20:23 +02:00
George Hotz and GitHub
945cc46475
delete children tracking from uop ( #12491 )
...
* delete children tracking from uop
* uop children no longer exists
* no tracked children
* that test is flaky too
2025-10-08 09:04:14 +08:00
nimlgen and GitHub
648e5bb223
hcq: do not raise when fini ( #12487 )
...
* hcq: do not raise when fini
* Revert "hcq: do not raise when fini"
This reverts commit 44af5f7d05 .
* this way
* runtime is fine
* nn
2025-10-07 23:27:03 +08:00
George Hotz and GitHub
a2345787b9
parents is faster than sparents ( #12490 )
2025-10-07 21:31:50 +08:00
George Hotz and GitHub
12c4963489
add more rangeify pm tests ( #12488 )
2025-10-07 05:45:38 -04:00
George Hotz and GitHub
403fdfcfd4
check spec in test, cleanup vectorize render ( #12484 )
2025-10-07 17:05:50 +08:00
qazal and GitHub
22674798df
assert correctness in test_permuted_assignment [pr] ( #12483 )
2025-10-07 11:42:22 +03:00
George Hotz and GitHub
75ce11593c
test_reshape_match should match ( #12479 )
2025-10-07 16:07:21 +08:00
chenyu and GitHub
fe774a4319
more skip WINO on benchmark ( #12482 )
2025-10-07 03:43:51 -04:00
chenyu and GitHub
8ad5f9e74f
skip slow benchmarks ( #12481 )
...
* skip slow benchmarks
padded tc is already slow, rest are slow with rangeify (correct if run locally)
* relax more
2025-10-07 03:28:56 -04:00
George Hotz and GitHub
ea7672931f
fix test_matmul_relu_cat ( #12478 )
2025-10-07 02:32:23 -04:00
George Hotz and GitHub
514d2a0774
merge tagless reshapes ( #12474 )
...
* merge tagless reshapes
* cleanup
2025-10-07 13:57:58 +08:00
chenyu and GitHub
7b48f3cc45
failed test case repro for openpilot model ( #12475 )
...
* failed test case repro for openpilot model
* assertEqual
2025-10-07 13:46:43 +08:00
chenyu and GitHub
a5484b767e
remove skipping cast in simplify_valid [pr] ( #12472 )
...
* remove skipping cast in simplify_valid [pr]
unsupported statements are handled in uop_given_valid already. the test failed because (100%x) somehow got simplified
* better test
2025-10-07 00:10:04 -04:00
George Hotz and GitHub
b4509fba31
thundermittens ( #12471 )
...
* thundermittens
* give device a type
2025-10-07 11:47:39 +08:00
George Hotz and GitHub
0f25b4b289
move frontend dir to nn [pr] ( #12470 )
2025-10-07 10:42:22 +08:00
qazal and GitHub
f664bcc8bd
use recursive_property in UOp tracing ( #12469 )
...
* test
* simple passing
2025-10-06 21:10:52 +03:00
qazal and GitHub
1af05dae77
fix rangeify in compile4.py ( #12467 )
...
* fix rangeify in compile4.py
* fix type_verify
2025-10-06 13:37:46 +03:00
qazal and GitHub
76e8a3250c
rangeify: late zero folding ( #12464 )
...
* rangeify: late zero folding
* early
* not kernels
* none
* multi
* linter
* mstack is sink comment
* more comment
2025-10-06 12:52:33 +03:00
George Hotz and GitHub
0c015a24fe
use recursive_property to prevent RecursionError ( #12465 )
...
* use recursive_property to prevent RecursionError
* not slower
* fix tests
* faster
* simpler
2025-10-06 15:59:18 +08:00
chenyu and GitHub
a1881b0c17
update test_chicken ( #12466 )
...
logits are close, just numerical
2025-10-06 03:58:44 -04:00
qazal and GitHub
1b1978b9c0
early copy fixup ( #12463 )
...
* simple failing test
* early copy fixup
2025-10-06 06:38:29 +03:00
chenyu and GitHub
c1e85f699c
multi test case for sharded ring allreduce ( #12462 )
...
* multi test case for sharded ring allreduce
triggers `children not making progress` with RANGEIFY
* expect_rangeify_fails
2025-10-05 23:18:24 -04:00
chenyu and GitHub
1823a5043f
don't check MAX_BUFFER_SIZE on NULL ( #12461 )
2025-10-05 22:09:29 -04:00
George Hotz and GitHub
46e8ea15c1
split pm_substitute_recurse ( #12460 )
2025-10-05 21:35:50 -04:00
nimlgen and GitHub
1216fff781
remote: raise runtimeerror in checkz ( #12453 )
2025-10-05 21:22:53 +08:00
qazal and GitHub
6ad9a688ed
add failing test after "pend substitutes for speed" ( #12457 )
...
* add failing substitute test
* expect_rangeify_fails
2025-10-05 16:10:04 +03:00
chenyu and GitHub
74b04f7dca
test beautiful_mnist_multigpu ( #12455 )
...
* test beautiful_mnist_multigpu
another example that fails with RANGEIFY
* now i remember
* MAX_BUFFER_SIZE=0
2025-10-05 08:45:01 -04:00
69857d0ab0
Stable Diffusion mlperf training ( #11304 )
...
* entrypoint for sd mlperf train development
* match sd-v2 mlperf reference unet
* implement dataloader from mlperf ref
* update dataloader reference
* implement LambdaLR scheduler from mlperf ref
* match tokenizer from mlperf reference
* sample latent
* add noise to latent
* complete training epoch
* run full training step
* jit training loop
* replicate mlperf ref. losses over 11 train steps
* save tinygrad loss checkpoints properly
* match out.2.bias.grad to reference
* match weights to ref after 1 step
* compare out.2.bias to ref over three train steps
* implement attn_mask; cleanup closeness testing
* correct mse loss
* update dev_run / dependencies
* setup validation config/checkpointing
* implement validation sampling
* test closeness of eval denoise step to mlperf ref
* test closeness of decoder to mlperf ref
* confirm inception matches mlperf ref
* resize w/ bicubic interpolation, test closeness
* confirm closeness of clip preprocess to mlperf ref
* confirm clip score matches mlperf ref
* confirm fid/clip scores match mlperf ref
* cleanup
* cleanup
* zero-init some unet params as in mlperf reference
* revert jit change
* uncomment dependencies
* move to tinybox red
* implement GradScaler from torch but jittable
* simplify lr_scheduler, ensure jittability
* instantiate GradScaler
* only check if grads are finite with fp16
* implement fp16 training loop
* refactor UNet: norm, gelu, mixed precision
* refactor clip_tokenizer to enable versioning
* make fp16 attention closer to torch
* remove comparisons to torch fp16 attention
* add globvars.py for reference
* confirm closeness of fp16 unet forward to mlperf
* test norm closeness to torch with precast
* remeasure e2e with master attention
* more detailed softmax upcast comparison to torch
* parameterize softmax upcast in attention and unet
* use fp32 weights with autocast to fp16
* cleanup
* add data/checkpoint download script
* debug kernel timeout on AMD
* fix finite grads check; start multigpu
* pass numpy arrays from dataloader
* include text encoder in jit train step
* use int32 for tokens instead of int64
* prevent multi bug in reshape within clip
* corealize more, del refs before
* add more logging and wandb
* use erf gelu in clip encoder
* minor changes to train step and logging
* save checkpoints for eval or resuming
* add eval-only logic to training script
* multigpu eval
* remove PARALLEL=0
* cleanup
* pad eval batches of size < EVAL_BS
* workaround silent multigpu bug in jit
* cleanup
* tokenize captions
* verify correctness of multigpu eval
* cleanup
* verify correctness of grads in train step
* verify correctness of training (20 steps)
* don't shard in the training jit
* training settings
* minor cleanup
* overfit train w/ eval on 6 samples
* offload to enable combined train and eval
* download to raid; use local rclone
* misc changes for mi300x / logging
* refactor eval for larger BS, verify correctness
* cleanup
* ckpt resuming and remove eval cats
* eval BEAM config on mi300x and red
* resume eval after crash
* confirm eval correctness (one iteration, 6 samples)
* verify eval correctness at full scale
* cleanup correctness testing
* training correctness (20 steps, BS=248 uniform)
* cleanup
* remove eval cache at end of run
* switch f16 for bf16, del grad scaler
* confirm bf16 training correctness
* timestamps, new jits
* merge jits in training
* realize loss/lr on CPU
* training correctness
* post-bf16 train/eval
* implement grad_acc with timing/logging
* beam offline; debug gradacc; use float32
* fix gradacc in jit, correctness test
* prepare f32 BS=512 gradacc=4 run
* workaround jit problem in diffusion eval
* scale lr by BS
* revert gradacc, prepare bf16 BS=336 lr*=BS train
* make checkpointing faster
* resume bf16 BS=336 base_lr=1.25e-7 run
* jit ckpt at beginning
* don't alloc more gpu mem in ckpt
* cleanup
* move script to mi300x dir
* cleanup
* cleanup unneeded files
* revert beam search to master
* minor changes
* fix regression: realize before assign in eval
* cleanup mlperf SD data/ckpt downloads
* workaround BEAM failure
* workaround bug in Tensor.stack
* minor changes
* revert gradscaler
* cleanup
* cleanup/validate dataloader
* ensure checksum of laion data
* simplify config
* load training state to jitted bufs
* simplify lr scheduler
* simplify train script
* cleanup comments
* refactor stable diffusion/unet init
* more refactoring of stable diffusion init
* fix import errors in tests
* refactor: separate train/eval
* fix import errors
* eval checkpoints in reverse chron. order
* save/load cycle in sd init
* refactor and verify eval
* verify training correctness
* prepare repro train run
* cleanup
* integrate beam retry, train, eval
* simplify wandb
* kill orphaned processes
* better logging
* train to 10 ckpts instead of 7
* remove optimizer/scheduler checkpointing/resume
* cleanup
* BEAM=2 7 ckpts
* add test to compare with torch softmax in amp
* cleanup
* stop eval early if checkpoint converged
* add test for lr scheduler
* add proper test method
* add test for training
* use venv name that is ignored by .gitignore
* linting
* add simple f32 softmax fxn
* revert change to scaled_dot_product_attention
* refactor gelu_erf init
* simplify mixed precision in unet
* add norm autocasting to fp32
* rm extra test
* test eval with NULL backend
* fix venv name
* simplify norm autocast
* use temp dir for training test
* actually add eval test
* remove parallel env variable from tests
* update clip with tests
* reorg init functions
* use np for testing
* remove unused var
* factor out GPUS
* add sd model init tests
* more unet tests
* match master
* rerun CI due to linux (remote) hang
* explain UNET_CKPTDIR
* rerun CI due to linux (remote) timeout
---------
Co-authored-by: chenyu <[email protected] >
2025-10-05 07:56:05 -04:00
George Hotz and GitHub
a976ace404
minor improvements to rewrite ( #12454 )
...
* minor improvements to rewrite
* need that continue
* faster
2025-10-05 18:09:32 +08:00
qazal and GitHub
4b60121498
fix bmnist torch with RANGEIFY=1 ( #12442 )
...
* fix bmnist torch with RANGEIFY=1
* alt
* test and comment
* this was always wrong
* simple failing test for rangeify
* simple upat to match the old behavior
2025-10-05 12:34:27 +03:00
George Hotz and GitHub
b5f31d7505
earlier seen children ( #12451 )
2025-10-05 15:55:13 +08:00
qazal and GitHub
865d5796f8
add a test for untested Tensor.assign behavior ( #12448 )
...
* add a test for untested Tensor.assign behavior
* better
2025-10-04 12:44:56 +03:00
Sieds Lykles and GitHub
e74be4a140
UOp.factor and add chain sorting ( #12413 )
...
* add ordering
* fix some tests
* fix more tests
* shorten comment
* update test
* add rule and test
* add rule and test
* remove check
* use fold_divmod_congruence instead of simplify
* adjust tests
* shorten line
* new algo
* add test
* add function to un-nest the div
* add UOp.factor
* test UOp.factor
* uop_given_valid tries to factor simplex expression
* shorten line
* symbolic_flat is back
* change that back
* fix those new tests
* new rule for ordering
* factor multiple factors
* no symbolic_flat
* symbolic_flat to there
* move that back
* fix imports
* merge correctly
* linter happy
* add rule
* add a test
* cleanup
* revert that for now
* UOp.factor returns self instead of None
* try all_candidates
* remove or_else
* post index symbolic
* add test
* maket this closer to the original
* increase mac hlb_cifar min step time
* add some ordering tests
* cleanup
* increase pytest timeout time
* check dtype
2025-10-04 06:05:38 +02:00
Sieds Lykles and GitHub
394dc24110
post index symbolic ( #12446 )
...
* post index symbolic
* add test
2025-10-03 23:23:03 +02:00
chenyu and GitHub
9f2b69b870
enable few tests for PTX test_dtype ( #12445 )
2025-10-03 08:56:30 -04:00
George Hotz and GitHub
0b534f71c2
recursive substitute should be O(n) ( #12444 )
...
* recursive substitute
* even faster
* make that a single rewrite
2025-10-03 18:29:59 +08:00
chenyu and GitHub
b087663c35
RANGEIFY test_bert uses more ran somehow ( #12443 )
2025-10-03 04:38:53 -04:00
chenyu and GitHub
940a8d5ba9
default IGNORE_OOB=1 ( #12441 )
...
* default IGNORE_OOB=1
z3 can get very slow with RANGEIFY, also update some kernel numbers to what it is
* add to test
2025-10-03 04:16:19 -04:00
George Hotz and GitHub
d290e77a5b
pend substitutes for speed ( #12440 )
2025-10-03 15:49:19 +08:00
nimlgen and GitHub
23d310bcc1
ptx: handle i8/u8 casts correctly ( #12439 )
...
* ptx: handle casts correctly
* notsetp
2025-10-03 15:34:15 +08:00
hooved and GitHub
1e8945a28c
Training loop for Stable Diffusion mlperf ( #12315 )
...
* add diff
* fix edit error
* match master
* point reference to specific commit
* simplify wandb logging
* remove lr test, dehardcode device
* increase stack size limit
2025-10-03 02:45:38 -04:00
George Hotz and GitHub
c7849ac593
fix test lil model ( #12437 )
...
* fix test lil model
* 4 not 3
2025-10-03 02:28:37 -04:00
chenyu and GitHub
0f82d92b9d
use float for softmax in llm.py ( #12438 )
...
fixed numerical issue in `CPU=1 RANGEIFY=1 python3 -m tinygrad.apps.llm`
2025-10-03 02:27:56 -04:00
George Hotz and GitHub
4c63f7e786
skip copies of reshaped buffers ( #12430 )
...
* skip copies of reshaped buffers
* always run NOOP
* comment
* comment
2025-10-03 13:05:47 +08:00
Sieds Lykles and GitHub
0047bcc535
undo loaded comparison swap ( #12436 )
...
* add rule
* add a test
2025-10-03 06:57:29 +02:00
chenyu and GitHub
f203d8b221
update RANGEIFY kernel count and test_masked_select ( #12435 )
2025-10-03 00:41:34 -04:00
wozeparrot and GitHub
a6dd5a224b
skip webgpu tests ( #12433 )
2025-10-02 21:31:07 -07:00
chenyu and GitHub
bf99de7b1e
update a few more tests for RANGEIFY ( #12434 )
2025-10-03 00:16:58 -04:00
George Hotz and GitHub
9cd365c12e
little changes from double gemm ( #12429 )
...
* little changes from double gemm
* split pm_group_for_reduce
* pm_add_buffers_local
* Revert "pm_add_buffers_local"
This reverts commit 4d30a91db2 .
2025-10-03 10:31:51 +08:00
Sieds Lykles and GitHub
16a65b4fd0
fix test_symbolic_gcd_div hang ( #12427 )
2025-10-03 04:21:16 +02:00
chenyu and GitHub
2d24af888b
REWRITE_STACK_LIMIT ( #12426 )
2025-10-02 21:51:04 -04:00
hooved and GitHub
1b58ef0d60
Increase stack size limit in unified_rewrite ( #12424 )
...
* increase stack size limit
* rerun CI due to random tqdm test fail
2025-10-03 09:06:47 +08:00
qazal and GitHub
17d36d0952
don't tag MSTACK/MSELECT on global buffers ( #12423 )
...
* don't tag MSTACK/MSELECT
* fix
2025-10-02 13:32:15 +03:00
chenyu and GitHub
7b3912d8e4
relax atol for some tests ( #12422 )
2025-10-02 05:04:44 -04:00
chenyu and GitHub
98163832e4
update RANGEIFY test_cast_padded ( #12421 )
...
* update RANGEIFY test_cast_padded
* update test
2025-10-02 04:37:35 -04:00
chenyu and GitHub
37beef6de3
add null bert training test in ci ( #12420 )
...
fails with RANGEIFY `RuntimeError: children not making progress`
2025-10-02 04:05:19 -04:00
f21851b099
ops: n^2 .device property fix ( #12419 )
...
* test case for a long rand chain
currently failing with RANGEIFY because device propogates too deep
* skip
* ops: n^2 .device property fix
* unskip
---------
Co-authored-by: Chen-Yu Yang <[email protected] >
2025-10-02 03:28:12 -04:00
b1tg and GitHub
ec177c80c2
rangeify: fix test_where_fold (llvm) ( #12416 )
...
* rangeify: fix test_where_fold (AMD_LLVM)
* rm comment
2025-10-02 02:57:49 -04:00
qazal and GitHub
13a25b2e67
rangeify: don't shape INDEX on kernelize ( #12417 )
2025-10-02 09:45:37 +03:00
hooved and GitHub
5d9035f5a6
Eval for Stable Diffusion mlperf ( #12316 )
...
* add diff
* rerun ci
* refactor beam workaround, add test
* fix conflict
* linting
2025-10-02 02:35:38 -04:00
0f804c9a83
Stable Diffusion model init for mlperf ( #12314 )
...
* include clip pr diff
* updated unet and sd init
* dehardcode default device
* revert beam hang workaround
---------
Co-authored-by: chenyu <[email protected] >
2025-10-02 02:28:41 -04:00
geohot
0eee93f0c0
hotfix: disable split ranges for non rangeify
2025-10-02 13:15:24 +08:00
George Hotz and GitHub
583553f467
split ranges ( #12411 )
...
* split ranges
* simpler
* split ranges
* range str
* fix test
* oops
* faster
* no group 2
* tests
* dont_sub_ranges_for_image
* revert that
2025-10-02 12:57:22 +08:00
qazal and GitHub
6fc6b51b59
fix limit_bufs with kernelize ( #12415 )
2025-10-02 07:49:11 +03:00
qazal and GitHub
d1c868f990
fix limit_bufs with multi ( #12414 )
2025-10-02 05:51:56 +03:00
qazal and GitHub
2fcd55583f
allow less kernels in external_test_opt ( #12412 )
...
* allow less kernels in external_test_opt
* this was always 2
2025-10-02 05:05:42 +03:00
qazal and GitHub
8b48e19ce2
skip more multi remote tests ( #12410 )
2025-10-02 04:50:46 +03:00
geohot
3770dd9d80
annotate bufferize in viz
2025-10-02 09:20:50 +08:00
qazal and GitHub
5b649616ff
rangeify: detect and assert cycles ( #12405 )
...
* rangeify: assert cycles
* rng=2
* any
2025-10-02 03:39:43 +03:00
Sieds Lykles and GitHub
9a64fc0d28
Load alt value with cast try 2 ( #12407 )
...
* add or_casted
* add tests and fix old tests
* cast load
* move that to pm_render
* add allow_any_len to gated load patterns in renderers
* slice [:2]
2025-10-02 00:55:29 +02:00
nimlgen and GitHub
3e0e0290ce
increase timeout in test_module_runs ( #12408 )
2025-10-01 22:01:44 +03:00
Sieds Lykles and GitHub
2f8ac77c25
add allow_any_len to gated load patterns in renderers ( #12406 )
2025-10-01 20:35:32 +02:00
George Hotz and GitHub
89bed28716
split reduceop ( #12404 )
...
* some rangeify tests fixed
* bring split reduceop to rangeify
* fix tests
2025-10-01 18:45:16 +08:00
George Hotz and GitHub
74ee305948
some rangeify tests fixed ( #12403 )
2025-10-01 18:23:37 +08:00
qazal and GitHub
f198a9e1ba
skip test_multihost_aware_schedule, assign devices mismatch ( #12396 )
...
* minimal failing remote test
* this should've never worked?
* skip that test
2025-10-01 13:09:15 +03:00
ac3d457d5e
rangeify: TestReduceOpsConstFolding ( #12397 )
...
Co-authored-by: George Hotz <[email protected] >
2025-10-01 17:58:19 +08:00
George Hotz and GitHub
60e52fbe36
support opts in contig, simpler ( #12400 )
2025-10-01 17:20:04 +08:00
chenyu and GitHub
6c95b1f39d
explicitly set device for CI unit test ( #12399 )
2025-10-01 05:16:54 -04:00
chenyu and GitHub
6ba8bf282f
skip test_masked_select for RANGEIFY PYTHON ( #12395 )
2025-10-01 04:13:31 -04:00
chenyu and GitHub
689ab9151b
more RANGEIFY tests ( #12393 )
...
would have caught the load alt regression without adding too many tests
2025-10-01 03:43:58 -04:00
chenyu and GitHub
adc8c3b28f
Revert "load alt value with cast ( #12384 )" ( #12392 )
...
This reverts commit 05e91a248d .
2025-10-01 03:20:04 -04:00
b1tg and GitHub
154d114364
rangeify: fix abstractions2.py ( #12386 )
...
* rangeify: fix abstractions2.py
* tests
* lint
* only abstractions2
* base
2025-10-01 09:58:56 +03:00
geohot
fe96c8d345
add HALF flag to tinygrad.apps.llm
2025-10-01 14:44:59 +08:00
George Hotz and GitHub
f205352cd7
remove ranges with 1s ( #12388 )
...
* use op_in_parents
* remove the ranges of 1
* fix CL image thing
* fix realize
2025-10-01 14:43:29 +08:00
qazal and GitHub
90b1c0dd96
rangeify: test_where_fold kernel count ( #12379 )
...
* rangeify: test_where_fold kernel count
* get these from the index
* replace ranges
* fine
* movement ops
* diff
* better
2025-10-01 09:35:12 +03:00
b1tg and GitHub
42748ccb92
rangeify: fix test_prequant_conv2d_1x1 ( #12391 )
2025-10-01 02:33:47 -04:00
Sieds Lykles and GitHub
05e91a248d
load alt value with cast ( #12384 )
...
* add or_casted
* add tests and fix old tests
* cast load
* move that to pm_render
2025-10-01 07:14:26 +02:00
qazal and GitHub
714500edfd
viz: add font-weight to OffscreenCanvas config ( #12390 )
2025-10-01 08:08:47 +03:00
b1tg and GitHub
57ad46c6e4
rangeify: increase atol for test_two_binops_no_rerun passing on real windows machine ( #12389 )
...
CPU_LLVM=1
2025-10-01 00:56:45 -04:00
George Hotz and GitHub
e02da8f5ac
use op_in_parents ( #12385 )
2025-10-01 12:37:29 +08:00
chenyu and GitHub
0662946fac
atol in test_two_binops_no_rerun ( #12387 )
...
for RANGEIFY LLVM
2025-10-01 00:05:47 -04:00
b1tg and GitHub
da52006bde
rangeify: fix test_scatter_reduce ( #12380 )
...
* rangeify: fix test_scatter_reduce
* ext_vector_type
* set alignment=1 on boolean
2025-09-30 23:26:36 -04:00
George Hotz and GitHub
1c1b4d14e9
minor cleaups in rangeify ( #12382 )
...
* minor cleaups in rangeify
* op_in_parents
* don't use toposort
* Revert "don't use toposort"
This reverts commit 257d8e2529 .
2025-10-01 11:19:48 +08:00
wozeparrot and GitHub
4204edc60b
feat: skip test_long ( #12383 )
2025-09-30 20:07:39 -07:00
chenyu and GitHub
8def8145e4
ALLOWED_KERNEL_COUNT openpilot 0.9.4 with RANGEIFY ( #12381 )
2025-09-30 22:58:59 -04:00
George Hotz and GitHub
4c9a930de2
rangeify attn tests ( #12377 )
2025-10-01 09:59:19 +08:00
qazal and GitHub
26247573e1
rangeify multi tests on gpu ( #12376 )
...
* rangeify multi tests on gpu
* fix limit_bufs
2025-10-01 04:53:04 +03:00
qazal and GitHub
f2eb92948d
rangeify: ban view pushing ( #12371 )
...
* rangeify: ban view pushing
* don't shape INDEX
* fix the codegen cache
* make space
2025-10-01 04:37:52 +03:00
George Hotz and GitHub
a128fa0f8a
removing double reshapes was wrong ( #12375 )
2025-10-01 09:25:35 +08:00
hooved and GitHub
969a1b35ca
LR scheduler for Stable Diffusion mlperf training ( #12201 )
...
* add lr scheduler for stable diffusion training
* add lr scheduler test
* rerun ci
* rerun CI
* use np for testing
* move test to CI path
* remove unneeded copy
2025-09-30 21:21:08 -04:00
George Hotz and GitHub
9ef319f349
bad conv in rangeify ( #12373 )
...
* bad conv with broken rangeify
* no maxpool needed
* add empty_like
* typo
* no self
* issue remains for test
2025-10-01 08:56:22 +08:00
nimlgen and GitHub
080b26e7d7
use suppress_finalizing to not mute all exceptions ( #12372 )
2025-09-30 21:24:31 +03:00
George Hotz and GitHub
44558a37f7
fix some rangeify tests ( #12370 )
...
* fix bad range merges
* fix rng
* fix uop gc
* fix some rangeify tests
* now that needs rangeify 2 also
2025-09-30 20:12:08 +08:00
nimlgen and GitHub
2c397eb2a2
rangeify: buf limit ( #12336 )
...
* limit bufs
* g
* fix buffer limit
* um?
* fix
* only these?
* typo
* f
* cleaner
2025-09-30 14:59:47 +03:00
George Hotz and GitHub
a83f219253
fix bad range merges ( #12368 )
...
* fix bad range merges
* fix rng
* fix uop gc
2025-09-30 19:30:21 +08:00
qazal and GitHub
a95159d579
remove TestShapeSpec, it relies on ShapeTracker [pr] ( #12369 )
2025-09-30 14:20:35 +03:00
George Hotz and GitHub
9cf5e66899
minimal rangeify stable diffusion fix ( #12367 )
...
* minimal rangeify stable diffusion fix
* more minimal
2025-09-30 18:48:35 +08:00
chenyu and GitHub
b4a4817c9c
fix rangeigy test_linalg ( #12365 )
2025-09-30 06:28:35 -04:00
qazal and GitHub
de1d562b69
rangeify: update test_pickle asserts ( #12366 )
...
* realized exists on the base
* use is_realized
2025-09-30 13:27:41 +03:00
c9ef5d8fe5
rangeify: fix test_tensor_index_overflow (CPU_LLVM=1) ( #12362 )
...
* rangeify: fix test_tensor_index_overflow (CPU_LLVM=1)
* add test
---------
Co-authored-by: b1tg <[email protected] >
2025-09-30 05:55:15 -04:00
qazal and GitHub
e8c595c29e
remu: add new instructions introduced in RANGEIFY ( #12363 )
...
* add v_mad_i64_i32 for test_output_padded_conv_transpose2d
* run amd test_ops
* skip test_masked_select
2025-09-30 12:36:29 +03:00
George Hotz and GitHub
360980f1a3
work on rangeify cost function heuristics ( #12360 )
...
* work on rangeify cost function heuristics
* dedup
* better cost function
2025-09-30 16:44:29 +08:00
qazal and GitHub
109c63b904
update Tensor unit tests for RANGEIFY ( #12359 )
...
* update test_kernelize for RANGEIFY
* also kernelizes user contiguous
* skip that test
* tensor uop repr
* 4 kernels, still realizes a float
2025-09-30 11:17:21 +03:00
George Hotz and GitHub
7129419500
fix cifar training in RANGEIFY ( #12355 )
...
* fix cifar training in RANGEIFY
* even more wino fuse
* bugfix
* test to show issue
2025-09-30 15:59:19 +08:00
qazal and GitHub
4ff7f20b9d
rangeify: fix kernelize ( #12357 )
2025-09-30 10:10:08 +03:00
chenyu and GitHub
86c5c969ea
linalg cosmetic change ( #12356 )
2025-09-30 03:00:59 -04:00
qazal and GitHub
6a56d3c859
rangeify: only test correctness in multi ( #12339 )
...
* work
* more work
* back here
* skip tests
* work
2025-09-30 09:55:59 +03:00
George Hotz and GitHub
ab6b0d3a21
enable cleanup_dead_axes ( #12351 )
...
* enable cleanup_dead_axes
* don't mess with user contig
* correct tag behavior
* double reshape isn't correct
* block on assign too
* skip messing with symbolic
* Fix tests
* disable RANGEIFY=2
* test w rangeify
2025-09-30 14:09:39 +08:00
qazal and GitHub
2a7310ab59
rangeify: fix remaining multi correctness issue ( #12354 )
2025-09-30 08:08:27 +03:00
Sieds Lykles and GitHub
73b25bf47d
z3 fix loaded mask ( #12353 )
...
* z3 fix loaded mask
* indentation
2025-09-30 06:55:50 +02:00
wozeparrot and GitHub
2a0caa09c2
push copy to disk ( #12348 )
2025-09-29 21:55:05 -07:00
chenyu and GitHub
881709cd33
don't skip rangeify test_instancenorm_3d ( #12350 )
...
seems fine now
2025-09-30 00:05:59 -04:00
hooved and GitHub
39aae679e4
Support bfloat16 on NULL backend ( #12340 )
...
* add failing test
* move test
* only run test with NULL default
* add skip reason
* add fix
2025-09-30 00:02:30 -04:00
chenyu and GitHub
af935e7d32
Revert "reduce const folding ( #12344 )" ( #12349 )
...
This reverts commit 8e508a9927 .
2025-09-29 23:45:30 -04:00
George Hotz and GitHub
f522e83a02
fix rangeify elu fusion for openpilot ( #12341 )
...
* fix rangeify elu fusion for openpilot
* flip the metadata
* copy over permuted contiguous support
* this is correct
* update that
2025-09-30 11:41:52 +08:00
qazal and GitHub
d95d018bb5
add name to multi rewrite [pr] ( #12346 )
2025-09-30 06:34:58 +03:00
qazal and GitHub
05275c9ec3
rangeify: enable assign to mstack target ( #12345 )
2025-09-30 06:27:57 +03:00
chenyu and GitHub
8e508a9927
reduce const folding ( #12344 )
2025-09-29 23:08:56 -04:00
chenyu and GitHub
3a480b858f
use more getitem in gpt2 ( #12343 )
2025-09-29 23:08:03 -04:00
qazal and GitHub
32d69d07d7
rangeify: enable multitensor TestBatchNorm ( #12342 )
2025-09-30 06:05:00 +03:00
Sieds Lykles and GitHub
d55d829635
Lower index dtype spec fix ( #12337 )
...
* new pm_lower_index_dtype
* load_store_indexing after index lowering
* shorten line
* seperate rule for long removal
* fix test
* fix index_to_concrete_int
* minor fixes
* add sink there
* update types in linearizer test
2025-09-30 04:26:50 +02:00
c38f6ce140
unified_rewrite: use deque and dont add nodes to the stack multiple times ( #12320 )
...
* use deque instead of list
* increase ctx.progress and max stack_len
* add openpilot
* prevent placing uops on stack many times
* revert increasing ctx.progress and stack length limit
* dont block adding to the stack there
---------
Co-authored-by: George Hotz <[email protected] >
2025-09-30 10:02:28 +08:00
hooved and GitHub
c2689c505e
Clip model updates for Stable Diffusion mlperf training ( #12313 )
...
* stable diffusion mlperf clip changes
* add clip tests
* set gelu as attribute
* add more tests
* factor out GPUS
* rerun CI
* add imports to if blocks
* remove unneeded axis
* add clip tests to CI
* move clip tests
* add deps, disable max buf size
2025-09-29 21:50:14 -04:00
George Hotz and GitHub
cdfa0f29fd
add rendering to index ( #12338 )
2025-09-30 09:18:05 +08:00
George Hotz and GitHub
baf3b60cfb
fix gpt2 on rangeify ( #12335 )
2025-09-29 19:16:44 +08:00
qazal and GitHub
9513f025c5
apply multi before rangeify ( #12298 )
...
* it doesn't realize it when i reshape
* cleaner graph
* map out
* REDUCE_AXIS also gives the wrong answer
* maybe
* work
* back here
* try
* more
* refactor tests
* check MultiBuffer
* or copy
* fine with this
* don't need graph_rewrite_map in rangeify
2025-09-29 14:16:31 +03:00
George Hotz and GitHub
b899392f30
fix llm app with rangeify ( #12334 )
...
* fix llm app with rangeify
* add gpt2 contiguous also
2025-09-29 18:42:44 +08:00
wozeparrot and GitHub
7ae6898e31
better late bufferview ( #12333 )
2025-09-29 03:08:34 -07:00
George Hotz and GitHub
3291e00df7
fix efficientnet slowness on rangeify ( #12332 )
2025-09-29 18:01:01 +08:00
chenyu and GitHub
9d2f2b8e34
skip test_mean_half_precision_overflow ( #12331 )
...
it only works with SPLIT_REDUCEOP=1
2025-09-29 05:15:04 -04:00
qazal and GitHub
9915bcf2b4
remove no-op contiguous from rand ( #12329 )
2025-09-29 11:53:16 +03:00
chenyu and GitHub
76c87d81b3
delete test_backward_sum_acc_dtype ( #12330 )
...
this test tests the wrong thing, it was only working because expand realize rule
2025-09-29 04:46:17 -04:00
George Hotz and GitHub
fd2e4f2353
failing rng test ( #12328 )
...
* tighten spec: fixup devectorizer types / rangeify
* tighten assign
* failing rangeify test
* simpler
* otherwise contig
* more tolerance cause rng seed changed
2025-09-29 16:06:45 +08:00
George Hotz and GitHub
29469577e8
tighten spec: fixup devectorizer types / rangeify ( #12327 )
...
* tighten spec: fixup devectorizer types / rangeify
* tighten assign
2025-09-29 15:41:11 +08:00
wozeparrot and GitHub
a982480512
feat: late to_bufferview ( #12271 )
2025-09-29 00:29:43 -07:00
qazal and GitHub
e01a3eb59a
rangeify whitespace cleanups [pr] ( #12326 )
...
* rangeify whitespace cleanups
* this is a noop
2025-09-29 10:04:51 +03:00
George Hotz and GitHub
cf925d1ac5
remove metadata for rangeify codegen ( #12325 )
2025-09-29 14:29:28 +08:00
George Hotz and GitHub
b252f890da
add support for SPEC=1 ( #12322 )
...
* add support for SPEC=1
* cleaner place for it
* non rangeify spec
* split non rangeify
2025-09-29 12:55:01 +08:00
qazal and GitHub
292cb6ae26
viz: 404 if the requested rewrite doesn't exist ( #12323 )
2025-09-29 07:51:10 +03:00
qazal and GitHub
250cb10e8f
rangeify permuted assign ( #12299 )
...
* enable RANGEIFY=1 test_assign
* work
* rangeify=0 asserts this ast
* remove that
* beta test, it's correct though
* skip multi
* matches torch/np output
* memcopy without memcopy
* can remove this
* rangeify isn't silently wrong anymore
* diff cleanup
* use UOp toposort instead of global tags
* actual assert TestRangeifyAssign
* step
* work
* this isn't optimizing away now
* some todos
* test fusion schedule
* typo
* dedup idxs
* cleaner
* pre
* work
* diff
2025-09-29 07:27:57 +03:00
Sieds Lykles and GitHub
ed90de6583
Revert "Bufferize early, fix "children not making progress" on big graphs (#1…" ( #12318 )
...
This reverts commit 6f1cf717de .
2025-09-28 19:10:21 +02:00
Sieds Lykles and GitHub
29f0886395
skip test_softmax_fusion tests if RANGEIFY==1 ( #12310 )
2025-09-27 05:57:40 +02:00
Sieds Lykles and GitHub
b98f1881ef
dsp opt test has different axis number on rangeify ( #12309 )
2025-09-27 05:06:11 +02:00
Sieds Lykles and GitHub
6f1cf717de
Bufferize early, fix "children not making progress" on big graphs ( #12308 )
...
* bufferize children early
* cleaner
* fix types
* lower number of reduceops
* test openpilot
2025-09-27 04:17:15 +02:00
qazal and GitHub
0104b16b9b
rangeify: fix empty tags in reshapes ( #12307 )
2025-09-26 16:32:48 +03:00
nimlgen and GitHub
f5eb46a3d9
fix limit buf metal on non rangeify ( #12303 )
...
* add failure test for limit buf on non rangeify
* correct metal
* correct
* hm
2025-09-26 11:06:28 +03:00
qazal and GitHub
8b2e0930d7
rangeify: enable passing multi test ( #12301 )
2025-09-26 08:31:13 +03:00
Sieds Lykles and GitHub
74411984fc
Rangeify IMAGE ( #12304 )
...
* add imagedtype to rangeify
* enable some image tests
* move the tests
* image upcast before locals
* add if statement
* rangeify image_dtype test
* decrease read_image count
2025-09-26 07:21:02 +02:00
wozeparrot and GitHub
d2cd269e28
fix: try close mmap ( #12306 )
2025-09-25 20:54:27 -07:00
chenyu and GitHub
17cec8d645
RANGEIFY winograd test ( #12297 )
...
speed seems fine
2025-09-24 23:42:32 -04:00
nimlgen and GitHub
476a2a0a96
test_qcom: update ( #12293 )
2025-09-24 21:45:58 +03:00
qazal and GitHub
38ecefaacb
RANGEIFY=1 allreduce ( #12260 )
...
* ci
* extract mops
* work
* assert early
* port this?
* can realize shard
* allreduce passing
* notes
* better handling of shard
* err
* outerworld allreduce twice
* work
* don't tag movement ops
* don't tag movement ops
* delete old logic
* 19 failing + ram
* cleanup
* reset stuff
* simplest failing test
* diff
* test_ones
* allreduce work
* allreduce more work
* down to 22 failing tests
* port _device_num
* replace creates a new UOp here
* pour symbolic everywhere
* 7 failing
* focus on allreduce
* work
* cleanup
* more ci
* fix test_schedule_ring
* post index const shape
* much better
* diff cleanup
2025-09-24 18:13:08 +03:00
qazal and GitHub
0e778296be
rangeify: refactor const folding ( #12291 )
...
* rangeify: refactor const folding [pr]
* it got better
2025-09-24 17:58:39 +03:00
qazal and GitHub
6c9d8c7e41
rangeify: simplify noop copy ( #12289 )
2025-09-24 17:01:23 +03:00
qazal and GitHub
1400ce105f
rangeify: fix sharding ( #12288 )
2025-09-24 14:33:56 +03:00
qazal and GitHub
154c865966
rangeify: fix ram usage in multi ( #12286 )
2025-09-24 13:48:58 +03:00
Sieds Lykles and GitHub
e8945c74de
fix infinite symbolic loop with VCONST ( #12285 )
2025-09-24 07:06:22 +02:00
Sieds Lykles and GitHub
45c7252aed
Better div nesting 2 ( #11812 )
...
* remove check
* use fold_divmod_congruence instead of simplify
* adjust tests
* shorten line
* new algo
* add test
* cleanup
* update tests
* ALLOWED_GATED_READ_IMAGE from 16 -> 12
* only remove the call to simplify
* add option to simplify with factor_remainder
* Allowed readimage gates back to 16
2025-09-24 04:50:26 +02:00
Sieds Lykles and GitHub
6146c64d81
lower the invalid gate last ( #12164 )
...
* lowering invalid gate is part of lower_index_dtype
* update test
* remove import
* put that back
* reduce_collapse uses invalid
* fix that pattern to use invalid_pat
* valid creates the right dtype count
* seperate rule for lowering invalid gate
* dont unvectorize Invalid gate
* image_fixup uses Invalid
* update tests
* cleanup
* update split_load_store
* add .scalar() there
2025-09-24 04:27:35 +02:00
qazal and GitHub
ad7c8c21ea
rangeify: INDEX doesn't passthrough MSELECT ( #12279 )
2025-09-23 21:36:50 +03:00
nimlgen and GitHub
02a7b7fe48
rangeify: fix test_setitem ( #12269 )
...
* rangeify: fix test_setitem
* um?
* better?
* simple where folding
* f
* revert
* x
2025-09-23 20:42:36 +03:00
qazal and GitHub
2f145a98e0
rangeify: fix contiguous multi ( #12278 )
...
* rangeify: fix contiguous multi
* when it's changing root, it should construct a new UOp
2025-09-23 20:05:29 +03:00
nimlgen and GitHub
5f4eeb054c
rangeify: passes now ( #12277 )
2025-09-23 18:46:49 +03:00
qazal and GitHub
680ce54dd4
add types to replace_dnum ( #12276 )
2025-09-23 14:43:04 +03:00
chenyu and GitHub
fffce0a6b4
use more no_range in simplify [pr] ( #12275 )
2025-09-23 02:33:56 -04:00
chenyu and GitHub
51b88b2265
process replay tests in rangeify ( #12274 )
2025-09-23 01:30:06 -04:00
chenyu and GitHub
b54cb272d0
move test_qcom to test/device ( #12272 )
2025-09-22 21:07:10 -04:00
Sieds Lykles and GitHub
d21e34e617
enable test_sum_twice ( #12270 )
...
* remove skip
* remove import
2025-09-23 00:57:29 +02:00
Sieds Lykles and GitHub
5a4b244e6b
Check for group inside another reduce ( #12268 )
...
* add check
* get the ranges correctly
* add test
* comment and better check
2025-09-23 00:32:41 +02:00
qazal and GitHub
a6fd96f620
rangeify: don't tag movement ops ( #12267 )
...
* don't tag movement ops
* delete old logic
2025-09-22 16:40:17 +03:00
chenyu and GitHub
b03ceb806e
move test_sample to test_randomness ( #12266 )
2025-09-21 21:11:32 -04:00
qazal and GitHub
25e0b725d1
cleanup section 0 rangeify ( #12264 )
2025-09-22 00:30:44 +03:00
qazal and GitHub
1aba668a37
cleanup buffer_view matcher ( #12263 )
2025-09-21 23:45:48 +03:00
nimlgen and GitHub
b53a266254
rangeify: fix test_optim ( #12262 )
...
* rangeify: fix test_optim
* add to cl?
* these are good now
2025-09-21 18:08:35 +03:00
qazal and GitHub
461e9becec
srender UOp in movement op arg ( #12261 )
2025-09-21 13:55:45 +03:00
Sieds Lykles and GitHub
9569fdfa36
use str for AxisType and AddrSpace __repr__ ( #12252 )
2025-09-21 05:24:41 +02:00
qazal and GitHub
8365c28cd5
viz: put a limit of brightness scale ( #12259 )
2025-09-20 18:52:55 +03:00
nimlgen and GitHub
4762a24022
test_free_intermediates force buffers ( #12255 )
...
* test_free_intermediates force buffers
* f
* fix for rangiefy
* xx
2025-09-20 18:14:39 +03:00
qazal and GitHub
57c7e0a8f8
RANGEIFY=1 test_jit ( #12254 )
...
* RANGEIFY=1 test_jit
* don't do any of that
* disk
* simple disk tensor
* more work
* run more tests
* it also doesn't copy everytime
* skip tests that hang everything
2025-09-20 17:34:32 +03:00
chenyu and GitHub
393c6b236c
test case to sum twice in different order ( #12253 )
...
* test case to sum twice in different order
fixed by #12251
* try metal
2025-09-20 10:11:57 -04:00
qazal and GitHub
4756971c88
skip test_bf16_disk_write_read on CL=1 ( #12256 )
2025-09-20 17:11:06 +03:00
chenyu and GitHub
5e794be8af
tighter spec for RANGE ( #12250 )
2025-09-20 07:59:50 -04:00
Sieds Lykles and GitHub
73c8dae60d
add missing remove_blockend case ( #12251 )
...
* add missing remove_blockend case
* remove expectedFailure
* better comment
2025-09-20 06:29:19 +02:00
wozeparrot and GitHub
dc4dd898b7
fix: close mmap ( #12249 )
2025-09-19 14:09:12 -07:00
Sieds Lykles and GitHub
bb1f376ae6
profile z3 ( #12248 )
2025-09-19 22:52:06 +02:00
7e06d3ebba
enable test_symbolic_jit ( #12245 )
...
Co-authored-by: qazal <[email protected] >
2025-09-19 20:23:42 +02:00
qazal and GitHub
bb59eed82f
rangeify: don't tag consts, they are global ( #12247 )
...
* rangeify: don't tag consts, they are global
* don't map movement ops
* sym failing test
* remove that
* update comment
* simpler test
* work
2025-09-19 15:25:03 +03:00
Sieds Lykles and GitHub
cc038b31b6
Shrink instead of reshape to unregister symbolic ( #12241 )
...
* Slice to unbind symbolic
* use vmax for now
* assert shape in reshape is valid
* update test_symbolic_ops to use shrink instead of reshape
* remove infer_with_bound_values for npw
* symbolic output doesnt have symbolic strides
* symbolic jit tests use shrink to unregister symbolic
* update test
* update more tests
* wrap vmax in int()
* only create a new st if the store is not an assigne
* unwrap st
* comments
2025-09-19 06:04:35 +02:00
chenyu and GitHub
a531a649fb
test_resize_upsample_scales_cubic_align_corners_cpu is fixed ( #12244 )
2025-09-18 20:55:26 -04:00
Sieds Lykles and GitHub
8d703a6369
z3 xor doesnt use bitcast ( #12243 )
2025-09-19 00:31:44 +02:00
chenyu and GitHub
0dad6cc518
good RANGEIFY kernel counts in external_test_opt ( #12242 )
...
no push permute stuff. the model ones are less clear if it's good, some got slower
2025-09-18 17:58:54 -04:00
chenyu and GitHub
cff1065f5e
test CL=1 RANGEIFY=1 onnx ( #12240 )
...
all except test_resize_upsample_scales_cubic_align_corners_cpu runs
2025-09-18 16:49:46 -04:00
Sieds Lykles and GitHub
ef05178855
fix 0//0 infinite rewrite in rangeify onnx ( #12239 )
2025-09-18 21:59:50 +02:00
chenyu and GitHub
87707ef0b8
unify range_start [pr] ( #12236 )
2025-09-18 13:52:54 -04:00
qazal and GitHub
825f148469
rangeify: fix copy size mismatch errs ( #12232 )
...
* rangeify: fix copy size mismatch errs
* const folding can happen in sym
assert it
* shippable
* rangeify copy is completely wrong
* pre_bufferize
* tag bufferize
* pre back
2025-09-18 18:23:32 +03:00
chenyu and GitHub
f82b16a0e9
RANGEIFY test_tensor ( #12235 )
2025-09-18 10:35:43 -04:00
chenyu and GitHub
7487c13b61
truncate_fp16 -> float_to_fp16 ( #12234 )
...
match float_to_bf16 and float_to_fp8
2025-09-18 09:48:27 -04:00
54c15d74a4
python float8 support ( #11960 )
...
* basic support
* alu
* nan in exec_alu
* rand_for_dtype
* inf + 0.0
* finfo
* revert rand_for_dtype
* clean
* truncate fp8s inf
* spec ok
* float_to_fp8 nan/inf
* least_upper_dtype
* clean up
---------
Co-authored-by: b1tg <[email protected] >
2025-09-18 09:17:09 -04:00
qazal and GitHub
dbbc261075
rangeify: fix COPY simplifier ( #12233 )
2025-09-18 14:35:33 +03:00
Sieds Lykles and GitHub
f1108f1cbe
Enable test_symbolic_ops on rangeify ( #12230 )
...
* enable
* merge correctly
2025-09-18 02:12:36 +02:00
Sieds Lykles and GitHub
812f485cd7
Enable threefry_doesnt_use_long test on rangeify ( #12229 )
...
* dont bufferize rangeify
* enable doesnt_use_long test
2025-09-18 01:58:34 +02:00
nimlgen and GitHub
3c5b8bf50c
am: bump fw to rocm7 ( #12226 )
2025-09-17 21:20:22 +03:00
qazal and GitHub
525f80e0d2
rangeify: enable putting consts back in the tensor graph ( #12225 )
...
* rangeify: enable putting consts back in the tensor graph
* work
* sym in ci
2025-09-17 19:45:04 +03:00
chenyu and GitHub
edffc246ed
MUL in reduce_unparented ( #12223 )
...
* MUL in reduce_unparented
* some test
2025-09-17 11:56:39 -04:00
qazal and GitHub
7733c217c5
remove spam comments in test_schedule ( #12224 )
2025-09-17 18:24:55 +03:00
qazal and GitHub
d917895569
map out rangeify errors in test_schedule ( #12211 )
...
* map out rangeify errors in test_schedule
* skip that
* add to ci
2025-09-17 09:10:28 +03:00
Sieds Lykles and GitHub
158506b91e
Upgrade some divmod folding for symbolic divs ( #12216 )
...
* use const_factor() instead of arg
* add test
* change div min_max
* add tests
* add divide_by_symbolic_gcd
* add tests
* one more test
* Slice to unbind symbolic
* deal with const factor properly
* minor cleanup
* divide_by_symbolic_gcd becomes UOp.gcd and UOp.divide_exact
* add tests
* add gcd_without_const
* fix divide_exact bug
* add factor_remainder
* add tests
* fix imports
* elif -> if
* remove expectedFailure
* add more tests
* add more unwrap
* fix signature of pop_const
* remove that
* remove that
2025-09-17 03:00:50 +02:00
Sieds Lykles and GitHub
328bfe6b9b
fix map_expand for symbolic shapes ( #12218 )
...
fix incorrect default argument in resolve
2025-09-17 01:20:18 +02:00
chenyu and GitHub
5b12764b83
add arange cat arange test ( #12217 )
...
simple test case to catch wrong reduce const folding. also clean up the old arange complexity test
2025-09-16 17:12:32 -04:00
nimlgen and GitHub
53655a4ee5
cuda: cleanup old comment ( #12215 )
2025-09-16 23:11:32 +03:00
chenyu and GitHub
6b808c5fe6
update TestSymbolicJit.test_plus1_pad ( #12214 )
...
was failing because movement was not captured
2025-09-16 15:57:50 -04:00
Shun Usami and GitHub
2a72b00679
Add test for 2D tensor indexing in setitem ( #12193 )
...
* Add test for 2D tensor indexing in setitem
* Fix _masked_setitem to handle multi dim indexing correctly
* Fix indent
* Add fuzz test for 3D tensor indexing in setitem
* Skip indexing fuzz test (slow)
2025-09-16 14:57:25 -04:00
chenyu and GitHub
c7b03457d7
Revert "Revert "more llvm intrinsics ( #11961 )" ( #12194 )" ( #12195 )
...
This reverts commit df1c183e46 .
2025-09-16 14:55:31 -04:00
chenyu and GitHub
494bb12500
skip slow cifar bf16 on red benchmark ( #12213 )
...
very slow to compile the fake bf16
2025-09-16 14:55:01 -04:00
chenyu and GitHub
419e997187
increase benchmark timeout ( #12212 )
...
account for compile cache, and it's annoying that job died due to timeout also messes the machine
2025-09-16 14:09:02 -04:00
chenyu and GitHub
84d2d047ea
Tensor.pad_to and Tensor.shrink_to ( #12210 )
...
most of the time i want this instead of spelling out the args
also add more input validation to shrink
2025-09-16 12:24:55 -04:00
qazal and GitHub
122a50fe8c
assert kernel count ( #12205 )
2025-09-16 14:24:39 +03:00
chenyu and GitHub
e555748807
test rangeify const folding ( #12200 )
...
* test rangeify const folding
reduce i know how to fix, multi and test_cast_padded tbd
* test_instancenorm_3d is very slow
2025-09-15 20:03:48 -04:00
chenyu and GitHub
f732f66709
rangeify test_nn almost pass ( #12198 )
...
* rangeify test_nn almost pass
* issue with jit
* flaky
2025-09-15 17:49:20 -04:00
chenyu and GitHub
82e037aad5
ci test.yml updates ( #12197 )
...
* ci test.yml updates
move docs together and external_benchmark_schedule to unit
* torch
2025-09-15 17:09:02 -04:00
chenyu and GitHub
146c31586d
split RANGEIFY ci ( #12196 )
...
one CPU and one CL for speed
2025-09-15 15:41:10 -04:00
chenyu and GitHub
df1c183e46
Revert "more llvm intrinsics ( #11961 )" ( #12194 )
...
This reverts commit d01e3d7719 .
2025-09-15 13:56:43 -04:00
d01e3d7719
more llvm intrinsics ( #11961 )
...
* more llvm intrinsics
* assert nan
* skip test_log_nan on metal
---------
Co-authored-by: b1tg <[email protected] >
2025-09-15 13:05:23 -04:00
nimlgen and GitHub
b63bd02969
update runtime docs ( #12191 )
2025-09-15 17:46:20 +03:00
qazal and GitHub
57e8bf61e8
viz: fix Specificity for rect styling ( #12190 )
2025-09-15 17:33:37 +03:00
chenyu and GitHub
72e010d816
fix rangeify ci ( #12189 )
...
CL=1, and multitensor needs to test with CPU since CL does not support multi in CI
2025-09-15 10:24:57 -04:00
qazal and GitHub
f1bd06134d
test fuse with RANGEIFY=2 ( #12187 )
2025-09-15 15:51:23 +03:00
qazal and GitHub
ef0ef705fe
viz: remove async from event listener ( #12186 )
2025-09-15 15:08:28 +03:00
qazal and GitHub
d8855ec266
viz/serve.py cleanups ( #12185 )
...
* don't assign unused variable
* *path to
2025-09-15 13:43:26 +03:00
qazal and GitHub
b8a74c1569
cpu: add disassembler err message ( #12184 )
...
* cpu: add disassembler err message
* print msg
2025-09-15 13:29:44 +03:00
qazal and GitHub
a388d2cb1a
remove PROFILE=1 option, it's just VIZ=1 [pr] ( #12176 )
...
* remove PROFILE=1 option, it's just VIZ=1 [pr]
* sqtt
* sqtt 2
* return last
* rename
2025-09-15 12:51:50 +03:00
George Hotz and GitHub
65397bfdeb
set testpath on pytest ( #12183 )
2025-09-15 16:13:05 +08:00
George Hotz and GitHub
ae0edc8a67
renumber ranges ( #12182 )
...
* enable rangeify const folding
* renumber ranges for kernel deduping
2025-09-15 13:03:39 +08:00
hooved and GitHub
e1fef895b1
don't hardcode weights path ( #12171 )
2025-09-15 00:33:47 -04:00
hooved and GitHub
3a9db08b49
download data and ckpts for sd train/eval ( #12170 )
2025-09-15 00:31:45 -04:00
chenyu and GitHub
bdb3afd566
failed test case for symbolic pad ( #12179 )
2025-09-15 00:25:21 -04:00
George Hotz and GitHub
9fcc87761e
enable rangeify const folding ( #12181 )
2025-09-15 12:02:19 +08:00
George Hotz and GitHub
1353250b6c
tags on bufferize are the tensor tags ( #12180 )
2025-09-15 11:46:03 +08:00
George Hotz and GitHub
60d7db093e
delete bufferized consts + output noops ( #12163 )
...
* bring const folding to rangeify
* comment that
2025-09-15 11:07:44 +08:00
qazal and GitHub
525c20dc7e
viz: remove unused runtime_stats feature ( #12177 )
2025-09-15 02:53:05 +03:00
qazal and GitHub
75ff9b7a9a
viz: add buffer lifetime to tooltip ( #12175 )
2025-09-15 02:33:50 +03:00
chenyu and GitHub
15b166ce6d
bump test_module_runs to 30 seconds ( #12174 )
...
25 seconds sometimes
2025-09-14 16:48:40 -04:00
943236ef74
move cast pat out of symbolic_simple ( #11945 )
...
* move pat
* move it here
* rm extra check
---------
Co-authored-by: Sieds Lykles <[email protected] >
2025-09-14 21:39:48 +02:00
Steven Shi and GitHub
25b1bc8eff
added top k sampling to examples/mamba ( #12061 )
2025-09-14 15:27:34 -04:00
Shun Usami and GitHub
34a05b31fe
Fix advanced tensor indexing setitem ( #12128 )
...
* Add failure test case for advanced tensor indexing setitem
* Fix advanced tensor indexing setitem when permuted
* Reduce line count
* Revert unnecessary change
* Combine two lines into one
2025-09-14 15:22:40 -04:00
chenyu and GitHub
d09c0f28c5
increase test_module_runs ( #12173 )
...
timed out on ci windows llvm
2025-09-14 15:19:21 -04:00
chenyu and GitHub
12a910f1d2
update torch 2.8 ( #12172 )
...
support _reshape_alias. something is wrong with one case of unfold
2025-09-14 15:19:03 -04:00
chenyu and GitHub
98ecab7563
remove ml_dtypes ( #12169 )
2025-09-14 14:20:05 -04:00
qazal and GitHub
02054b53fe
remove tests that pre date the uop spec ( #12168 )
...
* remove tests that pre date the uop spec
* const src
* for RANGEIFY=1
* update with bind
* remove import
2025-09-14 18:47:42 +03:00
qazal and GitHub
1591e4f66b
update outbufs selection in test_linearizer [pr] ( #12166 )
2025-09-14 13:46:49 +03:00
nimlgen and GitHub
d1ae30f7ef
hcq: do not spam with errors in -m device ( #12150 )
...
* hcq: do not spam with errors in -m device
* um?
* um?
* nn
* helps?
* um?
* no gc?
* fix
2025-09-14 10:56:59 +03:00
George Hotz and GitHub
d5bc27797b
fix some multitensor on rangeify ( #12162 )
...
* fix some multitensor on rangeify
* rangeify multi hacks
* copy on const
2025-09-14 14:31:57 +08:00
Meng Zhuo and GitHub
4b7904eca9
add cpu support for riscv64 ( #12136 )
2025-09-14 11:40:58 +08:00
George Hotz and GitHub
bcafa72b7f
use tags instead of graph_rewrite_map in rangeify ( #12110 )
...
* use tags instead of graph_rewrite_map in rangeify
* new style, add realize
* metadata works
* simple failure
* fix
* loops
* stuff becomes a NOOP when you remove it
* stuff becomes a NOOP when you remove it
* tags on bufferize
* bmnist works
* locals don't work
* shippable
* fix some tests
* simpler map_realize
* remove const hack
* debuggable test
* broke
* assign test
* straight up bug
* wooo it passes
* sink shouldn't be there
* fix ops
* bmnist
* kv cache ish
* Set RANGEIFY context variable to 0
* should work normal
* better
* types
* hacks to fix test_symbolic
* pm_add_buffers
* tests should pass
2025-09-14 11:39:01 +08:00
chenyu and GitHub
d2316ba91a
don't validate output in sdxl with fakeweights ( #12160 )
...
NULL backend passed validation before because both desired and actual went through NULL backend
2025-09-13 21:47:51 -04:00
nimlgen and GitHub
b1d1816f43
device: fix envvars ( #12159 )
2025-09-13 23:38:09 +03:00
nimlgen and GitHub
19d9d29b7e
device: compilers in tinygrad.device ( #12151 )
...
* hcq: do not spam with errors in -m device
* -m tinygrad p2
* fix
* ugh
* comp in ckey
* fix
* one more
* print defaults
* xx
2025-09-13 21:45:29 +03:00
qazal and GitHub
6410dcb7c2
viz: less verbose render loop ( #12158 )
...
* define visible once
* move y offsets to one place
2025-09-13 19:04:37 +03:00
nimlgen and GitHub
92df52d79a
make method_cache account for compiler ( #12156 )
...
* make method_cache account for compiler
* sorry
2025-09-13 17:00:11 +03:00
chenyu and GitHub
0c392089d9
update mypy ( #12155 )
2025-09-13 09:48:38 -04:00
qazal and GitHub
fbca6183ad
do not launch BEAM when opts_to_apply exists [pr] ( #12152 )
2025-09-13 14:57:46 +03:00
George Hotz and GitHub
b2a95d32bb
check clSetKernelArg ( #12149 )
2025-09-13 17:24:55 +08:00
George Hotz and GitHub
0695e322a8
fix android cpu device ( #12148 )
2025-09-13 15:42:04 +08:00
Sieds Lykles and GitHub
e3a3764917
delete fold_unrolled_divs ( #12146 )
2025-09-13 03:09:36 +02:00
Sieds Lykles and GitHub
51ed6e94b2
AxisType __repr__ method ( #12145 )
2025-09-13 01:15:38 +02:00
Sieds Lykles and GitHub
0757a9a819
add pytest-timeout of 3 min per item ( #12144 )
...
* add pytest-timeout with timeout of 3 min
* func_only
2025-09-13 00:48:41 +02:00
Sieds Lykles and GitHub
2fc0bd150b
Arange overflow raises error and one_hot upcast ( #11975 )
...
* add error
* to_dtype
* shorten line
* add test
* upcast one hot dim im overflows
2025-09-13 00:18:25 +02:00
chenyu and GitHub
aac3dceaf6
merge two PYTHON backend ci job ( #12143 )
...
* merge two PYTHON backend ci job
and mark anything that takes > 10 in test_ops slow
* two more
2025-09-12 17:36:46 -04:00
a12d0933c1
fix vec dtype in fast idiv ( #12080 )
...
* fix
* add vec dtypes to fuzzer
* add vec=False
---------
Co-authored-by: Sieds Lykles <[email protected] >
2025-09-12 23:00:43 +02:00
chenyu and GitHub
25091951ba
update test/models ( #12142 )
...
minor fix and run more stuff in tinygrad for speed
2025-09-12 16:43:28 -04:00
Sieds Lykles and GitHub
62376c8b2b
update store load noop pattern to use Invalid ( #12141 )
...
* update pattern
* add test
2025-09-12 22:25:53 +02:00
chenyu and GitHub
647965fb09
test_train cleanup ( #12140 )
...
* test_train cleanup
remove skipIf due to buffer sizes, runs locally
* those are slow
2025-09-12 13:21:30 -04:00
chenyu and GitHub
0fad07c684
viz serve default path ( #12139 )
...
`python tinygrad/viz/serve.py` shows last session instead of an empty page
2025-09-12 18:32:44 +03:00
nimlgen and GitHub
81e33b8439
system: cpu memory mappings are uncached ( #12137 )
...
* system: cpu memory mappings is uncached
* adm amd
2025-09-12 13:28:25 +03:00
qazal and GitHub
68b0ad05a4
viz: format tuple tags ( #12135 )
...
* viz: format tuple tags
* use python repr
2025-09-12 11:36:53 +03:00
qazal and GitHub
e80c8a7548
merge TestIndexing with TestSchedule + remove duplicate tests ( #12134 )
...
* merge TestIndexing with TestSchedule
* remove the arange_copy tests
* no FUSE_ARANGE import
2025-09-12 10:35:14 +03:00
Sieds Lykles and GitHub
b5a3b8de20
remove where on gated load if gates are the same ( #12129 )
...
* add rules
* add tests
2025-09-12 06:52:35 +02:00
George Hotz and GitHub
a2f502b89e
fix rangeify=1 ops on GPU ( #12130 )
2025-09-12 11:17:37 +08:00
George Hotz and GitHub
0766616962
isolate the const hacks in the old kernelize ( #12126 )
...
* isolate the const hacks in the old kernelize
* if rangeify, don't waste time
2025-09-12 08:35:35 +08:00
Sieds Lykles and GitHub
1f3950a484
Invalid idx ( #12067 )
...
* merge index_dtype_3
* new lowering with Invalid idx
* remove that dtype from range
* finish merge
* annotate better
* indentation
* dont need that anymore
* always process replay for openpilot
* more uop_given_valid for idx
* valid past index_child
* fix bug preventing load getting an alt value
* add track_match_stats back in in shapetracker and remove cache
* get_valid_idx -> get_valid and get_idx
* fix heuristics with new idx
* split line
* fix typo
* fix signature
* dont skip idx if stride is 0
the idx may still be invalid
* lower const with new valid
* delete to_indexed_uops
* update shapetracker test
* delete axis_is_masked
* add cache back
* move around comment
* fix get_valid bug
* move invalid fold to symbolic so its earlier
* cleanup
* update applying padto to new idx
* add unit tests
* cleanup
* fold line
* improve spec
* dont try to render Invalid as a float
* more consistent invalid index
* update some tests
* Fold index with true cond
* skip test
* vconst min max if Invalid in arg
* fix signature of UOp.const
* add test for min/max of Invalid CONST/VCONST
* add InvalidType to as_const signature
* is Invalid to isinstance
* Add InvalidType to ConstLike
* index gate is a where gate
* make that a metaclass
* fix heurisics for new idx
* mypy happy
2025-09-12 01:42:02 +02:00
chenyu and GitHub
544eb2c402
clean up test_scatter_reduce ( #12125 )
2025-09-11 16:36:58 -04:00
chenyu and GitHub
9ad6a56d17
smaller test_simple_reduce ( #12124 )
2025-09-11 15:45:38 -04:00
chenyu and GitHub
e5ef9ec5b1
remove IGNORE_OOB=0 in ci tests ( #12117 )
2025-09-11 15:05:04 -04:00
chenyu and GitHub
3a83b56da5
fix test_dequantization_mxfp4 ( #12123 )
...
* fix test_dequantization_mxfp4
* assert_allclose
* rtol
2025-09-11 14:22:06 -04:00
chenyu and GitHub
520e2e0727
actually run unit tests in ci MacOS (unit) ( #12122 )
...
* actually run unit tests in ci MacOS (unit)
* that's always wrong
2025-09-11 13:32:30 -04:00
nimlgen and GitHub
acb700fc26
ci: fix ptx env ( #12120 )
2025-09-11 12:42:15 -04:00
chenyu and GitHub
20cd7177de
delete test_bert_fuse_arange ( #12121 )
...
* delete test_bert_fuse_arange
it's the default now and we are not interested in FUSE_ARANGE=0 version
* remove -v
2025-09-11 12:35:51 -04:00
chenyu and GitHub
b07f962058
split metal model tests ( #12119 )
...
* split metal model tests
* llama too
2025-09-11 12:20:12 -04:00
chenyu and GitHub
66593f135f
remove duplicated test_real_world ( #12118 )
...
included in the test/models right below
2025-09-11 11:57:14 -04:00
qazal and GitHub
e76211fcbc
viz: specify all rect styles in parent ( #12115 )
...
* viz: specify all rect styles in parent
Visually a no-op, but it's easier to reason about when the rect's coloring comes from `g` parent that holds UOp data.
* this stays
2025-09-11 13:48:59 +03:00
nimlgen and GitHub
400ad93892
ci: gate boost paths for macos only ( #12114 )
2025-09-11 12:48:34 +03:00
George Hotz and GitHub
3ef0e5e01e
rangeify: use Ops.REALIZE and not Ops.CONTIGUOUS if it's added by system ( #12111 )
...
* rangeify: use Ops.REALIZE and not Ops.CONTIGUOUS if it's added by system
* fix contig + BufferizeOpts
* no outerworld
2025-09-11 11:56:59 +08:00
b1tg and GitHub
52ebed991e
change dtype promo lattice when fp8s is supported ( #12088 )
...
* change dtype promo lattice when fp8s is supported
* no device check
* int64 + uint64 => fp8
2025-09-10 22:09:11 -04:00
George Hotz and GitHub
d4eba5800d
rangeify cost function infrastructure ( #12091 )
...
* one call to hc opt
* does that pass?
* add cost function to rangeify
* test
* more test
* gate thread
* bufferize has shape
* ish
* match old behavior
* no ci there
2025-09-11 07:19:53 +08:00
qazal and GitHub
78610b681e
viz: light up children ( #12107 )
...
* viz: light up children
* keep tag coloring
2025-09-11 01:28:01 +03:00
Sieds Lykles and GitHub
3989f5b559
Revert "Simplify valid in symbolic ( #12104 )" ( #12108 )
...
This reverts commit 73d479a016 .
2025-09-10 23:36:40 +02:00
Sieds Lykles and GitHub
73d479a016
Simplify valid in symbolic ( #12104 )
...
* cleanup cast_folding
* from sym to symbolic
* no more sym in dtype lowering
* move around simplify_valid
* update test
2025-09-10 23:26:19 +02:00
chenyu and GitHub
e306650d39
remove GPUDevice ( #12106 )
2025-09-10 16:35:00 -04:00
George Hotz and GitHub
d8a7a1c9c7
BUFFERIZE shape should be each range, not the product ( #12105 )
...
* BUFFERIZE shape should be each range, not the product
* fix tests
* resolve
2025-09-11 04:02:24 +08:00
Sieds Lykles and GitHub
3730172c10
cleanup cast_folding ( #12101 )
...
* cleanup cast_folding
* from sym to symbolic
* no more sym in dtype lowering
2025-09-10 21:30:20 +02:00
chenyu and GitHub
0e266f376c
ops_gpu -> ops_cl ( #12103 )
2025-09-10 15:15:48 -04:00
chenyu and GitHub
0599e86186
replace hardcoded GPU in llama debug msg ( #12102 )
2025-09-10 13:56:40 -04:00
qazal and GitHub
5a84d86db7
viz: fix buffer tooltip offset ( #12100 )
...
* fixup offsets
* add buffer num to tooltip
2025-09-10 20:12:20 +03:00
nimlgen and GitHub
fb96394ff5
auto-select available compilers ( #12094 )
...
* device: auto select compilers
* fix
* metal+opencl
* nv/cuda
* test without ptx
* ptx
* fix tests
* fix
* fix test
* rename
* test + cleaner
* xx
* ops
* better test
* win?
* um?
* types
* debug
* win??
* sep rung
* wtf?
* debug
* skip win
* revert this
* types
2025-09-10 19:52:01 +03:00
chenyu and GitHub
bb67829e99
raise KernelOptError in TC _apply_tc_opt ( #12099 )
...
currently getting
```
2025-09-10 13:18:19
File "/home/chenyu/tinygrad/tinygrad/codegen/opt/search.py", line 149, in beam_search
2025-09-10 13:18:19
acted_lins: list[Scheduler] = flatten([get_kernel_actions(lin, include_0=False).values() for lin,_ in beam])
2025-09-10 13:18:19
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-10 13:18:19
File "/home/chenyu/tinygrad/tinygrad/codegen/opt/search.py", line 107, in get_kernel_actions
2025-09-10 13:18:19
lin2.apply_opt(a)
2025-09-10 13:18:19
File "/home/chenyu/tinygrad/tinygrad/codegen/opt/postrange.py", line 169, in apply_opt
2025-09-10 13:18:19
ret = self._apply_tc_opt(use_tensor_cores, cast(int, opt.axis), tc_select, tc_opt)
2025-09-10 13:18:19
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-09-10 13:18:19
File "/home/chenyu/tinygrad/tinygrad/codegen/opt/postrange.py", line 235, in _apply_tc_opt
2025-09-10 13:18:19
idx = self.rngs.index(a)
2025-09-10 13:18:19
^^^^^^^^^^^^^^^^^^
2025-09-10 13:18:19
ValueError: UOp(Ops.RANGE, dtypes.index, arg=(1002, <AxisType.REDUCE: 6>), src=(
2025-09-10 13:18:19
UOp(Ops.CONST, dtypes.index, arg=15, src=()),)) is not in list
```
2025-09-10 12:32:19 -04:00
George Hotz and GitHub
84b249ef0e
move simplify reduce out of devectorizer ( #12098 )
2025-09-10 21:24:57 +08:00
qazal and GitHub
5d66a2d885
viz: refactor range clipping ( #12097 )
2025-09-10 16:23:46 +03:00
George Hotz and GitHub
9789337722
early reduce simplify ( #12046 )
...
* early reduce simplify
* min changes
* need that
* that goes in simplify
* no more arange reduce opt
2025-09-10 21:02:46 +08:00
nimlgen and GitHub
21e6926a6a
HostLLVMCompiler -> CPULLVMCompiler ( #12096 )
2025-09-10 14:04:16 +03:00
nimlgen and GitHub
551560b87c
do not use getenv('PTX') in tests ( #12095 )
...
* test without ptx
* fix tests
* fix test
* linters
2025-09-10 14:04:07 +03:00
Sieds Lykles and GitHub
0e420e68b4
delete axis_is_masked ( #12092 )
2025-09-10 05:26:19 +02:00
George Hotz and GitHub
ef53a6fc19
one call to hc opt ( #12074 )
...
* one call to hc opt
* does that pass?
* Clean up postrange.py by removing comments
2025-09-10 11:18:18 +08:00
Sieds Lykles and GitHub
499f50483b
x | !x -> True ( #12090 )
2025-09-10 03:26:01 +02:00
Sieds Lykles and GitHub
5b73076e48
assert benchmark times ( #12042 )
...
* assert jitted times in openpilot
* better error
* better error
* add ASSERT_MIN_STEP_TIME to more models
* t is step_times
* update benchmark times
* update times
2025-09-09 23:40:02 +02:00
b1tg and GitHub
58d13a6e3e
remove redundant check ( #12087 )
2025-09-09 15:15:39 -04:00
qazal and GitHub
71fcb23d4a
viz: cleanup renderDag ( #12086 )
2025-09-09 19:19:45 +03:00
b1tg and GitHub
82e955fe79
fix inf bug in float_to_fp8 ( #12085 )
2025-09-09 12:02:56 -04:00
b1tg and GitHub
14faf7a5c0
AutoCastType tests for fp8s/bf16 ( #12084 )
2025-09-09 11:33:01 -04:00
qazal and GitHub
5e76eff26d
viz: pre fetch workers ( #12083 )
...
* viz: pre fetch workers
* move check
2025-09-09 15:56:39 +03:00
qazal and GitHub
5fde033794
viz: prune worker payload ( #12082 )
2025-09-09 14:45:13 +03:00
nimlgen and GitHub
1c6c42715f
unify cpu and llvm ( #11982 )
...
* try unify cpu and llvm
* fixes
* fix
* ops
* no llvm
* fix
* rm
* lvmm is ot
* oops
* override
* no llvm
* ignore
* skip llvm
* ooops
2025-09-09 13:54:44 +03:00
qazal and GitHub
50cc7175cb
viz: use complete progress helper ( #12081 )
...
* viz: use complete progress helper
* min diff
* rename show to start
2025-09-09 11:00:52 +03:00
Sieds Lykles and GitHub
239091d111
numba>=0.55 for uv resolution ( #12079 )
...
* force numba version
* update comment
2025-09-09 01:43:32 +02:00
chenyu and GitHub
2bd1fff79c
ci GPU misc cleanups ( #12078 )
2025-09-08 16:47:29 -04:00
chenyu and GitHub
1781d5bced
remove PYTHONPATH in test.yml ( #12077 )
...
set globally already
2025-09-08 15:41:47 -04:00
nimlgen and GitHub
9182948951
remove llvm_bf16_cast ( #12075 )
2025-09-08 20:51:15 +03:00
chenyu and GitHub
11213398b9
reorder amdremote in test yml ( #12073 )
2025-09-08 13:43:04 -04:00
nimlgen and GitHub
ebbcdd6577
cpu: use suppress_finalizing ( #12071 )
2025-09-08 18:28:09 +03:00
qazal and GitHub
73ca0e870c
viz: index visible rects ( #12070 )
2025-09-08 17:37:17 +03:00
chenyu and GitHub
d40f5b766b
default BEAM_PADTO to 0 ( #12069 )
...
seems incorrect, disable by default now
2025-09-08 10:17:03 -04:00
Sieds Lykles and GitHub
75b58fe2d3
move simplify_valid pat to sym ( #12065 )
...
* move simplify_valid pat to sym
* fix expectedfailure
2025-09-08 07:01:26 +02:00
chenyu and GitHub
56861852be
enable IMAGE for test_mnist and test_mnist_backward ( #12064 )
...
passes now
2025-09-07 09:06:39 -04:00
nimlgen and GitHub
ef71acc88a
hcq: cleanup fileio iface ( #12063 )
...
* hcq: cleanup fileio iface
* typo
* _
2025-09-07 15:43:27 +03:00
nimlgen and GitHub
35ddfc3d39
change default cpu_count ( #12062 )
2025-09-06 23:30:20 +03:00
nimlgen and GitHub
97187bf8b6
cleanup win and arch checks ( #12060 )
...
* cleanup win and arch checks
* stupid mypy
2025-09-06 23:08:46 +03:00
Sieds Lykles and GitHub
f326df8ae8
add type: ignore ( #12059 )
2025-09-06 21:17:35 +02:00
George Hotz and GitHub
c66935f7b9
only run hcopts once ( #12053 )
...
* only run hcopts once
* same?
2025-09-06 11:14:52 -07:00
qazal and GitHub
801be5f7b9
viz: memory graph cleanups ( #12057 )
...
* delete the total nbytes tooltip
* split pixel rescaling from layout
2025-09-06 19:44:53 +03:00
nimlgen and GitHub
10ac427aaa
cpu threading ( #11951 )
...
* start cpu threading
* fix
* fix2
* fix
* hacks?
* threads
* minor
* no dsp
* dsp 2
* n
* more
* test
* xm
* cleaner
* readable
* f
* reorder
* when no threads
* rangeify
* typos
* not needed
* reapply
* remoev this
* linter
* fixed cpu count in ci
* fix
* fixes
* rm
* typo
* sort based on speed
* test if test works in ci
* Revert "test if test works in ci"
This reverts commit 1f05edb531 .
* do not pad thread
2025-09-06 16:13:43 +03:00
nimlgen and GitHub
2b1844da27
cpu: support several threads in runtime ( #12055 )
2025-09-06 13:29:31 +03:00
nimlgen and GitHub
f37b836618
factor out _globalizable_rngs ( #12054 )
2025-09-06 13:29:23 +03:00
nimlgen and GitHub
1630c87d0e
run optimize_local_size only when locals supported ( #12056 )
2025-09-06 13:29:09 +03:00
Jordan Chalupka and GitHub
48ec5efad9
only run autogen tests on change ( #12049 )
...
* only run autogen tests on change
* example change
* rm example change
2025-09-05 23:53:01 -07:00
Sieds Lykles and GitHub
581b2388c2
add dtypes.index ( #12015 )
...
* add dtypes.index
* cast shape, stride and mask to dtypes.index in view.create
* move pm_lower_index_dtype to ops
* DEFINE_VAR is dtype.index by default
* merge var_val_using_str
* remove int from commutative
* fix test_rewrite_map
* change that to dtypes.index
* change some int to index
* shorten those
* remove old cast in renderer
* cleanup
* change that back
* add comment
* delete comment
* just delete those
* view doesnt have to cast anymore
* adjust comment
2025-09-06 06:03:44 +02:00
Sieds Lykles and GitHub
c6c16b2946
var_vals uses str for var (#12011 )
...
* var_vals is str,int
* remove imports
* remove print
* fix test
* change var_vals in hcq
* update test_hcq
* fix multitensor _device_num var
* fix syminfer test
* shorten line
* p.vars stays list[Variable]
* shorten line
* vars is back to tuple[Variable, ...]
* change var_vals in extra
* change var_vals from shapetracker
* var_vals is str:int
* fix signature
2025-09-06 04:16:12 +02:00
geohot
8658a97197
hotfix: name the shift rewrite better + no ctx there
2025-09-05 19:01:59 -07:00
George Hotz and GitHub
6ef3270fc8
fix opt gate ( #12050 )
2025-09-05 18:59:54 -07:00
geohot
66c5206b42
hotfix: minimal scheduler copy
2025-09-05 18:24:00 -07:00
geohot
478e758755
Revert "fix scheduler copy ( #12048 )"
...
This reverts commit 51b7c40788 .
2025-09-05 18:21:55 -07:00
George Hotz and GitHub
51b7c40788
fix scheduler copy ( #12048 )
...
* fix scheduler copy
* hand coded opt only runs once
2025-09-05 17:17:49 -07:00
George Hotz and GitHub
0123c394e5
early simplfy_merge_adjacent ( #12045 )
...
* do simplify_merge_adjacent before schedule
* do simplify_merge_adjacent before schedule
* disable that slow test
2025-09-05 16:39:20 -07:00
George Hotz and GitHub
8423c06144
delete unused bufs_from_lin ( #12044 )
2025-09-05 16:08:28 -07:00
George Hotz and GitHub
38dcadf07b
delete kernel.py ( #12040 )
...
* delete kernel.py
* delete that file
* rip and tear
* don't test search
* imports
* fix torch frontend
* not a part of regen
2025-09-05 15:52:07 -07:00
George Hotz and GitHub
ee4f696086
delete more tests ( #12043 )
...
* delete more tests
* delete and simplify
* flaky on windows
* a few more, those remained
2025-09-05 15:31:30 -07:00
George Hotz and GitHub
12c7b1bb01
cleanup lin tests without Kernel ( #12041 )
...
* cleanup lin tests without Kernel
* no kernel.py there
* remove that test
2025-09-05 15:13:14 -07:00
Sieds Lykles and GitHub
8435d2d23b
fix openpilot speed regeression ( #12039 )
...
* set local_size=None if special.arg[0]=='i'
* add cast back
2025-09-06 00:05:45 +02:00
George Hotz and GitHub
e00858a2c3
only POSTOPT ( #12038 )
2025-09-05 14:46:33 -07:00
George Hotz and GitHub
433581f8ed
make POSTOPT=2 the default ( #12034 )
...
* make POSTOPT=2 the default
* more matching tc
* fix winograd
* fix that test
* add matvec to Scheduler
* flip tc sort order
* similar speed
* fix beam on image
* disable slow tests
* slow
2025-09-05 14:34:05 -07:00
chenyu and GitHub
3b41a04b96
remove test_openpilot in test_onnx ( #12037 )
...
openpilot is tested in compile3
2025-09-05 16:20:03 -04:00
Sieds Lykles and GitHub
290521f68e
add check for z3>=4.12.4 ( #12035 )
2025-09-05 20:33:26 +02:00
George Hotz and GitHub
870f63d9cc
add WARP axistype, fix postopt bugs ( #12033 )
...
* postopt is 83% match
* warp is bright CYAN
* beautiful mnist beam works
* fix shutdown bug
2025-09-05 10:36:55 -07:00
chenyu and GitHub
4c2d4f683a
lower universal_test_unary cos domain ( #12032 )
...
flaky
2025-09-05 12:19:44 -04:00
chenyu and GitHub
a340723bf1
SKIP_SLOW_TEST=1 for nv CI ( #12031 )
2025-09-05 11:52:02 -04:00
chenyu and GitHub
ce7163e9b4
clean up skip slow tests in PYTHON ( #12028 )
...
skip with SKIP_SLOW_TEST and decorators
2025-09-05 11:35:26 -04:00
qazal and GitHub
f08299d2ec
viz: small profiler resizing improvements ( #12026 )
...
* switch to ResizeObserver
* set a fixed size for device-list
* less
* height from devices
* int
* side rect, more const
2025-09-05 18:29:03 +03:00
chenyu and GitHub
5dcc4c7f1b
skip test_linalg in windows unit test ( #12030 )
2025-09-05 11:28:40 -04:00
George Hotz and GitHub
f8e2dd4dd1
investigate opts mismatches ( #12020 )
2025-09-05 07:40:29 -07:00
chenyu and GitHub
e0da644171
lower sample count in test_multinomial ( #12027 )
2025-09-05 10:10:28 -04:00
chenyu and GitHub
9b6f1b86cb
add Tensor.maximum in test_dtype_alu ( #12025 )
...
works except nan
2025-09-05 09:48:39 -04:00
nimlgen and GitHub
3e1c04bcdf
jit: noopt for copy buffers ( #12023 )
2025-09-05 16:04:35 +03:00
qazal and GitHub
ab413ce72f
viz: give tooltips a max-width ( #12022 )
...
* viz: give tooltips a max-width
* better
2025-09-05 14:25:38 +03:00
qazal and GitHub
f461ccf407
exclude op2 nan lt in test_dtype_alu ( #12024 )
...
failure: https://github.com/tinygrad/tinygrad/actions/runs/17490320000/job/49679581331?pr=12022#step:6:125
2025-09-05 14:14:22 +03:00
nimlgen and GitHub
4fcea8493d
viz: add label to tooltip ( #12021 )
2025-09-05 13:06:33 +03:00
George Hotz and GitHub
2b5a73ac65
improve test_linearizer ( #12016 )
...
* improve test_linearizer
* tweaks
* simpler
* get_prg
* that one doesn't have to return
* fix postopt bugs
* fix rng
2025-09-04 20:44:05 -07:00
chenyu and GitHub
7f3df6ea21
exclude nan in test_dtype_alu lt ( #12019 )
2025-09-04 23:38:37 -04:00
Sieds Lykles and GitHub
f5404ca53c
Divmod combine - associative variations ( #12017 )
...
* add rule and test
* more rules and tests
* add all four variations
* fix test
* test fixed!
* adjust commment
* add new variations
* disable intel tensor core ops count test for bigger_matmul_half
2025-09-05 03:44:02 +02:00
chenyu and GitHub
677220ae7e
test_tesnor_data to unit/ ( #12013 )
2025-09-04 19:58:27 -04:00
George Hotz and GitHub
431666da74
POSTOPT=2 work ( #12012 )
...
* POSTOPT=2 work
* bugfixes
* add chain in one place
* tensor cores match
* better hcopt check
* match from old
* Change POSTOPT ContextVar value to 0
* we didn't need to check that
2025-09-04 16:55:56 -07:00
George Hotz and GitHub
30eb42a69e
fix POSTOPT pad ( #11999 )
...
* fix POSTOPT=1
* fix some tests
* Revert "fix some tests"
This reverts commit 8ee058e206 .
* fix padding restrictions
* cuda has two tensor cores
* Set POSTOPT ContextVar to 0 in helpers.py
2025-09-04 14:28:58 -07:00
qazal and GitHub
da61b40604
some viz tests don't need track_rewrites ( #12010 )
2025-09-04 23:59:32 +03:00
qazal and GitHub
be364a1adb
viz: add default tracing group ( #12009 )
...
This enables seeing rewrites in unit tests like `VIZ=1 python3 test/test_uop_graph.py TestUOpGraph.test_in_bounds_access_gated_local` that call graph_rewrite directly.
`@track_rewrites` keeps existing as an optional helper to organize larger traces.
2025-09-04 23:29:56 +03:00
chenyu and GitHub
52166fd7eb
smaller test_ops inputs ( #12007 )
2025-09-04 16:22:33 -04:00
chenyu and GitHub
dc8501af30
clean up wino tests ( #12008 )
...
removed the one that tests hcopt and added one for backward kernel counts
2025-09-04 16:14:55 -04:00
chenyu and GitHub
8c720e8760
less iterations for symbolic double for loops ( #12006 )
2025-09-04 15:09:17 -04:00
George Hotz and GitHub
70ce29b630
test pyrender ( #12005 )
...
* test pyrender
* make them print
* switch to pyrendered
2025-09-04 11:48:40 -07:00
George Hotz and GitHub
560df206cc
split tc test ( #12003 )
...
* split tc test
* split hand coded opts
* remove some skipped tests
* skips on emulated
2025-09-04 11:47:56 -07:00
qazal and GitHub
4996bb668b
load all traces before asserting in test_viz ( #12004 )
2025-09-04 21:34:48 +03:00
George Hotz and GitHub
9dee724fc4
make EMULATE a context var ( #12002 )
...
* make EMULATE a context var
* fix test amx
2025-09-04 11:15:43 -07:00
George Hotz and GitHub
09106e4aae
refactor and split test_linearizer ( #12001 )
...
* refactor and split test_linearizer
* forget that file
* imports
* remove from docs
* test gen float4
2025-09-04 10:53:07 -07:00
chenyu and GitHub
fb71d1e5fd
delete some test_search tests ( #11998 )
...
TC_SEARCH_OVER_SHAPE was removed so should the tests
2025-09-04 11:19:49 -04:00
chenyu and GitHub
ca7574cb2d
ci set PYTHONPATH for all ( #11997 )
2025-09-04 10:06:04 -04:00
nimlgen and GitHub
e213b85810
cpu: add thread_id to worker ( #11995 )
2025-09-04 14:58:13 +03:00
qazal and GitHub
35f37a64a9
viz: remove useless ctx.save and restore calls ( #11996 )
...
It's a UI no-op since we always set the styles right before drawing.
2025-09-04 14:56:41 +03:00
Sieds Lykles and GitHub
572a3c15c6
Move Ops.SPECIAL arg to src ( #11918 )
...
* initial moving bound to src
* arg to src
* remove import
* fixup linearizer
* arg to src
* fix test_uop_graph
* fix more tests
* fix python renderer
* get const value from const uop
* ssimplify uop estimates
* fix webgpu locals
* fix old test
* gate Ops.SPECIAL in linearizer
* use ssimplify() for local/global_size
* remove toposort gate_parents_instead_of_self
* fix rendering in comment
* cleanup
* rename and add comments
* add BottomUpGate with test
2025-09-04 09:31:44 +02:00
George Hotz and GitHub
5cf42dc4db
add Scheduler to replace Kernel with POSTOPT=2 ( #11924 )
...
* ** simple kernel to replace Kernel for postopt
* support old
* fix beam
* beaming
* beam on old
* bring tensor cores back
* raise
* postbeam
* test ops passes on mac
* skip that
* postopt default
* gate that
* fix tensor cores
* a few test fixes
* dsp fix
* tc fix
* loop
* support swap
* test_gemv
* fix beam for variable
* test opts from high level stuff
* range annoying
* compile slow
* metal slow
* better beam
* no POSTBEAM
* fix nolocals
* hc opt mostly works
* put that back
* lil
* some work
* fix that
* POSTOPT 2
* fix tests
* no postopt 2
* work
* back
* padded tensors cores
* shift_to
* postopt 0 passes?
* write PADTO
* fix padded tensor cores
* compare hcopt
* 18000 lines
* should pass tests
* fix rangeify
* put types back
2025-09-03 19:23:30 -07:00
chenyu and GitHub
b13e071463
move test_winograd to unit test ( #11993 )
2025-09-03 21:47:32 -04:00
chenyu and GitHub
edc8b99853
more tests that pass PTX now ( #11992 )
2025-09-03 21:18:14 -04:00
chenyu and GitHub
ed2f45712b
remove skip PTX in test_arange ( #11991 )
...
all passes now
2025-09-03 20:45:19 -04:00
George Hotz and GitHub
a5f2b4872a
use_tensor_cores is a heuristic ( #11989 )
...
* use_tensor_cores is a heuristic
* context
2025-09-03 17:05:10 -07:00
George Hotz and GitHub
63e930fec3
apply_tensor_cores is a heuristic ( #11988 )
...
* apply_tensor_cores is a heuristic
* delete extra_opts
2025-09-03 16:39:33 -07:00
chenyu and GitHub
d0e739453e
update many einsum tests ( #11981 )
...
correct the exception testing, and raise ValueError instead of assert when checking args
2025-09-03 15:40:20 -04:00
George Hotz and GitHub
55e4bdd353
split_uop is a method ( #11984 )
2025-09-03 10:46:17 -07:00
ttomsa and GitHub
1877eddde4
broadcast for upat ( #11940 )
2025-09-03 10:04:23 -07:00
George Hotz and GitHub
5ed262982a
remove some tc hacks from BEAM ( #11980 )
...
* remove some tc hacks from BEAM
* cosmetic changes
* revert that
2025-09-03 09:59:10 -07:00
6d53cac457
dtype fuzz: log need input > 0 ( #11979 )
...
Co-authored-by: b1tg <[email protected] >
2025-09-03 12:10:42 -04:00
Jordan Chalupka and GitHub
68e83b850f
nbytes should raise an exception when size is unlimited ( #11928 )
...
* nbytes should raise an exception when size is unlimited
* adding a test
2025-09-03 07:06:20 -07:00
Sieds Lykles and GitHub
86e908db57
cast parents of int64 alu to int32 if possible ( #11977 )
...
* add overflows helper
* add rules
* x -> y
* check overflow of u too
* cleaner
* use alu instead of replace to preserve vectorization
* just one rule
* add test
2025-09-03 11:05:04 +02:00
Sieds Lykles and GitHub
033184b3cb
parse_valid with non const rhs ( #11957 )
...
* const to using vmin/vmax
* add test
* convert to int
* remove left over part of and
2025-09-03 08:08:46 +02:00
Sieds Lykles and GitHub
53eff8970a
add Ops.GEP to _min_max ( #11976 )
2025-09-03 07:07:54 +02:00
Sieds Lykles and GitHub
d1d0960e6e
remove intermediate cast using bounds - weaker pattern ( #11974 )
2025-09-03 06:24:40 +02:00
Sieds Lykles and GitHub
8a2846b31a
assert embedding input is integer dtype ( #11963 )
...
* cast embedding input
* raise error if not using int for index embedding
2025-09-03 01:44:26 +02:00
wozeparrot and GitHub
d16cc6c012
feat: resume ckpt ( #11970 )
2025-09-02 15:47:48 -07:00
George Hotz and GitHub
1b73993521
pyrender to render uops ( #11968 )
...
* pyrender to render uops
* new pyrender style
* pyrender works
* list str
* store render
2025-09-02 15:44:01 -07:00
chenyu and GitHub
e921fb44ee
clean up testnvidia env ( #11969 )
2025-09-02 18:29:00 -04:00
chenyu and GitHub
69dd1817d0
raise RuntimeError in merge_dicts instead of assert [pr] ( #11965 )
2025-09-02 17:18:44 -04:00
qazal and GitHub
f750c15965
viz: add python marker ( #11952 )
...
* viz: add python marker
* remove duplicate
2025-09-02 23:44:00 +03:00
George Hotz and GitHub
550cf2ca7f
tests from postopt ( #11964 )
...
* tests from postopt
* reraise is fine
2025-09-02 13:34:17 -07:00
qazal and GitHub
b977ec0813
viz: axes domains cleanup ( #11962 )
2025-09-02 19:30:45 +03:00
nimlgen and GitHub
897254ad6c
ci: add dev<->cpu copy speeds ( #11959 )
2025-09-02 15:22:44 +03:00
George Hotz and GitHub
74040663bf
make ptrdtype a UOp property ( #11955 )
2025-09-01 16:35:43 -07:00
George Hotz and GitHub
0dfca4e74b
add failing test for rangeify setitem ( #11954 )
2025-09-01 16:24:35 -07:00
wozeparrot and GitHub
7c21271a5f
feat: end_lr envvar ( #11953 )
2025-09-01 14:53:07 -07:00
chenyu and GitHub
6a40216724
correct bf16 fuzz input in test_dtype_alu ( #11933 )
...
it was using float16 inputs, now it's uint16 then convert to bf16
2025-09-01 10:52:26 -04:00
chenyu and GitHub
965ea59b16
test_dtype_alu use AMD_LLVM from helpers ( #11950 )
2025-09-01 10:03:17 -04:00
a9f07c31bc
fix amd llvm sqrt ( #11936 )
...
* fix amd llvm sqrt
* lint
---------
Co-authored-by: b1tg <[email protected] >
Co-authored-by: chenyu <[email protected] >
2025-09-01 09:31:14 -04:00
qazal and GitHub
0a53e72f70
viz: fix trace duration in python test decoder ( #11949 )
2025-09-01 14:32:25 +03:00
qazal and GitHub
27c9ed5a84
viz: more consistent naming of events ( #11948 )
...
* s/shapes/events in test_viz
* s/bufs/events in the memory packer
2025-09-01 14:16:47 +03:00
qazal and GitHub
c7bb561ef9
remu: add v_rsq_f32_e32 instruction ( #11947 )
...
https://github.com/tinygrad/tinygrad/pull/11936 introduces a change to
the AMD LLVM renderer that outputs this instruction. Adding both 32 and
64 bit variants.
2025-09-01 11:29:31 +03:00
Sieds Lykles and GitHub
d9560a631c
remove cast between ints if safe ( #11946 )
2025-09-01 05:56:49 +02:00
Sieds Lykles and GitHub
a19d689481
fix vec dtype _min_max ( #11944 )
2025-09-01 03:24:07 +02:00
Sieds Lykles and GitHub
f32f3464d6
Can safe cast from certain ints to floats ( #11941 )
...
* add rule
* add some tests
* prevent infinite loop with bfloat16
* add some ints to double and float can_safe_cast
* add tests
2025-09-01 00:51:24 +02:00
Sieds Lykles and GitHub
1c6e43c203
Double cast is one cast if intermediate cast is safe ( #11939 )
...
* add rule
* add some tests
* prevent infinite loop with bfloat16
* prevent more infinite rewrite
2025-09-01 00:36:29 +02:00
wozeparrot and GitHub
7e68045fb2
feat: small llama3 training ( #11829 )
2025-08-31 13:41:47 -07:00
nimlgen and GitHub
020abe0556
hcq: finalize without synchronization when in error state ( #11872 )
...
* hcq: finalize without synchronization when in error state
* ooops
* fix
* fix
* fix
2025-08-31 18:39:13 +03:00
qazal and GitHub
2004c9757d
tracing: add default clock ( #11935 )
2025-08-31 18:24:44 +03:00
c1eeb3b99c
only skip AMD_LLVM ( #11934 )
...
Co-authored-by: b1tg <[email protected] >
2025-08-31 18:15:47 +03:00
75d380a77c
fix transcendentals in python renderer ( #11932 )
...
* fix transcendentals in python renderer
* add test
---------
Co-authored-by: b1tg <[email protected] >
2025-08-31 09:37:17 -04:00
Sieds Lykles and GitHub
61e4dc6ad5
render special arg in cstyle if arg is UOp ( #11931 )
2025-08-31 07:01:29 +02:00
Sieds Lykles and GitHub
d3252ccd85
fix special vmax when arg is UOp ( #11930 )
2025-08-31 06:54:39 +02:00
qazal and GitHub
0bacd9fc9b
viz: give disassembly its own node ( #11927 )
2025-08-31 00:28:52 +03:00
chenyu and GitHub
af89be317e
relax rtol for bfloat16 test_dtype_alu ( #11926 )
2025-08-30 17:16:08 -04:00
George Hotz and GitHub
632c2fb119
lowerer works on rangeifed + print exception ( #11925 )
2025-08-30 12:05:44 -07:00
qazal and GitHub
c27b99d68f
viz: refactor to indexed rewrite traces ( #11923 )
2025-08-30 20:01:47 +03:00
qazal and GitHub
9aff00a6ea
switch viz command line args to pathlib ( #11922 )
2025-08-30 18:13:47 +03:00
qazal and GitHub
c86ee5bfaf
viz: canonicalize device name colors ( #11921 )
2025-08-30 18:12:30 +03:00
nimlgen and GitHub
a4f05ebd1a
ci: rebuild gpuocelot with boost libs ( #11920 )
2025-08-30 17:24:19 +03:00
qazal and GitHub
bf0d055b39
viz: color by name ( #11919 )
2025-08-30 16:04:58 +03:00
Sieds Lykles and GitHub
0bc34c000f
simplify range mod its own upper bound ( #11917 )
...
* add rules
* add tests
2025-08-30 08:37:35 +02:00
chenyu and GitHub
561318fea7
Tensor.cos in test_stype_alu ( #11916 )
...
* Tensor.cos in test_stype_alu
* need this fix anyway
2025-08-29 20:26:36 -04:00
0838021753
remove np from beautiful_cifar ( #10988 )
...
* remove np from beautiful_cifar
* remove np from cifar
* rename variable and rename tensor.arrange to just tensor.randperm
---------
Co-authored-by: chenyu <[email protected] >
2025-08-29 19:34:16 -04:00
nimlgen and GitHub
cf9d8c8142
ci: pin boost for macos runners ( #11910 )
2025-08-30 01:38:06 +03:00
nimlgen and GitHub
c6e342cdac
mockgpu: no hang if gpuocelot failed ( #11915 )
2025-08-30 00:44:49 +03:00
chenyu and GitHub
26d03a86a1
test_symbolic_ops.py cleanup ( #11895 )
2025-08-29 17:11:59 -04:00
b2cc06218a
python bfloat16 ( #11912 )
...
* python bf16
* _to_torch_storage_type
---------
Co-authored-by: b1tg <[email protected] >
2025-08-29 15:18:02 -04:00
George Hotz and GitHub
afad7d0cd1
remove dtype from range, it will be dtypes.index soon [pr] ( #11914 )
...
* remove dtype from range, it will be dtypes.index soon [pr]
* a few more
2025-08-29 09:52:07 -07:00
qazal and GitHub
30e72d5820
multi device and copy tracing for NULL device ( #11913 )
...
* add device name to NULL programs
* trace transfers
2025-08-29 15:31:00 +03:00
qazal and GitHub
d8e1e4dc61
tracing: show NULL programs ( #11911 )
2025-08-29 14:09:33 +03:00
nimlgen and GitHub
75678b2cbe
amd: retire pm4 xcc sync ( #11835 )
...
* amd: aql default when several xccs
* amd: retire om4 xcc sync
* remove more
* more
* more
2025-08-29 09:56:27 +03:00
George Hotz and GitHub
394c2d1db1
update Kernel API in tests + move optimize_local_size ( #11907 )
2025-08-28 15:12:47 -07:00
nimlgen and GitHub
fa695ac1ce
ci: mac gpuocelot ( #11906 )
...
* gm
* fix?
* ops
* imp
* xx
* add file
2025-08-28 23:29:43 +03:00
George Hotz and GitHub
b9b438c516
small updates from postopt ( #11903 )
...
* tests from postopt
* modernize
* skip lin tests
* that's fixed?
* skip, not failure
2025-08-28 12:34:52 -07:00
nimlgen and GitHub
bb55a3001f
nv: flush reset message ( #11897 )
2025-08-28 22:17:20 +03:00
nimlgen and GitHub
e8289c75b1
ci: do not reinstall existing pkgs in macos ( #11900 )
2025-08-28 21:20:15 +03:00
chenyu and GitHub
134cf56904
update cache name for gpuocelot ( #11896 )
2025-08-28 13:11:10 -04:00
ea1be2e4cd
[bounty] Remove using reshape to register symbolic shape ( #11771 )
...
* Modify tests and start work towards removing symbolic reshape
* Refactor symbolic reshape
* fix small error
* much cleaner + fix more tests
* Can remove this now
* Update test_symbolic_ops and test_tiny
* Couple more tests
* Unused import
* More tests and add EXPAND to Tensor.empty
* Fix test beam search
* all int
* Fix rangeify by adding shrink
* Remove OOB check and so fix test_symbolic_jit
* test_symbolic_jit doesn't need OOB Context anymore either
* Should remove that test now
* Cleanups part 1
* fix linters
* Final cleanups
* Don't reassign inside for loop
---------
Co-authored-by: chenyu <[email protected] >
2025-08-28 12:30:49 -04:00
qazal and GitHub
53853ae49b
viz: switch to Path2D ( #11892 )
2025-08-28 18:58:16 +03:00
nimlgen and GitHub
874c1db4af
am: init support for aql ( #11888 )
2025-08-28 18:41:46 +03:00
17ecaf4682
Add test_variable_empty ( #11889 )
...
* Add test_variable_empty
* Move test and add TODO
---------
Co-authored-by: chenyu <[email protected] >
2025-08-28 11:38:27 -04:00
Nino Risteski and GitHub
54be477152
rope cache optim for jit prune in llm.py ( #11678 )
...
* rope cache optim for jit prune
* rope test
* tests in test attention
* Revert "rope test"
This reverts commit 69ede543d0 .
* lint
2025-08-28 08:31:29 -07:00
quortus and GitHub
5f8fe9a331
Replace ASSIGN with STORE in test_linearizer ( #11821 )
2025-08-28 07:33:20 -07:00
4e8370309c
Support onnx If OP ( #11648 )
...
* start
* tiny clean up
* whoops, didn't mean to accidentally fix this
* fix .to(device), kinda hacky and this fix makes it slower?
* merge properly
* FINALLY figured out slowness, also hack pylint for now
* add DEBUGONNX print for subgraph
* oops
* WOOOOOOOO SHAPE CACHE 50% SPEED INCREASE
* small fix, but maybe all deterministic Tensor creation in fp should be cached
* cache condition
* sliiiightly cleaner
* better abstraction?
* remove sam from model_benchmark
* remove shape cache speed up for now
* less lines
* isinstance fix
---------
Co-authored-by: chenyu <[email protected] >
2025-08-28 10:17:35 -04:00
George Hotz and GitHub
6d6f0dada7
support for tuple ranges ( #11890 )
...
* support for tuple ranges
* breaks it
2025-08-28 07:02:31 -07:00
nimlgen and GitHub
60dd9a162c
memory: tiny tlsf cleanup ( #11887 )
2025-08-28 14:07:18 +03:00
chenyu and GitHub
beb5982165
FUSE_ATTENTION ( #11884 )
2025-08-27 19:59:17 -04:00
George Hotz and GitHub
cb5295168d
postrange boilerplate work ( #11881 )
2025-08-27 15:22:59 -07:00
George Hotz and GitHub
fd579433bc
pre expander shouldn't go in gpudims ( #11880 )
2025-08-27 14:52:24 -07:00
nimlgen and GitHub
44816218b5
memplan: fix large buffers planning ( #11878 )
...
* memplan: fix large buffers planning
* fix
* fix dsp
2025-08-27 23:54:27 +03:00
nimlgen and GitHub
4006366752
Revert "memplan: fix large buffers planning ( #11876 )" ( #11877 )
...
This reverts commit 7f90497efc .
2025-08-27 22:36:14 +03:00
nimlgen and GitHub
7f90497efc
memplan: fix large buffers planning ( #11876 )
...
* memplan: fix large buffers planning
* fix
2025-08-27 22:04:15 +03:00
George Hotz and GitHub
e4afdf9ea1
improve DEBUG=2 string with TB/s and TFLOPS [pr] ( #11875 )
2025-08-27 11:42:41 -07:00
Jordan Chalupka and GitHub
e9789d8a70
Add mxfp4 support ( #11873 )
...
* bump ggml url
* map mxfp4 to tensor
* tests
2025-08-27 10:56:56 -07:00
qazal and GitHub
884eb53e89
tracing: fix types ( #11871 )
...
* tracing: fix types
* /profiler isn't a thing
* return list
2025-08-27 15:50:43 +03:00
Sieds Lykles and GitHub
d39365809a
add ctx to z3_renderer arg ( #11867 )
...
* add ctx to z3_renderer arg
* update symbolic fuzzer
* rewrite u1,u2,u3
* update fuzz_fast_idiv
* remove imports
2025-08-27 03:38:15 +02:00
George Hotz and GitHub
24c00a4061
darken hex on viz ( #11865 )
...
* darken hex on viz
* more readable
2025-08-26 15:57:50 -07:00
qazal and GitHub
f38e4af226
viz: add custom zoom filter ( #11861 )
2025-08-27 01:30:29 +03:00
nimlgen and GitHub
62df6c39af
amd: correct handling of relocations ( #11863 )
...
* amd: correct handling of relocations
* ops
* add
2025-08-27 01:26:45 +03:00
George Hotz and GitHub
d261458ecd
add colors to range ( #11860 )
2025-08-26 14:32:12 -07:00
Sieds Lykles and GitHub
7dfc7e4abc
uops_to_z3 helper( #11859 )
2025-08-26 22:58:05 +02:00
chenyu and GitHub
1bbb578afd
named expression for POW and MAX gradient ( #11858 )
2025-08-26 16:03:03 -04:00
chenyu and GitHub
7028cb4167
clean up TestBitcastConstFolding ( #11856 )
2025-08-26 15:26:47 -04:00
George Hotz and GitHub
d4154e0349
split devectorizing of buf/index ( #11855 )
2025-08-26 12:05:48 -07:00
George Hotz and GitHub
b268755d51
small changes from postopt ( #11854 )
2025-08-26 11:56:16 -07:00
Sieds Lykles and GitHub
a3aeef45cc
associative variation of where branch-merging ( #11851 )
...
* add rule and test
* change comment
2025-08-26 19:27:05 +02:00
chenyu and GitHub
aabe7756be
fix type in fold_bitcast [pr] ( #11853 )
2025-08-26 13:22:30 -04:00
Jordan Chalupka and GitHub
4785cd959a
[TYPED=1] cvar should allow dtype as a tuple ( #11770 )
...
* cvar dtype:DType|tuple[DType, ...]|None=None
* fmt
* add a test
* list typeguard as a dep for CI
* extra step to install mypy
* fix venv
* ci fixes
* mv typeguard to testing install group
* simpler TYPED=1 test
* add typeguard to lint group
2025-08-26 12:49:51 -04:00
qazal and GitHub
b111076301
viz: fixup click on overlay rect ( #11850 )
2025-08-26 19:25:42 +03:00
1dd613cb89
test float_to_bf16 round-to-even behavior ( #11849 )
...
Co-authored-by: b1tg <[email protected] >
2025-08-26 12:16:10 -04:00
409399c609
fix nan in float_to_bf16 ( #11843 )
...
Co-authored-by: b1tg <[email protected] >
2025-08-26 11:42:25 -04:00
qazal and GitHub
43d5d66d34
viz: add UOp ports to edges ( #11847 )
...
* viz: add UOp ports to edges
* one edge label
* g.tag styling
* replace with NodeList
2025-08-26 18:31:52 +03:00
chenyu and GitHub
f28f613f85
improved float_to_bf16 ( #11848 )
...
round instead of truncate
2025-08-26 11:14:06 -04:00
nimlgen and GitHub
afe14ccbfa
amd: aql default when several xccs ( #11832 )
2025-08-26 15:16:36 +03:00
qazal and GitHub
3674c0754e
viz: small uop click changes ( #11846 )
...
* also highlight self
* can always unselect by clicking outside
* less layout
2025-08-26 14:56:13 +03:00
qazal and GitHub
f2a3c27372
viz: g.edges() once ( #11845 )
2025-08-26 13:29:59 +03:00
qazal and GitHub
b0df3e62a8
viz: light up srcs and paths on UOp click ( #11844 )
...
* viz: light up srcs and paths on UOp click
* safari doesn't have context-stroke
* safari also has a bug
* safari acceptance
2025-08-26 09:03:09 +03:00
qazal and GitHub
6236749867
viz: move rect styles to classes ( #11842 )
...
* viz: move rect styles to classes
* add rect
2025-08-26 07:55:34 +03:00
qazal and GitHub
81ffa07439
viz: pass through nodes without a link ( #11841 )
2025-08-26 07:00:43 +03:00
Sieds Lykles and GitHub
265d287615
add decomp for !x&!y -> !(x|y) ( #11836 )
2025-08-26 05:21:06 +02:00
chenyu and GitHub
337e979a59
call dtypes.as_const in Tensor(list) ( #11840 )
2025-08-25 22:08:26 -04:00
George Hotz and GitHub
215818379b
new (post) group for reduce ( #11837 )
...
* new (post) group for reduce
* fixes
* leave if
* fix locals
* size
* no vectorized buf
* image fixes
* don't track that
* fix ptx
* name buffer with reduce range
* remove unused in lowerer
* yay DEFINE_REG refactor
2025-08-25 18:03:00 -07:00
chenyu and GitHub
ac3449b0c8
truncate_fp16 cleanup ( #11838 )
...
native `@` is default
2025-08-25 19:03:41 -04:00
qazal and GitHub
e146418f65
hotfix: profiler content-type is application/octet-stream ( #11831 )
2025-08-25 15:56:42 +03:00
qazal and GitHub
a1f6823060
viz: memory layout in client side ( #11830 )
...
* viz: memory layout in client side
* update test_viz
2025-08-25 14:49:33 +03:00
George Hotz and GitHub
a6dbb09058
changes for postrange ( #11828 )
2025-08-24 17:37:07 -07:00
George Hotz and GitHub
27701ef823
add locals support to rangeify ( #11826 )
2025-08-24 14:03:12 -07:00
Sieds Lykles and GitHub
a286a1a6f7
Fast idiv try removing factors of two before cast ( #11824 )
...
* try removing factors of two
* dont return if None
* add test
2025-08-24 20:04:25 +02:00
geohot
a03b930339
hotfix: green v2 in docs
2025-08-24 10:25:14 -07:00
George Hotz and GitHub
6540bb32a6
move into codegen late [pr] ( #11823 )
2025-08-24 10:23:25 -07:00
nimlgen and GitHub
bba088ef11
amd aql queue ( #11708 )
...
* amd aql queue
* xcc
* fiz
* aql better
* llvm
* no for aql
* wrap
* is_sql
* am support
* complete
* fix
* mypy
* minor
2025-08-24 19:53:00 +03:00
George Hotz and GitHub
1fa09d9ede
BLOCK_REORDER is context var, heuristic cleanups [pr] ( #11819 )
...
* BLOCK_REORDER is context var, heuristic cleanups [pr]
* split get opt and do opt
* oops, should be on
2025-08-24 09:41:34 -07:00
qazal and GitHub
8b18cc2a94
viz memory layout cleanup ( #11820 )
...
* rename to dtype_size
* cleanr memory shape creator
2025-08-24 19:37:31 +03:00
Sieds Lykles and GitHub
dd69114573
Revert "Better div nesting ( #11811 )" ( #11818 )
...
This reverts commit 952f729b07 .
2025-08-24 18:11:24 +02:00
nimlgen and GitHub
e19f901330
amd: rptr/wptr in create_queue ( #11817 )
2025-08-24 18:03:45 +03:00
nimlgen and GitHub
d71444857e
amd: apply relocs for kernel_code_entry_byte_offset for AMD_LLVM ( #11816 )
...
* amd: apply relocs for kernel_code_entry_byte_offset for AMD_LLVM
* fix
2025-08-24 17:48:40 +03:00
George Hotz and GitHub
44bc7dc73d
remove KernelInfo from GROUP_REDUCE ( #11814 )
2025-08-23 19:55:41 -07:00
George Hotz and GitHub
229adfb7c3
Revert "remove KernelInfo from gpudims ( #11809 )" ( #11813 )
...
This reverts commit 846753f343 .
2025-08-23 19:37:10 -07:00
Sieds Lykles and GitHub
952f729b07
Better div nesting ( #11811 )
...
* remove check
* use fold_divmod_congruence instead of simplify
* adjust tests
* shorten line
2025-08-24 04:17:40 +02:00
Sieds Lykles and GitHub
e652062f92
tweak divmod_folding condition ( #11810 )
2025-08-24 02:59:02 +02:00
George Hotz and GitHub
846753f343
remove KernelInfo from gpudims ( #11809 )
...
* remove KernelInfo from gpudims
* that's good in there
2025-08-23 16:32:45 -07:00
Sieds Lykles and GitHub
07d4ed7e4c
one more symbolic add variation ( #11807 )
2025-08-24 01:15:04 +02:00
qazal and GitHub
759ebea4eb
viz: reflect timeline API boundary in names ( #11808 )
...
* define shapes once
* depth isn't an event property
* update server naming
2025-08-24 02:12:12 +03:00
George Hotz and GitHub
132f09fab7
global/locals from AxisType in range ( #11806 )
2025-08-23 15:49:17 -07:00
qazal and GitHub
0d86288bd7
viz: calculate timeline fixed points in client side ( #11805 )
...
* viz: calculate timeline fixed points in client side
* 26 bytes / event
* math
2025-08-24 01:44:40 +03:00
George Hotz and GitHub
a75da49951
use AxisType for UPCAST/UNROLL ( #11800 )
...
* use AxisType for UPCAST/UNROLL
* fixes
* fix the bug
* fix hack
* bad test
* flaky test
2025-08-23 14:44:48 -07:00
qazal and GitHub
2407fecdae
viz bytepack format ( #11792 )
...
* viz bytepack format
Training a 1B llama yields ~20M profiler events.
With JSON serialization, the browser tries to load 6GB to memory. This OOMs since each tab is limited to <3-4GB memory usage. Using a packed format, we only need ~600MB.
**Design decisions:**
- Timestamps are in microseconds relative to start time. They're stored in u32, which can express up to ~1 hr of trace events.
- Strings (kernel names, metadata, etc) are deduped.
- Buffer sizes are in u64 nbytes.
More optimization possible:
- The string lookup is a JSON dumped array, we can compress this.
- Can store less for memory by moving the layout to client.
**Results**
| | Events | JSON | bytepack |
|----------------|---------|-------------|-------------|
| DP=8 llama 1B train (`command: [1]`) | 24M | 5.8GB | 640MB |
| examples/beautiful_mnist.py | 16K | 3.7MB | 745KB |
| examples/gpt2.py | 55K | 12.54MB | 1.40MB |
`[1]`: `VIZ=1 FAKEDATA=1 OFFLOAD_OPTIM=1 DP=8 BS=8 GRADIENT_ACC_STEPS=2 BLOCK_REORDER=0 LR=3e-4 TRAIN_ON_VAL=1 DEFAULT_FLOAT=bfloat16 OPTIM_DTYPE=bfloat16 LLAMA3_SIZE=1B WARMUP_STEPS=36 DECAY_STEPS=360 SEQLEN=8192 PYTHONPATH=. AMD=1 AMD_LLVM=0 MODEL=llama3 python3 examples/mlperf/model_train.py`
* python reference decoder
* 27 bytes / event, 1hr hard limit
2025-08-23 23:50:21 +03:00
qazal and GitHub
b12d1d866c
count bytes per kernel in test_viz ( #11801 )
...
Currently at ~100 bytes/kernel with JSON.
2025-08-23 23:35:27 +03:00
Sieds Lykles and GitHub
6a50ab6b87
adjust idiv min_max ( #11802 )
...
* change div min_max
* add tests
2025-08-23 22:25:51 +02:00
chenyu and GitHub
9d4cccd0f9
test_dtype_alu cleanups ( #11799 )
2025-08-23 15:11:17 -04:00
George Hotz and GitHub
aefabaf774
add AxisType to range ( #11798 )
...
* add AxisType to range
* missed them
* fix that test
* fix that test
2025-08-23 11:15:00 -07:00
qazal and GitHub
b975830424
add profile loader helper in test_viz ( #11797 )
2025-08-23 19:20:29 +03:00
chenyu and GitHub
7123df3928
Use Tensor.logaddexp to implement Tensor.softplus ( #11796 )
...
instead of piecewise linear, numerical is handled by logaddexp. jax does this and i think it's more elegant than torch's approach
2025-08-23 11:52:29 -04:00
qazal and GitHub
aaea6b97ad
viz memory: compute nbytes ( #11795 )
...
* viz memory: compute nbytes
* local map
2025-08-23 17:34:07 +03:00
qazal and GitHub
58653b5eae
viz: store memory scale ( #11794 )
2025-08-23 16:19:44 +03:00
chenyu and GitHub
fb8ee02424
Tensor.logaddexp ( #11793 )
2025-08-23 09:15:00 -04:00
Sieds Lykles and GitHub
5a6817d5f8
Fix z3 rendering of floats in indexing ( #11740 )
...
* Fix floating point comparison in indexing
* wrap in noop
* update tests
* improve rules for loading and comparing floats
* add test cast to bool
2025-08-23 05:56:19 +02:00
chenyu and GitHub
4267c45db3
non-supported dtype in transcendental ( #11754 )
...
* non-supported dtype in transcendental
`CPU=1 python3 test/test_dtype_alu.py TestDTypeALU.test_bfloat16_unary` works
* test
* works on real mac
2025-08-22 23:13:45 -04:00
chenyu and GitHub
e39b25cd36
upcast float exp to at least float32 ( #11758 )
...
* upcast float exp to at least float32
* unlucky seed
2025-08-22 20:16:34 -04:00
nimlgen and GitHub
b057a90d49
memory: rename is_huge_page -> is_page ( #11786 )
2025-08-22 20:08:58 +03:00
qazal and GitHub
38f0fa7bde
viz: only send trace duration ( #11789 )
...
* viz: only send trace duration
* can unwrap
2025-08-22 20:00:48 +03:00
qazal and GitHub
1c81ec9248
viz: rename to start/end timestamp ( #11788 )
2025-08-22 19:47:49 +03:00
qazal and GitHub
9ff03680ba
viz: store relative timestamps ( #11787 )
...
* viz: store relative timestamps
* err
* update test
2025-08-22 19:30:21 +03:00
nimlgen and GitHub
698392334f
system: message for eaccess as well ( #11785 )
2025-08-22 18:21:32 +03:00
geohotstan and GitHub
1e679bd789
fix max_unpool2d inf ( #11784 )
...
* start
* add regression test for maxunpool2d
2025-08-22 08:31:24 -04:00
George Hotz and GitHub
9832599c9e
test_vmap + permute isn't a sint ( #11783 )
...
* test_vmap + permute isn't a sint
* order
2025-08-21 22:39:35 -07:00
George Hotz and GitHub
bb8de51e5f
remove unused early cleanups + contig w range [pr] ( #11780 )
...
* remove unused early cleanups [pr]
* contiguous with range
* woah, this works
2025-08-21 20:04:45 -07:00
chenyu and GitHub
91a4de4ca7
fix getitem with inf in tensor ( #11781 )
2025-08-21 21:55:32 -04:00
George Hotz and GitHub
66e9d54eed
RANGEIFY=2 is partial contig ( #11777 )
2025-08-21 16:53:58 -07:00
Jordan Chalupka and GitHub
8de6db15ac
exclude .git from ruff ( #11773 )
2025-08-21 15:37:50 -07:00
George Hotz and GitHub
5954a0975f
fix some assigns on rangeify ( #11774 )
...
* fix some assigns
* llvm test
* more tests
* upd test
2025-08-21 15:15:54 -07:00
qazal and GitHub
2e0eb88549
viz: add metadata to UOp tracing ( #11772 )
...
* viz: add metadata to UOp tracing
* place after tag
* optional field
* err, refcount of root must be 0
2025-08-22 00:18:45 +03:00
George Hotz and GitHub
d6f9606e93
small cleanups to rangeify ( #11769 )
2025-08-21 11:15:09 -07:00
bd4a9473b0
Multihost exception handling ( #11729 )
...
Co-authored-by: wozeparrot <[email protected] >
2025-08-21 13:51:49 -04:00
George Hotz and GitHub
a2c7b807e0
don't bufferize 0s ( #11766 )
2025-08-21 10:10:56 -07:00
nimlgen and GitHub
9eff7cd1d8
am: support 64bit discovery ( #11768 )
2025-08-21 18:28:13 +03:00
56cd47a159
fix amd llvm bf16 tc ( #11713 )
...
* fix amd llvm bf16 tc
* is_cdna
---------
Co-authored-by: b1tg <[email protected] >
Co-authored-by: chenyu <[email protected] >
2025-08-21 09:33:28 -04:00
George Hotz and GitHub
a044648111
rangeify load cleanups + multi support ( #11765 )
...
* use the old buf_uop + cleanups
* simpler handling of load
* everything needed for multi too
2025-08-20 20:55:49 -07:00
George Hotz and GitHub
9f94c25a25
fix symbolic usage. use shrink, not reshape ( #11762 )
...
* fix test_var
* revert those things
* fix the ones in test tiny
* use better syntax
* it's the same, but that's clearer
* fix pad
2025-08-20 18:35:42 -07:00
chenyu and GitHub
5276fbc9c5
fix gather with inf values ( #11760 )
...
(mask * x) is wrong because 0*inf is nan. i feel we have a lot of those still...
2025-08-20 20:35:40 -04:00
wozeparrot and GitHub
b979162c5d
llama3 eval train ( #11706 )
2025-08-20 19:56:35 -04:00
chenyu and GitHub
dbd3b67657
clamp GRAD_CLIP_NORM in llama ( #11761 )
2025-08-20 19:55:50 -04:00
George Hotz and GitHub
9635592141
** rangeify, try 3 ( #11683 )
...
* ** rangeify, try 3
* bring that over
* bufferize, don't use contig tag
* work
* ish
* fix rangeify
* flash attention is back
* fix rangeify tests
* stuff passes
* fix test_log_softmax
* more stuff passes
* progress children
* new endrange solution
* progress
* progress counter
* basic assign
* contigs only
* symbolic in schedule
* unbind_kernel
* late children
* ops fixed
* beautiful mnist is close
* that seems to work
* mnist works
* improve names
* fix bmnist
* no pcontig
* testing backward
* work
* clone movement ops
* new_range helper
* MBLOCK/MERGE
* ops tests pass
* revert mblock stuff
* cleanups...but it breaks ops
* remove reindex
* hack for relu
* disable the hacks
* more hacks
* upd
* mostly works with cleanups disabled
* ndr
* ops tests pass
* terrible hacks for indexing to work
* context mismatch
* pcontig
* split pcontig v contig
* z3 trunc
* null
* no fuse in rangeify
* ops test passes
* lnorm
* fix assign
* nd rangeify
* both should work
* tests for rangeify
* cleanups
* stores pass the pointer through
* disable pcontig for now
* PARTIAL_CONTIG is a flag
2025-08-20 14:22:44 -07:00
chenyu and GitHub
d7553721d1
clean up test_dtype_alu ( #11757 )
...
remove the check that looks into schedule, only test if output matches
2025-08-20 14:36:18 -04:00
chenyu and GitHub
5f08a3e928
hotfix: cast half to float in Tensor.tolist ( #11755 )
...
workaround for python < 3.12
2025-08-20 12:18:35 -04:00
qazal and GitHub
de4cb722a4
viz: add metadata and var_vals tracing ( #11753 )
...
* viz: add metadata and var_vals tracing
* add test_trace_metadata
* set TRACEMETA=1
2025-08-20 18:39:51 +03:00
nimlgen and GitHub
6589c9e643
hcq: better errors for ifaces ( #11751 )
...
* hcq: better errors for ifaces
* fix linter
* typo
* space
2025-08-20 17:50:51 +03:00
chenyu and GitHub
be7b0b6970
TRANSCENDENTAL_SUPPORTED_DTYPES->TRANSCENDENTAL_DTYPES ( #11752 )
2025-08-20 10:29:36 -04:00
ttomsa and GitHub
220a2a88d7
a*(1/b) -> a/b on LLVM, CPU ( #11743 )
...
* add fdiv rewrite
* :)
* use float_lop
* use reciprocal()
* revert
* move to decompositions
2025-08-20 09:35:10 -04:00
George Hotz and GitHub
12ab3f8b06
correct row_count in process replay ( #11748 )
2025-08-19 22:21:07 -07:00
George Hotz and GitHub
8af8808c61
cleanup tests, bump caches ( #11746 )
2025-08-19 21:21:07 -07:00
George Hotz and GitHub
00391db628
no ast for mem estimate ( #11744 )
...
* no ast for mem estimate
* skip for webgpu
2025-08-19 20:18:45 -07:00
chenyu and GitHub
dd413e1208
remove a Ops.REDUCE check in reduce_collapse [pr] ( #11734 )
2025-08-19 19:21:28 -04:00
ttomsa and GitHub
70c3f1fb29
x.where(False, True) -> !x ( #11738 )
...
* add pat
* add test
2025-08-19 19:08:16 -04:00
George Hotz and GitHub
1d307f568c
move device tests to test/device + test cleanups ( #11735 )
...
* move device tests to test/device
* test speedups
* test device
* linalg to unit
* upd
* so pytest just works
* more divide and skip
* speed
* test devectorize
* add pillow
2025-08-19 16:02:20 -07:00
wozeparrot and GitHub
bcc7623025
feat: bump version to 0.11.0 ( #11736 )
2025-08-19 17:08:56 -04:00
qazal and GitHub
8c987b3293
DISABLE_FAST_IDIV is a context var [pr] ( #11733 )
2025-08-19 23:30:50 +03:00
George Hotz and GitHub
bf467c623d
changes from rangeify + better NullRenderer ( #11732 )
...
* changes from rangeify + better NullRenderer
* fix test
2025-08-19 12:51:54 -07:00
chenyu and GitHub
02353588cb
small getitem cleanup ( #11730 )
2025-08-19 12:25:58 -04:00
chenyu and GitHub
712a5c651a
minor Tensor.triu cleanup ( #11728 )
...
less confusing dtype
2025-08-19 08:07:38 -04:00
nimlgen and GitHub
9c9e337c78
amd: parse soc enums ( #11727 )
...
* amd: parse soc enums
* remove from mock
* fix
* minimal amd_gpu
2025-08-19 15:06:09 +03:00
qazal and GitHub
57ad69160a
viz: inline memory shape spec ( #11725 )
2025-08-19 08:03:29 +03:00
chenyu and GitHub
c5b52e9321
onnx RotaryEmbedding cleanup ( #11724 )
2025-08-18 23:34:42 -04:00
George Hotz and GitHub
31619774a9
Revert "Revert "fix the misused cast in amd llvm tc ( #11711 )" ( #11715 )" ( #11723 )
...
This reverts commit ca28db5a97 .
2025-08-18 19:44:35 -07:00
2ea54d7337
improve syntax of UPats using f [pr] ( #11717 )
...
Co-authored-by: chenyu <[email protected] >
2025-08-18 20:49:45 -04:00
chenyu and GitHub
b67345caa3
use truncate in onnx read_int64 [pr] ( #11720 )
2025-08-18 20:49:35 -04:00
qazal and GitHub
50e789e290
hotfix: add device to decompositions ctx ( #11721 )
...
fast_idiv requires it for checking if a dtype is supported. Without
this, codegen creates non reproducible output without a complete
os.environ. since `is_dtype_supported` will open devices based on the
env var unless the device is specified by the caller.
2025-08-19 03:31:16 +03:00
George Hotz and GitHub
4b3fcb4064
Revert "REDUCE_AXIS keepdim=False ( #11311 )" ( #11718 )
...
This reverts commit b518a7378a .
2025-08-18 13:28:53 -07:00
George Hotz and GitHub
67d0ba5bd8
new ops from rangeify ( #11716 )
2025-08-18 13:13:11 -07:00
geohot
4afa0b86bb
hotfix: ls -lh on wheel size
2025-08-18 11:52:59 -07:00
George Hotz and GitHub
ca28db5a97
Revert "fix the misused cast in amd llvm tc ( #11711 )" ( #11715 )
...
This reverts commit 799a637b03 .
2025-08-18 11:51:28 -07:00
chenyu and GitHub
c10e4c4e20
print wheel build size ( #11714 )
2025-08-18 14:29:47 -04:00
b518a7378a
REDUCE_AXIS keepdim=False ( #11311 )
...
* progress
* fix tests
* fix tests
* remove hack for test_symfold
* fix test_conv.py on llvm
* hack test_cache_speed
* lint
* remove hack for helper_linearizer_opt
* tests
* fix DSP
* clean up
* remove hack for kernelize.py
* hack for test/test_multitensor.py TestMultiTensor.test_matmul_shard_none
* clean
* uop.r need reshape?
* lower_store cause fail
* fix lower?
* avoid contiguous hack
* 2134
* conv2d count
* remove unused
* hack lower
* reduced and clean up
* fix TestMultiTensor.test_matmul_shard_none
* src sync + fix TestMultiTensor.test_matmul_shard_none
* remove excluded in mop
---------
Co-authored-by: b1tg <[email protected] >
Co-authored-by: George Hotz <[email protected] >
Co-authored-by: nimlgen <[email protected] >
2025-08-18 10:09:17 -07:00
61884f2057
add cstyle renderer to the NULL device ( #11709 )
...
Co-authored-by: b1tg <[email protected] >
2025-08-18 09:52:22 -07:00
18db8fa311
Allow choosing leaders in multinode reduce ( #11506 )
...
Co-authored-by: wozeparrot <[email protected] >
2025-08-18 12:43:20 -04:00
799a637b03
fix the misused cast in amd llvm tc ( #11711 )
...
Co-authored-by: b1tg <[email protected] >
2025-08-18 09:15:34 -07:00
qazal and GitHub
fef97547f9
viz: preset the final timestamp ( #11712 )
2025-08-18 17:51:21 +03:00
chenyu and GitHub
c30a113b2a
support bf16 and fp8 in Tensor.tolist ( #11704 )
...
memoryview does not support it, but casting works fine so cast is fine
2025-08-17 15:11:13 -04:00
nimlgen and GitHub
1c62a3833b
am: add versioned_header to load_fw ( #11702 )
...
* am: add versioned_header to load_fw
* fix mypy
2025-08-17 20:11:57 +03:00
qazal and GitHub
eb3c918c5b
viz: s/area/height ( #11703 )
2025-08-17 19:20:01 +03:00
qazal and GitHub
d762edd694
viz: define tracks in python ( #11701 )
...
* viz: defines tracks in python
* update unittests
* figuring it out
* works
* diff cleanup
* math
* y axis is back
2025-08-17 18:19:13 +03:00
qazal and GitHub
eeeea29171
viz: device list refactor ( #11700 )
...
* viz: device list refactor
* paddingTop/padding-top
2025-08-17 15:08:54 +03:00
George Hotz and GitHub
9366a23eb0
test backward in test_tiny ( #11697 )
...
* test backward in test_tiny
* empty
2025-08-16 20:29:39 -07:00
chenyu and GitHub
4666df71c1
fix test_fuse_and_tc_opt ( #11699 )
2025-08-16 21:10:53 -04:00
geohotstan and GitHub
3d7c35d615
add fuse and tc opt bug repro ( #11695 )
...
* FINALLY HAVE A SMALL REPRO OH BOY
* show failure in CI
* cleaner?
* 1 possible fix
* Revert "1 possible fix"
This reverts commit 9e0fd215dd .
2025-08-16 18:24:49 -04:00
nimlgen and GitHub
d1224a7c4a
am: check both signatures ( #11694 )
...
* am: check both signatures
* fix
2025-08-16 20:01:07 +03:00
qazal and GitHub
58c8991fa4
add Ops.REWRITE_ERROR ( #11689 )
2025-08-16 00:56:53 +03:00
qazal and GitHub
ec4fccb1da
viz: pass through RewriteNotReady ( #11690 )
2025-08-16 00:33:59 +03:00
qazal and GitHub
e954decb44
viz: pass UOp.st errors ( #11688 )
2025-08-16 00:07:56 +03:00
nimlgen and GitHub
bf0c45fd16
system: resource_resize might be unavail ( #11680 )
2025-08-15 22:03:23 +03:00
George Hotz and GitHub
4ab9fb2edd
explicit fixed point rewrite ( #11685 )
...
* explicit fixed point rewrite
* local cache
* fix that
2025-08-15 11:08:41 -07:00
chenyu and GitHub
5d6963c968
RuntimeError for unsupported dtype in PYTHON ( #11686 )
2025-08-15 13:59:27 -04:00
nimlgen and GitHub
b970cd6895
am: fix psp ring completion ( #11679 )
...
* am: psp ring timeout + fix 0 fence_value
* no sleep
2025-08-15 20:15:49 +03:00
qazal and GitHub
c8ba48b223
show rewrite errors in viz ( #11684 )
2025-08-15 19:09:47 +03:00
George Hotz and GitHub
560984fd8d
small changes from rangeify ( #11682 )
...
* small changes from rangeify
* const like thing
* ksym
2025-08-15 08:45:52 -07:00
chenyu and GitHub
d0d39885c3
onnx in tinygrad ( #11675 )
2025-08-14 19:57:21 -04:00
wozeparrot and GitHub
71260a5ea4
feat: only bench openpilot 0.9.9 models ( #11664 )
2025-08-14 19:27:18 -04:00
chenyu and GitHub
4ddefbccb4
update setup packages ( #11674 )
...
sorted, and added missing 'tinygrad.frontend' and 'tinygrad.runtime.autogen.nv'
2025-08-14 19:24:57 -04:00
chenyu and GitHub
48c4033ae1
fix pylint for onnx ( #11673 )
...
* fix pylint for onnx
* too long
2025-08-14 18:48:02 -04:00
chenyu and GitHub
e9d0027591
llama MP realize weight after shard ( #11672 )
...
* llama MP realize weight after shard
prevents memory spike on device 0
* empty weight for FAKEDATA
2025-08-14 16:17:46 -04:00
nimlgen and GitHub
4176b24264
amd: support xcc in regs ( #11670 )
...
* amd: support xcc in regs
* mockamd
* typong
2025-08-14 21:20:11 +03:00
Sieds Lykles and GitHub
f399d0d75d
Render mod in terms of idiv ( #11668 )
...
* Render mod in terms of idiv
* cvar -> var
2025-08-14 19:59:39 +02:00
nimlgen and GitHub
d747eeed32
amd logs parser based on device ( #11669 )
2025-08-14 19:49:33 +03:00
geohotstan and GitHub
1e904155e3
Add Onnx Huggingface to test/models/test_onnx.py ( #11468 )
...
* BOOM
* cache extra/huggingface/models/
* why max buffer size is not 0
* override MAX_BUFFER_SIZE
* less models
* remove more models and change cache dir to already cached dir
* only metal
* less is more?
* remove check ops
* why is this not setting the ENVVAR
* ughhhhh just test in models
* only cpu and gpu
* only cpu actually
* just override it idk
* final
* move extra dependencies up top
* simplification
* fix print
* make README better
* revert ops_disk fix for now
* clean up test_onnx
* remove testing fashion clip model cuz sloooowwwwww
* actually let METAL run this
* fix comment mistake
* fix download path in run_models
* does this work?
* cleanup setup and teardown
* contextvar like this?
* prove model is cached
* do I need to increment DOWNLOAD_CACHE_VERSION?
* see if cached with incremented DOWNLOAD_CACHE_VERSION
* use warnings to see if the model exists
* revert DOWNLOAD_CACHE_VERSION stuff and clean up
* add retry to download
* nit
2025-08-14 11:16:41 -04:00
Sieds Lykles and GitHub
06beeb6e13
Nest div even if factor is negative ( #11666 )
2025-08-14 13:58:59 +02:00
Sieds Lykles and GitHub
661e9a2d5d
div_and_mod_folding refactor ( #11585 )
...
* divmod const folding is its own function
* split nested mod optimization out of div and mod folding
* make `fold_binary_numerator` its own function
* factor out `fold_divmod_congruence`
* check sign of numerator
* add tests
* assert int on vmin and vmax
* add type: ignore
* factor out more rules
* remove div_and_mod_folding
* cached_property to property
* remove import
* add returns
* restore old order
* check sign of x.vmin and newx.vmin
* check more signs
* add some test that would have caught bugs
* better test if the div simplified
* shorten line
* replace terms_factors_const with pop_const
* move that back
* minor cleanup
* remove comments
* some cleanup
2025-08-14 11:52:42 +02:00
chenyu and GitHub
0fc43c2e54
fix test_const_tensor_index index ( #11660 )
...
index should be ints
2025-08-13 19:50:16 -04:00
chenyu and GitHub
4fe19eec72
Ops.TRUNC ( #11659 )
2025-08-13 18:40:48 -04:00
qazal and GitHub
eb10a9c76a
viz: always left align timeline values ( #11658 )
2025-08-13 23:55:28 +03:00
George Hotz and GitHub
22bdf48cdd
render ranges in viz, name gbufs with sizes. changes from rangeify ( #11656 )
...
* render ranges in viz, name gbufs with sizes. changes from rangeify
* fix unit test dtypes
2025-08-13 12:46:16 -07:00
George Hotz and GitHub
9b4da590bb
remove need for cast_vec ( #11653 )
...
* remove need for cast_vec
* fix amdllvm
2025-08-13 12:09:47 -07:00
e2873a3a41
[bounty] Muon optim ( #11414 )
...
* newton schulz
* add muon + move newton schulz to tensor
* compact newton schulz
* better tests
* cleanup
* add comments for muon
* cleanup
* add export with tests
* match muon optim with test optim
* cleanup
* unsed import
* correct comment
* whitespace
* move export
* muon test fix
* match reference impl + tests
* remove export by moving muon device
* add credit
* cleanup
* remove print
* spacing
* spacing
* comma
* cleanup
* removal
* fix tests + optim momentum
* consistent is not/ not
* more consistency
* fix test
* cleanup
* fix the nones
* remove comment
* cast
* comment
* comment
* muon teeny test
* muon flag beautiful mnist
* set steps
* steps as hyperparam
* match default test steps
* name
* large cleanup
* dont care about steps
* nesterov false default
* match each other impl
* steps
* switch nest
* swap defaults
* update docstring
* add no nesterov test
* ban fuse_optim
* prints
* classical momentum
* alternative condition
* recon
* pre + post wd
* false default
* detach
* signature changes
* context
* swap order
* big cleanup
* 0 step instead
* parity
* remove fuse
* remove fused
* better paper
* assert message
* correct shape check + eps
* multidim
* add eps
* cleanup
* correct assert message
* lint
* better tests
* naming
* ns_steps,ns_params
* update docstring
* docstring
* match sgd and muon together
* sandwich
* add back fused
* parity
---------
Co-authored-by: George Hotz <[email protected] >
2025-08-13 14:27:55 -04:00
chenyu and GitHub
94e6d84e32
rewrite Tensor.round to not use cast int ( #11654 )
2025-08-13 13:51:08 -04:00
George Hotz and GitHub
d2521d828a
transcendental+idiv+threefry are uop decompositions ( #11636 )
...
* transcendental+idiv+threefry are uop decompositions [pr]
* threefry decomp
* fix randomness tests
* fix webgpu
* unneeded now
* fix
* move prematcher
* all cast should probably be cast_vec
2025-08-13 09:37:12 -07:00
geohotstan and GitHub
cf7224ce3e
fully lint onnx.py ( #11647 )
...
* mypy
* ruff ruff ruff
2025-08-13 08:22:06 -07:00
geohotstan and GitHub
925555b62a
Fix onnx Domain bug ( #11650 )
2025-08-13 08:20:50 -07:00
Sieds Lykles and GitHub
67df617fe1
add launch bounds to ptx ( #11646 )
2025-08-13 13:05:39 +02:00
qazal and GitHub
88f95e9f59
viz: minor fixups for firefox ( #11645 )
...
* fix circle attr
* set fill color
2025-08-13 12:59:28 +03:00
qazal and GitHub
6f88eac0fc
viz: refactor node and edge tagging ( #11644 )
2025-08-13 12:41:01 +03:00
qazal and GitHub
8140bf9778
viz: create layout once ( #11643 )
...
* start
* work
* works
* diff cleanup
2025-08-13 09:24:58 +03:00
chenyu and GitHub
3fb79bb43a
minor onnx cleanups ( #11642 )
2025-08-13 01:05:19 -04:00
chenyu and GitHub
e9e5a08a04
simplify onnx cubic ( #11641 )
...
we can drop the double where and abs since we know which ranges the inputs map into
2025-08-12 19:57:31 -04:00
George Hotz and GitHub
18cdbec447
split decompositions pass ( #11638 )
...
* split decompositions pass
* fix ptx
* pack load store early
* restore that
2025-08-12 12:56:05 -07:00
chenyu and GitHub
0d8a0d7a96
update test_multi_const_folding_tensor to include pow ( #11635 )
...
pow folds now
2025-08-12 13:35:37 -04:00
Sieds Lykles and GitHub
4d6e407eb0
Extend fast_idiv to negative ints ( #11632 )
...
* fast idiv for signed ints
* Add rule and test
* fix tests
* redo fuzz_fast_idiv to do negative ints as well
* adjust comments
* remove unused imports
2025-08-12 19:34:49 +02:00
qazal and GitHub
17adbe86d8
hotfix: do not default to capturing args in track_rewrites ( #11634 )
2025-08-12 20:01:24 +03:00
ad9dec25b3
combine onnx parser and onnx ( #11485 )
...
* start
* more
* fix onnx_runner test
* pass
* patch for disk and add domains from huggingface
* simpler docs
* revert domain changes
* rerun ci
* revert onnx ops test change
* add fix from strenum stuff
* correct way
* revert correct way to leave the fix for another PR
* test segfault
* Revert "test segfault"
This reverts commit 4e1aaf41e7 .
* remove some unnecessary documentation
* test segfault again
* Revert "test segfault again"
This reverts commit 56fc5f03e7 .
* try gemini suggested patch for sys._getframe
* keep trying with gemini
* revert not working gemini suggestions and try faulthandler
* remove pythonfaulthandler
* trigger CI a few times
* minimize diff
---------
Co-authored-by: chenyu <[email protected] >
2025-08-12 12:56:39 -04:00
Sieds Lykles and GitHub
4c3982c44e
Take sign out of mod ( #11631 )
...
* Add rule and test
* fix tests
2025-08-12 18:44:36 +02:00
qazal and GitHub
e28605e324
rename profile point event fields [pr] ( #11633 )
2025-08-12 19:11:21 +03:00
nimlgen and GitHub
8a7be0a747
metal: workaround for transfers sync issue ( #11622 )
...
* metal: workaround for transfers sync issue
* metal tracsfer sync is broken
* hm
* rm it?
* keep it
2025-08-12 16:16:34 +03:00
qazal and GitHub
efe8b5611d
move ProfilePointEvent out of device.py [pr] ( #11630 )
...
Generic profiling events exist in helpers so they can be imported from
everywhere in tinygrad.
2025-08-12 09:58:32 +03:00
chenyu and GitHub
0d7075f2de
assign should broadcast input tensor ( #11629 )
...
fixed test_assign_broadcast
2025-08-11 23:36:35 -04:00
Joshua Kissoon and GitHub
c44760c89d
torch backend: fix arange, add linalg.cross, add tests ( #11628 )
2025-08-11 23:34:41 -04:00
George Hotz and GitHub
ca41b5e38b
skip_0 in graph rewrite [pr] ( #11627 )
...
* skip_0 in graph rewrite [pr]
* no track_rewrites on test
* use dict instead of set
2025-08-11 18:29:04 -07:00
Sardor and GitHub
ca7a641442
fix bugs at examples/yolov3.py ( #11614 )
...
* Update load_weight. Give valid model url
* Fix bug in iou function
2025-08-11 21:14:47 -04:00
chenyu and GitHub
0c97d6de1b
don't round pow output for int pow int ( #11625 )
...
also added atol=0 and big pows for the tests
2025-08-11 20:57:47 -04:00
chenyu and GitHub
d623f6d850
support int Tensor pow to const non-negative int ( #11624 )
...
matches torch
2025-08-11 19:50:19 -04:00
chenyu and GitHub
857a830dcc
fix test_arange_float_step ( #11623 )
2025-08-11 16:58:42 -04:00
chenyu and GitHub
0806677b51
rewrite sort idx ( #11613 )
2025-08-11 16:20:56 -04:00
George Hotz and GitHub
700c11597b
switch contextvars.ContextVar to _ContextVar ( #11621 )
2025-08-11 12:20:09 -07:00
ae0c3cfff6
change clang -march flag to -mcpu on arm ( #10970 )
...
Co-authored-by: wozeparrot <[email protected] >
2025-08-11 13:38:48 -04:00
geohotstan and GitHub
27bcb9fd1c
Support cubic mode for ONNX Resize OP ( #11612 )
...
* start
* add reference
* this is so much slower
* this makes sense but differs from official impl, but results are still correct..?
* add a comment
* Just keep it simple for now since I don't fully get it yet
* address comments
* correct
* teeny clean up
* another small comment improvement lol
2025-08-11 11:49:30 -04:00
nimlgen and GitHub
d2bb1bcb97
cloud: a bit better err handling ( #11616 )
...
* cloud: err propagation to client
* fix
* print exc
* linter
* excs
* fix
* hm
* flaky
2025-08-11 15:51:22 +03:00
qazal and GitHub
6a232ccdac
viz: add tiny range drawing helper ( #11620 )
...
* viz: add tiny range drawing helper
* less
2025-08-11 15:15:43 +03:00
qazal and GitHub
e768773e13
viz: use colors helper ( #11618 )
2025-08-11 13:10:15 +03:00
qazal and GitHub
7d6c0a8cc7
viz: refactor progress msg ( #11617 )
2025-08-11 13:01:36 +03:00
chenyu and GitHub
630edcffd8
remove .float calls in olmoe ( #11610 )
...
still matches torch
2025-08-10 20:33:22 -04:00
chenyu and GitHub
a67e0917c3
list indexing can normalize in python ( #11609 )
...
* list indexing can normalize in python
list index does not need to be normalized in tensor
* update those
2025-08-10 20:02:38 -04:00
chenyu and GitHub
1181ec0cd2
few more tensor indexing test cases ( #11608 )
2025-08-10 18:56:42 -04:00
George Hotz and GitHub
996c907c0b
rewrite not ready + children machinery ( #11607 )
...
* rewrite not ready + children machinery
* it doesn't like track rewrites
2025-08-10 15:28:30 -07:00
Sieds Lykles and GitHub
1875bc69f9
Late rewrite rules for CMPLT ( #11591 )
...
* add rules
* more rules
* fix comment spelling
* remove two rules
2025-08-10 22:18:13 +02:00
nimlgen and GitHub
5403a4aeaf
null dev: support offset on buffers ( #11606 )
...
* null dev: support offset on buffers
* nolimit
2025-08-10 21:58:37 +03:00
geohotstan and GitHub
b0dab6a4cd
onnx Resize OP clean up ( #11603 )
...
* start
* slight clean up
2025-08-10 14:10:39 -04:00
Sieds Lykles and GitHub
10540414cd
Add Ops.CMPEQ ( #10431 )
...
* Add op
* add to Groupop.ALU
* fix spec
* fix ptx
* temporary pickle by name to see process replay
* add Ops.EQ to binary ops
* Actuall rename properly
* add test to assert CMPEQ is being used
* Ops.CMPEQ is automatic cast to bool
* add Ops.CMPEQ to llvm
* add Ops.CMPEQ to llvm
2025-08-10 13:13:16 +02:00
chenyu and GitHub
f7aa1b85fe
minor sort cleanups ( #11602 )
2025-08-10 01:51:23 -04:00
chenyu and GitHub
dfb702ef33
fix sort for small dim ( #11601 )
...
* fix sort for small dim
* fixed test_sort_empty
2025-08-10 01:17:41 -04:00
chenyu and GitHub
ef17af85c6
remove .float call in llama logit ( #11598 )
...
* remove .float call in llama logit
* bfloat item
2025-08-10 00:02:18 -04:00
chenyu and GitHub
dd3d2eb36c
add training llama3 test in ci ( #11599 )
2025-08-09 22:35:39 -04:00
chenyu and GitHub
3e64467322
remove freqs_cis contiguous in llama ( #11597 )
2025-08-09 21:11:12 -04:00
chenyu and GitHub
7338ffead0
small beautiful_mnist update ( #11596 )
...
gather is fast now. there's a conv/bw kernel that only gets fast with BEAM, but whole thing runs < 5 seconds now regardless
2025-08-09 19:51:14 -04:00
chenyu and GitHub
45baec1aab
model parallel llama ( #11588 )
...
MP=8 GRADIENT_ACC_STEPS=3 BS=1 DEFAULT_FLOAT=bfloat16 OPTIM_DTYPE=bfloat16 LLAMA3_SIZE=70B SEQLEN=512 PYTHONPATH=. MODEL=llama3 python3 examples/mlperf/model_train.py
2025-08-09 16:54:27 -04:00
nimlgen and GitHub
09bc377da3
search: print runtime failures on debug ( #11593 )
2025-08-09 23:01:19 +03:00
nimlgen and GitHub
14f99ff1a1
amd: doorbell_cpu_addr is not used ( #11592 )
...
* amd: doorbell_cpu_addr is not used
* hm
2025-08-09 20:03:21 +03:00
Sieds Lykles and GitHub
01c770c77b
Fix z3 float cast in indexing ( #11590 )
...
* adjust dtype of z3_renderer and add rule for cast
* dtypes.bool is also cast noop
* add regression test
* make embedding smaller
* even smaller test
2025-08-09 17:59:23 +02:00
Sieds Lykles and GitHub
10d388499d
Refactor optional.py ( #11578 )
...
* move fast_idiv to transcendental
* move optional.py
* adjust comment
* change import
* mypy needs this?
2025-08-09 17:35:05 +02:00
nimlgen and GitHub
20e46a175c
do not use disk with usb ( #11119 )
...
* not use disk with usb
* better name
2025-08-09 11:58:02 +03:00
qazal and GitHub
53179953fc
viz: factor out memory graph render ( #11586 )
2025-08-08 20:18:11 +03:00
qazal and GitHub
8ce72d3fad
simpler disassembly table spec ( #11583 )
...
* simpler disassembly table spec
* update ui
* move to scalar/vec render
2025-08-08 17:59:26 +03:00
qazal and GitHub
44a222a9b2
viz: move resource usage summary to server ( #11582 )
2025-08-08 17:08:28 +03:00
qazal and GitHub
793ace530e
update amd_uop_matmul.py import ( #11581 )
...
Using this for testing SQTT
2025-08-08 17:07:35 +03:00
chenyu and GitHub
b232c60def
benchmark openpilot 0.9.9 ( #11575 )
...
* benchmark openpilot 0.9.9
not sure what to do with the 0.9.7 ones with IMAGE=2 and validate
* name
2025-08-08 01:26:14 -04:00
qazal and GitHub
16f0edbe90
pass opts arg in get_program process replay [pr] ( #11571 )
...
* fix ptx process replay
* keyword arg
* renderer is also optional [pr]
* test_linearizer fixup
* name function order is args,ret,kwargs
* can use opts_to_apply
* pass through p.applied_opts
* sink_arg
* now it opens devices too
2025-08-08 03:05:09 +03:00
qazal and GitHub
960cc6533a
pass through name function args in track_rewrites ( #11572 )
2025-08-08 02:28:52 +03:00
wozeparrot and GitHub
1826004ef9
feat: add tinyos builder link ( #11570 )
2025-08-07 17:42:18 -04:00
George Hotz and GitHub
82be8abfd2
move opt under codegen ( #11569 )
2025-08-07 14:19:17 -07:00
chenyu and GitHub
702e38dc19
remove FUSE_ARANGE_UINT ( #11567 )
...
also add IGNORE_OOB=1 to bert runs. lowered BS on tinybox to 90 since 96 oom during eval without reset
2025-08-07 16:49:06 -04:00
George Hotz and GitHub
6ed2dfd187
delete the arange dim mismatch restriction ( #11568 )
...
* delete the arange dim mismatch restriction
* skip that test race
2025-08-07 13:46:17 -07:00
wozeparrot and GitHub
7ae4335127
feat: generate blend index ( #11566 )
2025-08-07 14:20:28 -04:00
chenyu and GitHub
594cbdc66f
skip AM ResNet50 benchmark ( #11565 )
...
hanging with FUSE_ARANGE?
2025-08-07 14:07:01 -04:00
chenyu and GitHub
aa1a6f2132
support threshold in Tensor.softplus ( #11564 )
...
fix gradient for large input
2025-08-07 13:43:18 -04:00
7ee3770961
FUSE_ARANGE=1 ( #11427 )
...
* FUSE_ARANGE=1
* fix test
---------
Co-authored-by: George Hotz <[email protected] >
2025-08-07 13:32:34 -04:00
geohot
4dfcfb1ae5
Revert "Revert "viz: align-center checkbox ( #11555 )""
...
This reverts commit c52facfd29 .
2025-08-07 08:15:57 -07:00
geohot
7e42427a7b
Revert "Revert "viz: remove color for unbind step ( #11554 )""
...
This reverts commit 5650c7b86c .
2025-08-07 08:15:51 -07:00
geohot
dc765fbeb7
Revert "viz: timeline perf ( #11533 )"
...
This reverts commit 031f26632b .
2025-08-07 08:08:51 -07:00
geohot
5650c7b86c
Revert "viz: remove color for unbind step ( #11554 )"
...
This reverts commit 1e205775bd .
2025-08-07 08:08:50 -07:00
geohot
c52facfd29
Revert "viz: align-center checkbox ( #11555 )"
...
This reverts commit 91ec093464 .
2025-08-07 08:08:50 -07:00
geohot
974cfbe76d
Revert "viz: add support for colored tooltip text ( #11556 )"
...
This reverts commit b3f7ea6f93 .
2025-08-07 08:08:49 -07:00
geohot
3bf0db80ef
Revert "viz: pick the largest rect for proxy fillColor ( #11558 )"
...
This reverts commit 76079bc7f2 .
2025-08-07 08:08:48 -07:00
George Hotz and GitHub
9764c6cdee
fix mismatch reduce, try 2 ( #11560 )
...
* fix mismatch reduce, try 2
* fix heuristic
* delete that test
* don't start allowing ones
2025-08-07 07:57:58 -07:00
qazal and GitHub
76079bc7f2
viz: pick the largest rect for proxy fillColor ( #11558 )
2025-08-07 16:40:17 +03:00
nimlgen and GitHub
4f29a2c441
fix flaky test on macos ( #11557 )
2025-08-07 15:55:35 +03:00
qazal and GitHub
b3f7ea6f93
viz: add support for colored tooltip text ( #11556 )
2025-08-07 15:04:43 +03:00
qazal and GitHub
91ec093464
viz: align-center checkbox ( #11555 )
2025-08-07 14:22:02 +03:00
qazal and GitHub
1e205775bd
viz: remove color for unbind step ( #11554 )
2025-08-07 14:16:21 +03:00
nimlgen and GitHub
031f26632b
viz: timeline perf ( #11533 )
...
* viz: timeline perf
* progress
* fast
* less lines
* less lines
* less lines
* fix chrome
2025-08-07 13:16:17 +03:00
George Hotz and GitHub
a1aa5670aa
Revert "fix mismatch reduce ( #11547 )" ( #11549 )
...
This reverts commit 49d21a9055 .
2025-08-06 22:43:15 -07:00
George Hotz and GitHub
49d21a9055
fix mismatch reduce ( #11547 )
...
* fix mismatch reduce
* cleanups
* fix shape
* fix mypy
* resolve
2025-08-06 21:12:51 -07:00
George Hotz and GitHub
21570545d3
move view pushing to codegen, try 2 ( #11534 )
...
* move view pushing to codegen, try 2
* fix up some linearizer tests
* fix test search
* fix test schedule
* delete that test
* fix test arange
* fix a few tests
* update tests
* push views
* ebs cleanup
* fix local/reg
* test and lint
* fix more tests
* test cleanups
* skipped that one
2025-08-06 15:58:38 -07:00
wozeparrot and GitHub
2d5bdc939d
faster llama3 dataloader ( #11540 )
2025-08-06 18:25:57 -04:00
George Hotz and GitHub
80d9cced07
more test cleanups ( #11544 )
...
* more test cleanups
* revert that
2025-08-06 15:05:21 -07:00
George Hotz and GitHub
6fd1332763
update some tests for less Kernel ( #11543 )
...
* update some tests for less Kernel
* get_program update
2025-08-06 14:19:59 -07:00
George Hotz and GitHub
09dc7af8e9
move bind to big graph ( #11539 )
...
* move bind to big graph
* fix tests
* unbind inside kernel only
* merge views
* fix multitensor
* failure text change
2025-08-06 13:27:51 -07:00
George Hotz and GitHub
7c5e115747
test_mismatch_reduce ( #11538 )
2025-08-06 10:02:14 -07:00
George Hotz and GitHub
4fe11725c6
pass through sink arg, update linearizer test ( #11536 )
...
* pass through sink arg, update linearizer test
* get_program help
* bump line count
* use new api
2025-08-06 09:48:48 -07:00
George Hotz and GitHub
bfebb5c37b
do store in the replace_buffers ( #11535 )
2025-08-06 08:42:45 -07:00
geohotstan and GitHub
1163292759
move onnx_parser into onnx ( #11530 )
2025-08-06 10:46:27 -04:00
George Hotz and GitHub
7b16fadd87
load view late + simpler rewrite ( #11525 )
...
* add the load view later
* simpler replace buffers
* rewrite name
2025-08-06 06:55:11 -07:00
nimlgen and GitHub
930d8dae0c
hcq: lazy prof signal allocation ( #11531 )
2025-08-06 15:28:11 +03:00
nimlgen and GitHub
eafc7fda12
upd perfetto ( #11528 )
2025-08-06 14:00:34 +03:00
nimlgen and GitHub
1afb290027
ci: fix runner in nv ( #11527 )
2025-08-06 10:38:04 +03:00
qazal and GitHub
61dae0685c
viz: show total mem in tooltip ( #11526 )
2025-08-06 06:51:26 +03:00
George Hotz and GitHub
cf66df0ea6
put load early to make pointers match ( #11524 )
2025-08-05 20:04:32 -07:00
George Hotz and GitHub
92175626e3
prereqs: move views to codegen ( #11522 )
2025-08-05 19:27:58 -07:00
chenyu and GitHub
c9225d22ce
only disable flaky test_jit_multidev_xfer ( #11523 )
2025-08-05 22:17:25 -04:00
George Hotz and GitHub
f58fd3143d
cleanup fix_kernel ( #11520 )
...
* cleanup fix_kernel
* early load buffer
* early meta ops
* move those to fix_kernel_ops
* fix tests
* remote metal was flaky
* Revert "fix tests"
This reverts commit a27019383d .
* that hack broke things
* fine for ptx
2025-08-05 18:38:43 -07:00