[GH-ISSUE #27] Compatibility report: works on CachyOS (clang/ThinLTO kernel), 2x RTX 3090 — +53–58% BF16/FP16/TF32 and FlashAttention 2, bit-identical outputs #20

Closed
opened 2026-10-26 16:39:19 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @JoaoZaokk on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/27

Thanks for this. Data point from a dual-3090 workstation, including the display card.

Setup

  • 2x RTX 3090 10de:2204, 0000:01:00.0 (VBIOS 94.02.42.00.A7) and 0000:05:00.0 (VBIOS 94.02.42.00.9A, drives the desktop)
  • B650M board, both cards at PCIe x4
  • CachyOS, kernel 7.2.10-1-cachyos (built with clang 23, ThinLTO), linux-cachyos-nvidia-open 615.78.08
  • systemd-boot, mkinitcpio with the systemd hook, Secure Boot off
  • Commit c274e74 (I stayed off fc83321 because of #20), built with makepkg from packaging/arch, installed with pacman -U
  • gpu_unlock.targets=all, cold boot

Notes on installing

  • The zz-gpu-unlock.conf drop-in still needs the #14 fix (gpu_unlock? -> gpu_unlock) with the systemd hook; after that MODULES.conf lists gpu_unlock and the unlock runs. No nvidia module is in my initramfs, so it loads well before nvidia.
  • The CachyOS kernel is built with clang: building the module by hand with gcc fails on clang-only flags, but DKMS 3.4.4 adds LLVM=1 by itself (CONFIG_CC_IS_CLANG=y), so the package install just works.
  • Both cards report gpu_unlock: unlocked about 1 s into boot; the display card's screen is blank for a few seconds, as documented. No Xid, nvidia binds both.

Results (same script before/after, PyTorch 2.13 + CUDA 13.0, card at 0000:01:00.0, idle desktop on the other card)

Power limit 350 W (stock):

kernel before after gain
cuBLAS BF16 GEMM 8192³ 15.68 ms (70 TFLOPS) 10.10 ms (109 TFLOPS) +55%
cuBLAS FP16 GEMM 8192³ 15.97 ms 10.45 ms +53%
BF16 GEMM, diffusion-model FFN shape 4.58 ms 2.90 ms +58%
TF32 GEMM 4096³ 4.06 ms 2.60 ms +57%
FlashAttention 2 (3 image-model shapes, real Q/K/V) 6.07 / 3.93 / 3.96 ms 3.97 / 2.57 / 2.57 ms +53–54%
cuDNN SDPA with additive mask 31.6 ms 23.4 ms +35%
controls: INT8 GEMM / SageAttention (int8 QK) / FP32 without tensor cores −0.6 / −1.8 / −2.3%

Power limit 280 W: BF16 GEMM +43%, FP16 +38%, TF32 +47%, FlashAttention 2 +50%, masked cuDNN SDPA +29%, controls within 1.6%.

Every kernel's output hash (fixed inputs) is identical before and after: bit-identical numerics, as the README says.

End to end, a diffusion model (Z-Image Turbo, 1024², 8 steps, BF16, FlashAttention 2) went to 4.89 s per image; repeated runs are bit-identical across server restarts.

Side effect worth knowing

Some hand-tuned "fp16-accumulate P·V" attention kernels that beat FlashAttention 2 on stock GeForce Ampere (because FP32-accumulate HMMA was half rate) lose to FA2 once unlocked: mine went from 20% faster to 6–15% slower, so I now switch it off when /sys/module/gpu_unlock/parameters/targets is set. INT8 attention (SageAttention, int8 QK) is now within 2–22% of exact FA2.

Originally created by @JoaoZaokk on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/27 Thanks for this. Data point from a dual-3090 workstation, including the display card. ### Setup - 2x RTX 3090 `10de:2204`, `0000:01:00.0` (VBIOS `94.02.42.00.A7`) and `0000:05:00.0` (VBIOS `94.02.42.00.9A`, drives the desktop) - B650M board, both cards at PCIe x4 - CachyOS, kernel `7.2.10-1-cachyos` (built with clang 23, ThinLTO), `linux-cachyos-nvidia-open` 615.78.08 - systemd-boot, mkinitcpio with the `systemd` hook, Secure Boot off - Commit **c274e74** (I stayed off fc83321 because of #20), built with `makepkg` from `packaging/arch`, installed with `pacman -U` - `gpu_unlock.targets=all`, cold boot ### Notes on installing - The `zz-gpu-unlock.conf` drop-in still needs the #14 fix (`gpu_unlock?` -> `gpu_unlock`) with the `systemd` hook; after that `MODULES.conf` lists `gpu_unlock` and the unlock runs. No nvidia module is in my initramfs, so it loads well before `nvidia`. - The CachyOS kernel is built with clang: building the module by hand with gcc fails on clang-only flags, but DKMS 3.4.4 adds `LLVM=1` by itself (`CONFIG_CC_IS_CLANG=y`), so the package install just works. - Both cards report `gpu_unlock: unlocked` about 1 s into boot; the display card's screen is blank for a few seconds, as documented. No Xid, `nvidia` binds both. ### Results (same script before/after, PyTorch 2.13 + CUDA 13.0, card at `0000:01:00.0`, idle desktop on the other card) Power limit 350 W (stock): | kernel | before | after | gain | |---|---|---|---| | cuBLAS BF16 GEMM 8192³ | 15.68 ms (70 TFLOPS) | 10.10 ms (109 TFLOPS) | +55% | | cuBLAS FP16 GEMM 8192³ | 15.97 ms | 10.45 ms | +53% | | BF16 GEMM, diffusion-model FFN shape | 4.58 ms | 2.90 ms | +58% | | TF32 GEMM 4096³ | 4.06 ms | 2.60 ms | +57% | | FlashAttention 2 (3 image-model shapes, real Q/K/V) | 6.07 / 3.93 / 3.96 ms | 3.97 / 2.57 / 2.57 ms | +53–54% | | cuDNN SDPA with additive mask | 31.6 ms | 23.4 ms | +35% | | controls: INT8 GEMM / SageAttention (int8 QK) / FP32 without tensor cores | | | −0.6 / −1.8 / −2.3% | Power limit 280 W: BF16 GEMM +43%, FP16 +38%, TF32 +47%, FlashAttention 2 +50%, masked cuDNN SDPA +29%, controls within 1.6%. Every kernel's output hash (fixed inputs) is identical before and after: bit-identical numerics, as the README says. End to end, a diffusion model (Z-Image Turbo, 1024², 8 steps, BF16, FlashAttention 2) went to 4.89 s per image; repeated runs are bit-identical across server restarts. ### Side effect worth knowing Some hand-tuned "fp16-accumulate P·V" attention kernels that beat FlashAttention 2 on stock GeForce Ampere (because FP32-accumulate HMMA was half rate) lose to FA2 once unlocked: mine went from 20% faster to 6–15% slower, so I now switch it off when `/sys/module/gpu_unlock/parameters/targets` is set. INT8 attention (SageAttention, int8 QK) is now within 2–22% of exact FA2.
bsakaguchi 2026-10-30 04:54:30 +07:00
Author
Owner

@Zagitta commented on GitHub (Oct 27, 2026):

Thanks for the report! Success reports now live in one place: https://github.com/Zagitta/gpu-unlock/discussions/238. Closing this so the issue tracker stays focused on cards where the unlock fails. Your numbers stay searchable here under the success-report label. If something stops working later, please open an unlock failure issue.

<!-- gh-comment-id:6454869840 --> @Zagitta commented on GitHub (Oct 27, 2026): Thanks for the report! Success reports now live in one place: https://github.com/Zagitta/gpu-unlock/discussions/238. Closing this so the issue tracker stays focused on cards where the unlock fails. Your numbers stay searchable here under the `success-report` label. If something stops working later, please open an unlock failure issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Zagitta/gpu-unlock#20
No description provided.