Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
307 commits
Select commit Hold shift + click to select a range
5ca87f1
fix cast to weak twice [pr] (#17548)
chenyuxyz Aug 15, 2026
417563c
fix webgpu is_nan [pr] (#17551)
chenyuxyz Aug 15, 2026
9702296
device: fix remap (#17549)
nimlgen Aug 15, 2026
e688e07
add max_shape/max_numel to mixins + pad_to (#17553)
geohot Aug 16, 2026
e7bf2a8
iface in device (#17554)
nimlgen Aug 16, 2026
c30bf11
few torch_backend fix (#17558)
chenyuxyz Aug 17, 2026
057a18a
fix emulated long cast to double (#17559)
chenyuxyz Aug 17, 2026
bfd4048
no dtype in vconst_like [PR] (#17560)
chenyuxyz Aug 17, 2026
138fb4a
delete dead DType.scalar [PR] (#17561)
chenyuxyz Aug 17, 2026
e25f867
more torch backend fixups (#17562)
chenyuxyz Aug 17, 2026
37a54dc
add some dels to jit for OOM fixes (#17566)
geohot Aug 17, 2026
821e80f
remove torch backend detach hack (#17565)
chenyuxyz Aug 17, 2026
42714e1
update a few is CONST check to check device None [pr] (#17563)
chenyuxyz Aug 17, 2026
7fe8e35
delete bad torch backend function override (#17568)
chenyuxyz Aug 17, 2026
954d4f7
add back beautiful_mnist_torch in CI (#17569)
chenyuxyz Aug 17, 2026
58edff6
hcq2: one submitter (#17556)
nimlgen Aug 17, 2026
2776c5b
fix call arg indexing in shard scheduling (#17519)
b1tg Aug 17, 2026
00d6eed
hcq2: speed (#17570)
nimlgen Aug 17, 2026
b757437
llm: respect expert_gating_func (#17458)
b1tg Aug 17, 2026
901d257
some more torch backend cleanups (#17571)
chenyuxyz Aug 17, 2026
34c9b9d
add back cast where rule [pr] (#17572)
chenyuxyz Aug 17, 2026
d4a1f39
clean up cstyle render inf and nan [PR] (#17573)
chenyuxyz Aug 17, 2026
cb892e1
base_rewrite reorder [PR] (#17575)
chenyuxyz Aug 18, 2026
8d2cc64
llm: refactor delta attention (#17564)
geohot Aug 18, 2026
a746861
compile server for cuda on mac (#17574)
sirhcm Aug 18, 2026
7cbe8e0
viz: expanding srcs should not override history (#17577)
Qazalin Aug 18, 2026
0b757bb
Revert "disk: neable polling (#17538)" (#17578)
nimlgen Aug 18, 2026
a1366e2
alu(long, weakint) can do math in int too [pr] (#17579)
chenyuxyz Aug 18, 2026
af2a43c
hcq2: 64bit addresses (#17576)
nimlgen Aug 18, 2026
72280bb
gptoss: zero-2 optim (#17581)
wozeparrot Aug 18, 2026
49778d9
start renderer casted const migration [pr] (#17582)
chenyuxyz Aug 18, 2026
c31038f
use KernelCountException when kernel count is being compared (#17584)
geohot Aug 18, 2026
2cfb421
ci: cleanup deps (#17583)
sirhcm Aug 18, 2026
e37b44d
casted CONST migration for LLVM and PTX [pr] (#17585)
chenyuxyz Aug 19, 2026
df3b114
ci: standardize all ubuntu runs-on to ubuntu-24.04 (#17586)
sirhcm Aug 19, 2026
ca86a42
casted CONST migration for nir [pr] (#17588)
chenyuxyz Aug 19, 2026
8c2bf02
fused_qkv_rope in UOp (#17591)
Qazalin Aug 19, 2026
d539aaf
Revert "fused_qkv_rope in UOp (#17591)" (#17593)
Qazalin Aug 19, 2026
68b4407
casted CONST migration for cstyle [pr] (#17587)
chenyuxyz Aug 19, 2026
e8ba214
casted CONST migration for x86 [pr] (#17592)
chenyuxyz Aug 19, 2026
b3e2f17
update NULL tests that depends on strong dtype CONST (#17594)
chenyuxyz Aug 19, 2026
9550378
finish casted_consts migration [PR] (#17595)
chenyuxyz Aug 19, 2026
bd6e70a
delete stale tests (#17596)
chenyuxyz Aug 19, 2026
c218b48
fold_bitcast should truncate its input [pr] (#17601)
chenyuxyz Aug 19, 2026
a4fadcf
fix TestDevCopySpeeds SIZE (#17602)
chenyuxyz Aug 19, 2026
0c5307b
realize: fast stat (#17600)
nimlgen Aug 19, 2026
7064e76
fix roll on zero-sized tensors (#17603)
EthanBnntt Aug 19, 2026
b8cc74e
no float in tensor shape [pr] (#17605)
chenyuxyz Aug 19, 2026
0a0b6cb
fix TestDevCopySpeeds command (#17607)
chenyuxyz Aug 19, 2026
fc214da
test updates for weak const change (#17606)
chenyuxyz Aug 19, 2026
ab68c58
hcq2: speed (#17604)
nimlgen Aug 19, 2026
2067133
cpu: link with rt (#17608)
sirhcm Aug 19, 2026
c89ae6c
gptoss: save more (#17613)
wozeparrot Aug 19, 2026
c63d94e
benchmarks: split multigpu (#17615)
sirhcm Aug 20, 2026
e6324d1
test updates from weak const branch (#17618)
chenyuxyz Aug 20, 2026
a1263fa
fused_qkv_rope in UOp try 2 (#17619)
Qazalin Aug 20, 2026
57d1104
bump amd firmware (#17621)
geohot Aug 20, 2026
c117da9
safe changes for mi350p (#17620)
geohot Aug 20, 2026
8c3cb00
hcq2: staging (#17622)
nimlgen Aug 20, 2026
e68aa16
hcq2: faster beam (#17624)
nimlgen Aug 20, 2026
6732d05
fix dtype_from_uop for invalid ALU [PR] (#17626)
chenyuxyz Aug 20, 2026
f55c1a3
clean up some index(dtype=) [PR] (#17634)
chenyuxyz Aug 20, 2026
a8ecb73
x64 imm uint64 (#17636)
chenyuxyz Aug 20, 2026
eba5b7e
benchmarks: cleanups (#17631)
sirhcm Aug 20, 2026
1707dca
remove kernel_cnt, names are no longer unique (#17633)
geohot Aug 20, 2026
a57188e
hotfix: disable HCQ2
geohot Aug 20, 2026
0e7ab86
x86 REX issue (#17580)
chenyuxyz Aug 20, 2026
c773891
skip INT_MIN % -1 on X86 and LLVM (#17637)
sirhcm Aug 20, 2026
d80254c
fa: remove swa recompute (#17635)
wozeparrot Aug 20, 2026
3715006
fix float_to_bf16 on non-float32 inputs (#17638)
sirhcm Aug 20, 2026
592e3f8
update const selector where folding [pr] (#17640)
chenyuxyz Aug 20, 2026
c655aaf
ci: venv in /opt/venv (#17632)
sirhcm Aug 20, 2026
0ccef54
add extract support to fetch (#17641)
geohot Aug 20, 2026
3fdbb82
add ansipad and PARALLEL contextvar (#17642)
geohot Aug 20, 2026
9aa9e11
compile kernels in parallel (#17629)
geohot Aug 20, 2026
9216aa4
llm prefill failing test (#17630)
b1tg Aug 21, 2026
d716d0d
hotfix: qkv bw kernel requires hipcc and cdna4 (#17645)
Qazalin Aug 21, 2026
1bcb6bd
no-op weak.py reorder [PR] (#17646)
chenyuxyz Aug 21, 2026
1cb0600
fix llm vars regression (kimi) (#17644)
geohot Aug 21, 2026
80bf60d
profiler failing test for non unique kernel names (#17647)
Qazalin Aug 21, 2026
dcc2d02
prereq viz cleanups for unique profile keys (#17649)
Qazalin Aug 21, 2026
e8a8d99
profiler tracing using unique keys (#17651)
Qazalin Aug 21, 2026
1c3c9e9
remove setUp from test_sqtt_profiler (#17652)
Qazalin Aug 21, 2026
176377f
weak 1 for FDIV in get_late_rewrite_patterns [PR] (#17655)
chenyuxyz Aug 21, 2026
554d078
fix render_marg [pr] (#17656)
chenyuxyz Aug 21, 2026
77f698e
cleanup the mxfp4 gemm (#17660)
Qazalin Aug 21, 2026
cc32aa1
don't match casted const in const_folding_pat [pr] (#17658)
chenyuxyz Aug 21, 2026
756e82e
usb amd: pipelined copyin over the 0xF2 engine (2.6x faster) (#17628)
geohot Aug 21, 2026
3919ce8
ceildiv in wgsl _packed_size [pr] (#17662)
chenyuxyz Aug 21, 2026
1cf8a2c
hcq2: use shrink.bitcast (#17653)
nimlgen Aug 21, 2026
8f59041
more wgsl pack cleanups [PR] (#17664)
chenyuxyz Aug 21, 2026
8f9cbdf
few more self folding [pr] (#17657)
chenyuxyz Aug 21, 2026
402bea7
l2i and sign_extend cleanups [pr] (#17668)
chenyuxyz Aug 21, 2026
3082956
usb copyin: async arm and drain, 323 MB/s on comma (#17663)
geohot Aug 21, 2026
298748e
ci: remove setup-python (#17665)
sirhcm Aug 21, 2026
12f889a
hcq2: parallel compile (#17667)
nimlgen Aug 21, 2026
daa154a
FLOORDIV to SHR for powers of 2 [pr] (#17669)
chenyuxyz Aug 21, 2026
4fd4eaf
nv: hevc (#17661)
nimlgen Aug 21, 2026
f986829
keep IndexingContext scoped in indexing (#17670)
geohot Aug 21, 2026
07cce78
compile3: log printed timings (#17671)
sirhcm Aug 21, 2026
52596db
gptoss: fused ce (#17672)
wozeparrot Aug 21, 2026
af24281
refactor the AMD emulator slop (kimi) (#17673)
geohot Aug 22, 2026
7204d46
delete dtype_from_uop INDEX exempt (#17674)
chenyuxyz Aug 22, 2026
356f665
test update for weak const (#17675)
chenyuxyz Aug 22, 2026
8950942
remove explicit dtype for NOOP and decomp [PR] (#17678)
chenyuxyz Aug 22, 2026
a9069c1
make decomp pass SPEC=2 [PR] (#17681)
chenyuxyz Aug 22, 2026
a2e64e1
hcq2: early usb (#17683)
nimlgen Aug 22, 2026
b0a1285
lil decomp cleanup [PR] (#17682)
chenyuxyz Aug 22, 2026
5b60a09
some fixes for the AMD emulator (#17684)
geohot Aug 23, 2026
93865e2
hcq2: sunday housekeeping (#17686)
nimlgen Aug 23, 2026
bb0e99a
hotfix: skip that nan test on mac
geohot Aug 23, 2026
477b573
update llm kv cache to be half (#17690)
geohot Aug 23, 2026
8b164ae
test update from weak const (#17689)
chenyuxyz Aug 23, 2026
a31aca9
don't hardcode dtype.int const in decode_hevc_frame (#17696)
chenyuxyz Aug 24, 2026
11edcc1
disk cache: thread-local db conn (#17694)
YassineYousfi Aug 24, 2026
9d0cd0e
hotfix: switch benchmark to qwen3.8
geohot Aug 24, 2026
4ee114b
llama rope freqs in fp32 (#17698)
Qazalin Aug 24, 2026
df52849
Revert "disk cache: thread-local db conn (#17694)"
geohot Aug 24, 2026
a5ea95d
usb: don't fail async transfers on signal interruption (#17692)
YassineYousfi Aug 24, 2026
7e561fc
mergable fast RDNA3 Qwen 3.8 (#17512)
geohot Aug 24, 2026
9b0c656
llama script changes from the speedups branch (#17701)
Qazalin Aug 24, 2026
9b481a4
dsp: cleanup temp linker script (#17704)
sirhcm Aug 24, 2026
7b21ffa
PYLITERAL has dtypes.void (#17705)
chenyuxyz Aug 24, 2026
7a887e8
am: use gc regs for xgmi (#17707)
nimlgen Aug 24, 2026
5aabbb1
fix Muon weight decay being a no-op (#17709)
geohot Aug 24, 2026
08fbd25
AGENTS: no amend commits
geohot Aug 24, 2026
76bf6b7
llm: add DEBUG=2 for weights loading (#17710)
geohot Aug 24, 2026
f4cc288
delete GETTUPLE on UNSHARD rule [PR] (#17711)
chenyuxyz Aug 24, 2026
ed11099
mi350p: aqua vanjaram bringup for the raw PCI driver (#17693)
geohot Aug 24, 2026
8df3dac
remove redundant UOp dtype [PR] (#17713)
chenyuxyz Aug 24, 2026
2e7790f
benchmarks: cleanup dsp benchmark (#17706)
sirhcm Aug 24, 2026
021c015
benchmarks: more aggressive timeouts (#17715)
sirhcm Aug 24, 2026
6f87158
feat: bump version to 0.14.0 (#17716)
wozeparrot Aug 24, 2026
d9004cf
use native shifts in Payne Hayek instead of pow2 mul/divs (#17717)
GabrielNakamoto Aug 25, 2026
a7df1a1
const are weak 3 [pr] (#17695)
chenyuxyz Aug 25, 2026
65ca685
const cleanups [PR] (#17719)
chenyuxyz Aug 25, 2026
1d694dd
remove more explicitly set dtype [PR] (#17721)
chenyuxyz Aug 25, 2026
a567831
split rangeify to prepare.py (#17722)
geohot Aug 25, 2026
ab79879
bring back sqtt examples tests (#17725)
Qazalin Aug 25, 2026
9607787
delete more explicitly set dtype to UOp [PR] (#17726)
chenyuxyz Aug 25, 2026
9f01775
dtype_from_uop for THREEFRY and FDIV (#17727)
chenyuxyz Aug 25, 2026
023bfdb
fix viz for hcq2 (#17729)
nimlgen Aug 25, 2026
7dc8b66
wgsl cast before load for packed [pr] (#17731)
chenyuxyz Aug 25, 2026
d851aca
hcq2: fix copy/call in usb (#17732)
nimlgen Aug 25, 2026
b831ca6
Reapply "disk cache: thread-local db conn (#17694)"
geohot Aug 25, 2026
7fef98c
benchmarks: remove usage of sudo from linux runners (#17735)
sirhcm Aug 25, 2026
2824504
usb amd: yield between signal polls (#17712)
YassineYousfi Aug 25, 2026
5503251
pin onnxruntime==1.24.1 (#17738)
sirhcm Aug 25, 2026
07268b7
fix: external_test_gpu_crash on python 3.14 (#17739)
wozeparrot Aug 25, 2026
6ece327
CUSTOM arg is (str, dtype) [PR] (#17737)
chenyuxyz Aug 26, 2026
dc04c78
lil fixes from new_rangeify (#17741)
geohot Aug 26, 2026
b49c03f
benchmarks: don't use sudo on mac (#17740)
sirhcm Aug 26, 2026
625c05d
fix am_smi to respect dev (#17742)
geohot Aug 26, 2026
9860e5d
llm tokenizer: fix tekken, add gpt4o (#17733)
b1tg Aug 26, 2026
ecf79e2
better all2all schedule test (#17746)
Qazalin Aug 26, 2026
4c20f1d
fix asinh precision loss on negative inputs (#17749)
teddytennant Aug 26, 2026
4bdc865
delete unused rewrite rules [PR] (#17748)
chenyuxyz Aug 26, 2026
0abcf09
never bufferize_to_store weak input [PR] (#17751)
chenyuxyz Aug 26, 2026
ea6c82f
small changes from new rangeify (#17752)
geohot Aug 26, 2026
6a3b297
fix PTX NIR SPEC=2 for bool [pr] (#17753)
chenyuxyz Aug 26, 2026
cc72b9f
cleanup BENCHMARK_LOG (#17754)
sirhcm Aug 26, 2026
6042b87
delete PCONTIG [PR] (#17756)
geohot Aug 26, 2026
6074c00
hcq2: fix jit (#17747)
nimlgen Aug 26, 2026
c015351
fix _get_cpu_count for docker --cpus=N in python 3.13+ (#17760)
sirhcm Aug 26, 2026
a0a901c
faster qwen 3.8 (#17720)
geohot Aug 26, 2026
22ffff3
gptoss: single jit (#17525)
wozeparrot Aug 26, 2026
0820c7a
benchmarks: openpilot matrix (#17714)
sirhcm Aug 26, 2026
118e812
simplify more same device copies (#17766)
Qazalin Aug 27, 2026
d16a251
remove some dead scheduler tests (#17768)
Qazalin Aug 27, 2026
0d66815
set BEAM_PADTO=0 in llama (#17769)
Qazalin Aug 27, 2026
2d4e7af
mockgpu/amd: use generated KFD ioctl metadata (#17761)
tonyfloatersu Aug 27, 2026
f19d89e
hcq2: a bit cleaner deps (#17771)
nimlgen Aug 27, 2026
5c3d044
fix asinh gradient at zero (#17758)
teddytennant Aug 27, 2026
7eb763a
bnxt to extra (#17772)
nimlgen Aug 27, 2026
980c42d
hcq2 tiny speedups (#17773)
nimlgen Aug 27, 2026
54d69f4
fix test_assign for no subbuffer backends (#17757)
chenyuxyz Aug 27, 2026
14cbece
autogen: use deb for comgr 2 (#17782)
sirhcm Aug 27, 2026
f267a49
UOp.param accepts single sint as shape (int,) (#17784)
geohot Aug 27, 2026
38fa064
hotfix: update max test time from 300 -> 90
geohot Aug 27, 2026
ee3161e
hotfix: decrease dims in test_attention to get below the 90s limit
geohot Aug 27, 2026
f06832b
test llm with --no_chat_template (#17785)
sirhcm Aug 27, 2026
fede358
fix fancy indexing with uint8 index (#17787)
chenyuxyz Aug 27, 2026
e6ad290
onnxruntime respects NUM_CPU_THREADS (#17788)
sirhcm Aug 28, 2026
38e0fe1
fix where with float64 branches (#17789)
chenyuxyz Aug 28, 2026
6b361e4
move shape into arg for param/buffer (#17783)
geohot Aug 28, 2026
bc485d2
fix CMPLT between float16 and const 0 (#17791)
chenyuxyz Aug 28, 2026
4e6bdac
hotfix: disable HCQ2
geohot Aug 28, 2026
39d7fd0
axis arg is dead (#17793)
geohot Aug 28, 2026
4456e62
ci: skip apt steps if packages are already installed (#17794)
sirhcm Aug 28, 2026
53cad32
copy movement op tests construct copies (#17792)
Qazalin Aug 28, 2026
26c4b63
fix interpolate with align_corners and an output size of 1 (#17790)
teddytennant Aug 28, 2026
92d92c7
gptoss: faster grad handling (#17795)
wozeparrot Aug 28, 2026
6242b09
cleaner mxfp4 gemm prelude (#17796)
Qazalin Aug 28, 2026
76dce1e
tiny hcq2 changes (#17797)
nimlgen Aug 28, 2026
55c8e18
hcq2 spec2 (#17798)
nimlgen Aug 28, 2026
6083de5
fix nan compares (#17801)
chenyuxyz Aug 28, 2026
cb857a5
remove X86 ymm thingy (#17803)
chenyuxyz Aug 28, 2026
7fdc58b
add support for UD quants (#17806)
JoelLisenby Aug 28, 2026
2eacd4f
fix Conv2d same padding with per axis dilation (#17805)
teddytennant Aug 28, 2026
287679a
delete X86 not used codes [PR] (#17807)
chenyuxyz Aug 28, 2026
ae63f23
fix onnx MaxUnpool (#17809)
chenyuxyz Aug 28, 2026
112e50e
fix onnx.py type annotations (#17811)
chenyuxyz Aug 28, 2026
f196af2
fix onnx MeanVarianceNormalization arg (#17812)
chenyuxyz Aug 28, 2026
9599581
am: vf (#17802)
nimlgen Aug 28, 2026
49627ae
ci: use fetch to download libraries (#17814)
sirhcm Aug 28, 2026
b3dad4f
update X86 cast related stuff (#17816)
chenyuxyz Aug 28, 2026
bd2711b
put dtype to Ops.INS arg (#17817)
chenyuxyz Aug 28, 2026
793c166
don't set UOp dtype in x86 (#17818)
chenyuxyz Aug 28, 2026
cb0db2d
dtype_from_uop is never None (#17819)
chenyuxyz Aug 28, 2026
086f45c
dtype is not a UOp field anymore (#17821)
chenyuxyz Aug 28, 2026
0640cfc
remove spec dtype check that's trivially true [PR] (#17823)
chenyuxyz Aug 28, 2026
812d5ce
delete Ops.FUNCTION (#17824)
geohot Aug 28, 2026
a9830e2
make UOp.dtype recursive_property [PR] (#17827)
chenyuxyz Aug 28, 2026
12f34d8
some tri cleanups [PR] (#17829)
chenyuxyz Aug 29, 2026
02d67a8
parallel beam and dataset cache for digitalocean_mi350x (#17830)
Qazalin Aug 29, 2026
9aa3c48
use am in digitalocean_mi350x writeup (#17832)
Qazalin Aug 29, 2026
661440e
fix bufferize_to_store for weak input (#17833)
chenyuxyz Aug 29, 2026
8c7906d
weak.py cleanups [PR] (#17834)
chenyuxyz Aug 29, 2026
0a1bfc9
fix logsumexp on fully masked slices (#17822)
teddytennant Aug 29, 2026
2f5572a
UPat(RandMixin) [PR] (#17835)
chenyuxyz Aug 29, 2026
d7913e2
fix weak const that overflows int32 [pr] (#17837)
chenyuxyz Aug 29, 2026
0bd7253
fix weak const overflow with movements [pr] (#17840)
chenyuxyz Aug 29, 2026
0b58ff6
cannot decomp long Variable (#17842)
chenyuxyz Aug 29, 2026
1a5a364
weak dtype overflow touchups [pr] (#17843)
chenyuxyz Aug 30, 2026
61f7fd3
remove dead symbolic rules [pr] (#17844)
chenyuxyz Aug 30, 2026
7cc973a
clean up unneeded dtype check in rules [PR] (#17845)
chenyuxyz Aug 30, 2026
9c49e35
fix promote weak in _broadcasted [pr] (#17849)
chenyuxyz Aug 30, 2026
902a1ef
Revert "fix promote weak in _broadcasted [pr] (#17849)" (#17851)
chenyuxyz Aug 30, 2026
f5b00de
fix weak const promote dropping the movement ops (#17846)
teddytennant Aug 30, 2026
1c183e6
fix elu/celu/selu gradient being nan on large inputs (#17852)
teddytennant Aug 30, 2026
85841ce
more const cast cleanups [PR] (#17854)
chenyuxyz Aug 30, 2026
fdb4109
fix logcumsumexp on fully masked prefixes (#17853)
teddytennant Aug 30, 2026
593aa1e
fix strided setitem being a no-op on a realized tensor (#17855)
teddytennant Aug 30, 2026
a6c810e
mi350p: fix pmc (#17858)
Qazalin Aug 31, 2026
b48cb9f
viz: add cdna waveend (#17859)
Qazalin Aug 31, 2026
3123f94
fix erf gradient being zero at x=0 (#17861)
project224 Aug 31, 2026
e3c4b3d
fix logaddexp and asin at 0 (#17862)
chenyuxyz Aug 31, 2026
af079e8
llm: fix q6k fastpath (#17847)
b1tg Aug 31, 2026
d025993
hcq2 rewrite patches (#17838)
nimlgen Aug 31, 2026
60cc1d7
add Ops.RETURNED, remove TUPLE/GETTUPLE (#17804)
geohot Aug 31, 2026
32bbf82
Revert "ci: use fetch to download libraries" (#17863)
sirhcm Aug 31, 2026
8f4bd50
openpilot: no NOLOCALS=1 (kimi) (#17762)
sirhcm Aug 31, 2026
4197f74
delete CPU threading support (#17866)
geohot Aug 31, 2026
79250d7
remove NOLOCALS [pr] (#17868)
sirhcm Aug 31, 2026
c12eefe
run llvmspeed Speed Test (BEAM=2) without cache (#17869)
chenyuxyz Sep 1, 2026
37738a7
onnx: add tinygrad contiguous custom op (#17871)
YassineYousfi Sep 1, 2026
a3bde51
merge OptOps.UNROLL and OptOps.UPCAST (#17867)
chenyuxyz Sep 1, 2026
b87159c
delete dead OptOps tests (#17872)
chenyuxyz Sep 1, 2026
cf6fff1
OptOps.GROUP is OptOps.LOCAL (#17873)
chenyuxyz Sep 1, 2026
966a8f5
Merge branch 'cf6fff13aa4dbf61d930c5c6da607ab2954edede' into sync-202…
sunnyhaibin Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 34 additions & 29 deletions .github/actions/setup-tinygrad/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
description: 'Python version to use'
required: false
default: '' # if you don't set a version, the native python version will be used
default: '3.14'
key:
description: 'Key for the python cache'
required: false
Expand Down Expand Up @@ -41,12 +41,12 @@ inputs:
description: "Install LLVM?"
required: false
default: 'false'
tinydreno:
description: "Install tinydreno"
qemu:
description: "Install qemu?"
required: false
default: 'false'
qemu:
description: "Install qemu"
ninja:
description: "Install ninja?"
required: false
default: 'false'
runs:
Expand All @@ -59,18 +59,18 @@ runs:
echo "OMP_NUM_THREADS=1" >> "$GITHUB_ENV"
# no buffers should be over 300MB in CI
echo "MAX_BUFFER_SIZE=300000000" >> "$GITHUB_ENV"
if [[ "$RUNNER_OS" == "Linux" ]]; then
echo "VIRTUAL_ENV=/opt/venv/${{ inputs.python-version }}" >> "$GITHUB_ENV"
echo "UV_PYTHON_INSTALL_DIR=/opt/python" >> "$GITHUB_ENV"
else
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> "$GITHUB_ENV"
fi

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
enable-cache: 'false' # see below for manual caching

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v6
if: inputs.python-version != ''
with:
python-version: ${{ inputs.python-version }}

# **** Caching packages ****

- name: Cache Python packages (PR)
Expand Down Expand Up @@ -109,32 +109,31 @@ runs:
if: inputs.deps != ''
shell: bash
run: |
uv venv .venv
uv venv --allow-existing --python ${{ inputs.python-version }} "$VIRTUAL_ENV"
DEPS="${{ inputs.deps }}"
uv pip install --python .venv -e ".[${DEPS// /,}]" ${{ inputs.pydeps }} --torch-backend cpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/
uv pip install --python "$VIRTUAL_ENV" -e ".[${DEPS// /,}]" ${{ inputs.pydeps }} --torch-backend cpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/
- name: Install dependencies in venv (without extra)
if: inputs.deps == ''
shell: bash
run: |
uv venv .venv
uv pip install --python .venv -e . ${{ inputs.pydeps }}
uv venv --allow-existing --python ${{ inputs.python-version }} "$VIRTUAL_ENV"
uv pip install --python "$VIRTUAL_ENV" -e . ${{ inputs.pydeps }}
- name: Prune uv cache
if: github.event_name != 'pull_request'
shell: bash
run: uv cache prune --ci
- name: Configure venv
shell: bash
run: |
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> "$GITHUB_ENV"
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "${{ github.workspace }}/.venv/Scripts" >> "$GITHUB_PATH"
echo "$VIRTUAL_ENV/Scripts" >> "$GITHUB_PATH"
else
echo "${{ github.workspace }}/.venv/bin" >> "$GITHUB_PATH"
echo "$VIRTUAL_ENV/bin" >> "$GITHUB_PATH"
fi

# ******************* apt *******************
- name: Setup apt
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true')
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true' || inputs.ninja == 'true')
shell: bash
run: |
sudo mkdir -p /var/cache/apt/archives
Expand Down Expand Up @@ -162,7 +161,7 @@ runs:
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-20 main" | sudo tee /etc/apt/sources.list.d/llvm.list

- name: Compute Package List + Hash
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true')
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true' || inputs.ninja == 'true')
id: apt-pkgs
shell: bash
run: |
Expand All @@ -187,25 +186,37 @@ runs:
if [[ "${{ inputs.qemu }}" == "true" ]]; then
pkgs+=" qemu-user-static"
fi
# **** ninja ****
if [[ "${{ inputs.ninja }}" == "true" ]]; then
pkgs+=" ninja-build"
fi

echo "pkgs=$pkgs" >> "$GITHUB_OUTPUT"
echo "hash=$(echo -n "$pkgs" | sha256sum | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"

installed=true
for pkg in $pkgs; do
info=$(dpkg-query -W -f='${db:Status-Abbrev} ${Version}' "$pkg" 2> /dev/null || true)
echo "${pkg}: ${info:-not in dpkg database}"
[[ "$info" == ii* ]] || installed=false
done
echo "installed=$installed" >> "$GITHUB_OUTPUT"

- name: Cache apt (PR)
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true') && github.event_name == 'pull_request'
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true' || inputs.ninja == 'true') && github.event_name == 'pull_request' && steps.apt-pkgs.outputs.installed == 'false'
uses: actions/cache/restore@v5
with:
path: /var/cache/apt/archives/
key: ${{ runner.os }}-${{ runner.arch }}-apt-${{ steps.apt-pkgs.outputs.hash }}-${{ env.CACHE_VERSION }}
- name: Cache apt
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true') && github.event_name != 'pull_request'
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true' || inputs.ninja == 'true') && github.event_name != 'pull_request' && steps.apt-pkgs.outputs.installed == 'false'
uses: actions/cache@v5
with:
path: /var/cache/apt/archives/
key: ${{ runner.os }}-${{ runner.arch }}-apt-${{ steps.apt-pkgs.outputs.hash }}-${{ env.CACHE_VERSION }}

- name: Run apt Update + Install
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true')
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true' || inputs.qemu == 'true' || inputs.ninja == 'true') && steps.apt-pkgs.outputs.installed == 'false'
shell: bash
run: |
sudo apt -qq update || true
Expand Down Expand Up @@ -277,12 +288,6 @@ runs:
shell: bash
run: brew install llvm@20

# *** tinydreno ***
- name: Install tinydreno (linux)
if: inputs.tinydreno == 'true' && runner.os == 'Linux'
shell: bash
run: sudo curl -fL https://github.com/sirhcm/tinydreno/raw/refs/heads/master/libllvm-qcom.so -o /usr/lib/libllvm-qcom.so

# *** OpenCL ***
- name: Install rusticl
if: inputs.opencl == 'true'
Expand Down
47 changes: 4 additions & 43 deletions .github/workflows/autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
key: 'autogen'
amd: 'true'
llvm: 'true'
pydeps: 'pyyaml mako'
deps: 'autogen'
- name: Install autogen support packages
run: sudo apt-get install -y --no-install-recommends libclang-20-dev llvm-20-dev hip-dev libusb-1.0-0-dev libdrm-dev liburing-dev
- name: Regenerate autogen files
run: |
find tinygrad/runtime/autogen -type f -name "*.py" -not -path "*/amd/*" -not -name "__init__.py" -not -name "comgr.py" -not -name "metal.py" -not -name "iokit.py" -not -name "corefoundation.py" -not -name "libclang.py" -delete
find tinygrad/runtime/autogen -type f -name "*.py" -not -path "*/amd/*" -not -name "__init__.py" -not -name "metal.py" -not -name "iokit.py" -not -name "corefoundation.py" -not -name "libclang.py" -delete
python3 -c "from tinygrad.runtime.autogen import opencl"
python3 -c "from tinygrad.runtime.autogen import cuda, nvrtc, nvjitlink, nv_570, nv_580, nv_610, nv"
python3 -c "from tinygrad.runtime.autogen import comgr_3, hsa, hip, amd_gpu, sqtt, rocprof, amdgpu_kd, amdgpu_drm"
python3 -c "from tinygrad.runtime.autogen import comgr, comgr_3, hsa, hip, amd_gpu, sqtt, rocprof, amdgpu_kd, amdgpu_drm"
python3 -c "from tinygrad.runtime.autogen.am import *"
python3 -c "from tinygrad.runtime.autogen.nv_regs import *"
python3 -c "from tinygrad.runtime.autogen import libc, kfd, io_uring, pci, vfio"
Expand All @@ -54,7 +54,7 @@ jobs:
python3 -c "from tinygrad.runtime.autogen import mesa"
python3 -c "from tinygrad.runtime.autogen import avcodec"
python3 -c "from tinygrad.runtime.autogen import llvm_qcom"
python3 -c "from tinygrad.runtime.autogen import mlx5"
python3 -c "from tinygrad.runtime.autogen import mlx5, bnxt"
python3 -c "from tinygrad.runtime.autogen import ggml_common"
REGEN=1 python3 -c "from tinygrad.runtime.autogen import libclang"
- name: Check for differences
Expand Down Expand Up @@ -102,42 +102,3 @@ jobs:
with:
name: autogen-macos-patch
path: autogen-macos.patch

autogen-comgr-2:
name: In-tree Autogen (comgr 2)
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: 'autogen-comgr'
- name: Install autogen support packages
run: |
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
sudo tee /etc/apt/sources.list.d/rocm.list <<EOF
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.2 $(lsb_release -cs) main
EOF
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
sudo apt -qq update || true
sudo apt-get install -y --no-install-recommends libclang-20-dev comgr
- name: Regenerate autogen files
run: |
rm tinygrad/runtime/autogen/comgr.py
python3 -c "from tinygrad.runtime.autogen import comgr"
- name: Check for differences
run: |
if ! git diff --quiet; then
git diff
git diff > autogen-comgr2.patch
echo "Autogen mismatch detected. Patch available at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts"
exit 1
fi
- name: Upload patch artifact
if: failure()
uses: actions/upload-artifact@v7
with:
name: autogen-comgr2-patch
path: autogen-comgr2.patch
Loading
Loading