#
#asahi · 2026-09-14 17:17
linkmauvechaos_princess, your suggestions lowered the total time for the “benchmark” from 775ms to 701ms mean out of ten runs!
#asahi · 2026-09-14 17:04
chaos_princessm-series has a huge rob, it is most likely fine
#asahi · 2026-09-14 17:03
linkmauveThe instructions seem less reordered to take into account microarchitectural details though.
#asahi · 2026-09-14 17:03
chaos_princessleave the 3 as-is then
#asahi · 2026-09-14 17:03
linkmauveIt still is at opt-level = 2, not at "s".
#asahi · 2026-09-14 17:02
chaos_princessbut we want the inner loop unrolled, just so the loads are hoisted
#asahi · 2026-09-14 17:01
ohxorudhello
#asahi · 2026-09-14 16:59
linkmauveAh I just figured out why all iterations get unrolled: you define opt-level = 3 in Cargo.toml, at 2 or "s" it emits a proper loop.
#asahi · 2026-09-14 16:46
linkmauveRight.
#asahi · 2026-09-14 16:46
chaos_princessjust add a comment that compiler already does it, it is more readable imo
#asahi · 2026-09-14 16:45
linkmauveBut it would be better to do it in the code I guess, to avoid the next person to wonder about that.
#asahi · 2026-09-14 16:45
linkmauveAh yeah, I had thought about that but figured out the compiler already did it.
#asahi · 2026-09-14 16:44
chaos_princessmy proposal was that since coeffs/poles do not change - unroll the loop and hoist the loads
#asahi · 2026-09-14 16:44
chaos_princessok, the compiler did it
#asahi · 2026-09-14 16:43
linkmauveI don’t understand why everything gets unrolled, all nine iterations.
#asahi · 2026-09-14 16:42
linkmauvechaos_princess, https://linkmauve.fr/files/hilbert_iir.S
#asahi · 2026-09-14 16:39
chaos_princesslinkmauve: can you post the codegen, i think i have more ideas
#asahi · 2026-09-14 16:33
chaos_princessarithmetic intensity is meh, we are probably waiting on memory now, but that's the algo
#asahi · 2026-09-14 16:33
chaos_princesslooks good
#asahi · 2026-09-14 16:30
linkmauveThere, pushed again.
#asahi · 2026-09-14 16:29
linkmauveIt does, just checked. :)
#asahi · 2026-09-14 16:28
chaos_princessjust make sure to check it codegens to the right thing
#asahi · 2026-09-14 16:28
linkmauveAh yeah, makes sense.
#asahi · 2026-09-14 16:28
chaos_princesslinkmauve: https://doc.rust-lang.org/std/primitive.f32.html#method.mul_add
#asahi · 2026-09-14 16:27
linkmauveThe scalar fma instruction, which could be used to reduce input[k][i] * self.direct + vaddvq_f32(ra) by one instruction.
#asahi · 2026-09-14 16:26
linkmauveWut, there is no intrinsic whatsoever for the FMADD instruction?!
#asahi · 2026-09-14 16:16
chaos_princessi see, yep
#asahi · 2026-09-14 16:16
linkmauvechaos_princess, how do you do that without miscomputing the state?
#asahi · 2026-09-14 16:12
chaos_princessidk if can be done for rv chain, the sub is making it annoying
#asahi · 2026-09-14 16:12
chaos_princessactually, yea, looks like it can
#asahi · 2026-09-14 16:12
chaos_princesslinkmauve: another one if i am reading this right, can you put the add from ia = vaddq_f32(ia, iv) into let iv = vmulq_f32(state_r, poles_i); turning that to a fma too?
#asahi · 2026-09-14 15:54
linkmauveI didn’t do it in the x86 version, since that’s an extension not part of SSE, so not guaranteed to be present on all amd64 CPUs.
#asahi · 2026-09-14 15:54
linkmauveI just pushed your version.
#asahi · 2026-09-14 15:54
linkmauvechaos_princess, oh indeed, that removes four instructions for every iteration, thanks!
#asahi · 2026-09-14 15:08
chaos_princessright?
#asahi · 2026-09-14 15:08
chaos_princesslinkmauve: a - b = a - s_i * p_i = fms(a, s_i, p_i); rv = (a - b) + (i_k_i * c_r) -> rv = fma((a - b), i_k_i, c_r)
#asahi · 2026-09-14 14:45
linkmauvechadmed, JamesCalligeros[m], I just opened https://github.com/chadmed/triforce/pull/8 if you’re interested in testing that on Apple hardware.
#asahi · 2026-09-14 09:18
MaryOkay
#asahi · 2026-09-14 08:51
jannauMary: I haven't seen that. not sure if worth investing time into debugging this as the 7.2 downstream kernel will switch to the upstream gpuvm rust abstractions
#asahi · 2026-09-13 22:11
dcavalcaMaybe later in the week, dealing with the flu right now
#asahi · 2026-09-13 21:56
jvoisindcavalca8569797667858944: do you have some time to bump fex-emu in fedora?
#asahi · 2026-09-13 11:43
Maryhttps://gist.github.com/marysaka/4a838747db976b37996c83d12283bd36
#asahi · 2026-09-13 11:40
Marywill let it finish and send the full logs
#asahi · 2026-09-13 11:40
Maryjannau: are you aware of any memory corruption with asahi kernel driver on 7.1.6-400.asahi.fc44.aarch64+16k? Tried to run a full CTS on my M1 Max with KDE around and got one just now
#asahi · 2026-09-12 22:52
linkmauveBoth auto-vectorized and manually written.
#asahi · 2026-09-12 22:51
linkmauveI’ve done SIMD in Rust just fine, on both amd64, AArch64 and PowerPC.
#asahi · 2026-09-12 22:49
linkmauve(This isn’t the portable SIMD project, I used normal intrinsics.)
#asahi · 2026-09-12 22:49
linkmauveIt is.
#asahi · 2026-09-12 22:45
chaos_princess(i do not trust rust's simd yet)
#asahi · 2026-09-12 22:45
chaos_princessisn't it an intrinsic?

plus ›