Commit Graph

5383 Commits

Author SHA1 Message Date
nimlgen
604cdbf2f7 am: large allocs aligned to 2mb to use 2mb pages (#15609) 2026-04-05 18:01:31 +03:00
qazal
b2d5b29f45 assembly/amd: validate dsl keyword args (#15608)
* assembly/amd: validate dsl keyword args

* hm, this should use the SOP2 s_waits

* use the sop2 s_waits
2026-04-05 23:00:24 +09:00
wozeparrot
7e54992bf6 fp8 llama (#15588)
Co-authored-by: qazal <qazal.software@gmail.com>
2026-04-04 18:24:57 -07:00
qazal
4d36366717 assembly/amd: match rdna4 hw gidx init in emulator (#15604)
* simple rdna4 copy kernel with hw fault

* the trivial fix: use ttmp instead of s

* now copy kernel fails in mockgpu

* rm crashing kernel
2026-04-05 02:28:18 +09:00
Christopher Milan
645d45d968 DEV has arch (#15577)
Co-authored-by: Comma Device <device@comma.ai>
2026-04-03 19:17:19 -04:00
nimlgen
902edc3781 hcq: hcqbuf in copy (#15595) 2026-04-03 22:47:36 +03:00
chenyu
8fdef2d3e4 mean/std/var to mixin (#15593) 2026-04-03 10:42:41 -04:00
Christopher Milan
0ed8d9271d Renderers accept Target or nothing (#15590) 2026-04-03 01:09:41 -04:00
qazal
fefb0ebc2a gemm/asm: fp8 cleanups (#15580)
* normal gemm here

* s/dtypes.fp8e4m3/FP8_DTYPE

* gemm_bw

* device UOp stays NULL
2026-04-02 19:02:38 +09:00
chenyu
1aa04eab08 simple CreationMixin (#15567)
start with full_like, zeros_like, ones_like
2026-04-01 23:00:56 -04:00
Christopher Milan
6c67bd4c14 better error message when invalid renderer is specified (#15573) 2026-04-01 17:12:55 -04:00
Christopher Milan
0d6fbc2355 remove flaky and redundant image test (#15574) 2026-04-01 16:33:13 -04:00
b1tg
20497f2840 fold BIND to CONST when min==max (#15568) 2026-04-01 11:19:04 -04:00
chenyu
f5c0794df2 fix Tensor.const_like (#15565)
used to always return a 0-d tensor, now returns an expanded Tensor based on self.shape and matches UOp
2026-04-01 08:35:19 -04:00
chenyu
fc5b94b902 fix UOp.where(const, const) (#15560)
* fix UOp.where(const, const)

* fix
2026-04-01 05:28:49 -04:00
Christopher Milan
acf239e4d2 specify renderer in DEV, <dev>_<ren>=1 is deprecated (#15551) 2026-03-31 18:35:14 -04:00
nimlgen
5181c8e23a llm: fix nan in kvcache (#15552) 2026-04-01 00:38:45 +03:00
qazal
a15345a53e viz/cli: improve --help message (#15546)
* viz/cli: improve --help message

* not the default

* more work

* -s

* respect colored
2026-03-31 22:31:33 +09:00
chenyu
4ac2552642 improve ReduceMixin.all (#15544)
use prod instead of min since `mul` lowered to `and` directly
2026-03-31 07:54:27 -04:00
chenyu
89ec22131a tests to show double negation in min is not cancelled (#15543) 2026-03-31 06:59:13 -04:00
qazal
8feb8edc68 gemm/asm: add fp8 support to cdna asm_gemm (#15542)
* work

* hmm, mixins

* rhs_transposed

* also fix the dtype

* check for hipcc

* Exception

* select dev

* default
2026-03-31 19:32:54 +09:00
qazal
467c0af8aa viz: skip flaky sever tests (#15538) 2026-03-31 17:20:30 +09:00
qazal
f88e255cea gemm/asm: split and parameterize dtype in llama gemm tests (#15408)
* gemm/asm: more tests for emulator, parameterize llama gemm tests

* bf16 atol
2026-03-31 17:12:44 +09:00
b1tg
a63392a565 llm: pairwise ranking topk for MoE expert selection (#15499) 2026-03-31 12:46:39 +08:00
qazal
bc866a93f0 viz: rename exec to sqtt (#15527)
* viz: rename exec to sqtt

* more
2026-03-31 08:06:51 +09:00
Christopher Milan
adbfd82d1d DEV is ContextVar, setting Device.DEFAULT is deprecated (#15508) 2026-03-30 17:10:49 -04:00
qazal
ad6347f6d8 sqtt: allow mapping sopk to IMMEDIATE packets (#15525)
* work

* with s_waitcnt

* with the sopp variants, increase threads

* remove that

* sdst=NULL produces IMMEDIATE, otherwise is SALU
2026-03-30 23:12:17 +09:00
chenyu
f0eaac4235 reduce mixin (#15523) 2026-03-30 05:23:58 -04:00
chenyu
f485d0b664 UOp.sum -> usum, prod -> uprod [pr] (#15522)
rename to prep reduce mixin
2026-03-29 04:51:55 -04:00
qazal
266fb07721 viz: show exec duration (#15484)
* duration

* handwritten tests

* rdna3 pickle

* rdna4 pickle

* asserts

* rm that

* wmma work

* r4

* this shows the overlap well

* ohh okay it goes back

* are ds_load and ds_store different queues on RDNA4?

* print msg, v_mul_lo_u32 is 4 cycles?

* discover

* wmma something

* wmma comment

* less

* less

* better comments

* work

* inst st

* delay column

* better cli

* emit_alt

* update test_handwritten

* work
2026-03-28 22:48:59 +09:00
chenyu
c0753ab62f XOR simplifcation rules (#15512)
x^-1 has good vmin/vmax, and x^y^y is x
2026-03-27 23:23:27 -04:00
qazal
ccaa6bfc19 viz/cli cleanups (#15511)
* one less function

* work

* layout

* better handling of rewrites

* mypy passes
2026-03-28 08:50:38 +09:00
qazal
dcc2a5d23b viz/cli: simplify to --source and --item flags (#15510)
* viz/cli: simplify to --source and --item flags

* update viz cli test
2026-03-28 04:46:39 +09:00
nimlgen
0d6fc0f571 jit: graphing in uops (#15489)
* jit: graphing as rewrite rule

* f

* +metal,cuda

* x

* cl

* x

* x

* simpler

* f

* m

* x

* revert?

* revert2

* back

* back

* t

* x

* m

* x

* c

* x

* l

* x

* comment

* smaller

* rv

* x

* x
2026-03-27 19:09:02 +03:00
chenyu
30ebbe7f17 few more fold valid tests (#15509)
from remove CORRECT_DIVMOD_FOLDING attempt
2026-03-27 10:38:42 -04:00
chenyu
323fcefd7d Revert "DEV is a ContextVar (#15505)" (#15506)
This reverts commit fdb30cba96.
2026-03-27 02:22:40 -04:00
Christopher Milan
fdb30cba96 DEV is a ContextVar (#15505) 2026-03-27 00:57:09 -04:00
Christopher Milan
67a50fb738 move where on load with casts (#15492) 2026-03-26 22:11:27 -04:00
qazal
586c49642f viz/cli: test in CI (#15501)
* viz cli work

* baseline test

* make cli test work without subprocess

* more checks

* check itrace

* s/return/return None

* change

* minimal

* colored
2026-03-27 06:47:15 +09:00
qazal
3f9f0fa846 viz: yield sqtt alt events (#15500)
* yield other

* less

* work

* less
2026-03-27 04:43:41 +09:00
nimlgen
7193f90746 test view input in jit (#15497)
* will anything fail?

* add test
2026-03-26 16:59:47 +03:00
Christopher Milan
bc180a963c deprecate <dev>=1 in favor of DEV=<dev> (#15467)
* start work on target

* add test

* update actions to use DEV

* update docs

* update readmes

* tests need that too

* update example

* update tests (comments)

* fix that test

* ruff

* mypy

* oops

* remove getenvs

* don't add Target yet

* and the test

* lint

* and docs

* more stuff

* assert

* few more fixes

* test assert
2026-03-26 03:48:03 -04:00
chenyu
7c8f992894 move EXPAND dtype cast back to gradient.py (#15481)
only a concern for gradient, not mixin
2026-03-25 19:25:26 -04:00
qazal
60bd546593 sqtt: add cycle count to rdna3 enums (#15473)
* update rdna3 sqtt enums to include cycle_count

* dispatch_to_exec
2026-03-25 23:19:54 +09:00
chenyu
713b322e70 add weakint to promo_lattice (#15463)
sits between bool and smallest int
2026-03-25 00:27:34 -04:00
George Hotz
fe2690399b llm: support assistant prefill + refactor to TransformerConfig (#15457)
* llm: support assistant prefill

* refactor to ModelConfig

* TransformerConfig

* more
2026-03-25 10:50:48 +08:00
qazal
1b3d00d6ac viz/cli: remove --offset and --limit flags (#15439)
* work

* also no more no-color

* reorder

* update llama

* sqtt readme

* itertools

* rm that

* signals back
2026-03-25 09:52:27 +09:00
qazal
652bab8aad viz: support nested track_rewrites (#15454)
* simple test

* stack active groups
2026-03-25 05:01:30 +09:00
chenyu
b7960841af support shape broadcast in UOp.alu (#15442)
i think it can integrate tighter, but now Tensor also does ufix from UOp and implicit dtype upcast
2026-03-24 10:14:57 -04:00
George Hotz
a33ac869aa llm server: temperature + test client (#15444)
* improvements to the llm server

* eval script

* eval llm

* better eval gets 58.71

* cleanups

* add temperature, but multinomial is absurdly slow

* claude is so smart

* lint

* remove slop

* no more stop
2026-03-24 21:07:15 +08:00