GPU-unlock: FP/BF16 instruction issue rate on Nvidia 3000's cards
GPU-unlock: Enhancing FP/BF16 Instruction Rates for Nvidia 3000 Series
This project, hosted on GitHub by Zagitta, provides a method to unlock the FP/BF16 instruction issue rates on Nvidia 3000-series consumer cards, bringing them in line with their professional counterparts.
🛠️ Technical Overview
The gpu-unlock tool is a Linux kernel module (kmod) that implements a hybrid approach to unlocking. It merges the V67/PLM technique (from the CMP unlocker) with the pre-driver timing typically associated with UEFI-based methods.
How it Works
The module executes the unlock sequence before the standard NVIDIA driver binds to the hardware. The process follows this logic:
- Unlock Execution: Initiates the unlock sequence.
- Speed Selector Configuration:
- Sets
SS0to0x88888888(enabling full BF16 rates). - Sets the 4-bit
SS1to0x8(IMLA4).
- Sets
- Reset: Performs a Function Level Reset (FLR).
- Driver Binding: The unmodified NVIDIA driver then takes control of the card.
Key Advantage: Because this is an early-loading kernel module and
not a patched NVIDIA driver, users do not need to manually re-patch their drivers every time a new NVIDIA version is released.
Boot Sequence Logic
🚀 Performance Impact
The primary effect is a doubling of the instruction issuing speed for FP/BF16 FMA FP32 operations. This applies to cards utilizing the GA102, GA103, GA104, and GA106 chips.
Benchmark: RTX 3090 Ti
Dense GEMM at 450 W (Median of 5 samples, FP32 accumulation)
| Precision | Before Unlock | After Unlock |
|---|---|---|
| FP16 | ||
| BF16 | ||
| TF32 |
Compatibility & User Reports
The module supports all GeForce IDs found in kernel/gpu_unlock/main.c. Below is a summary of reported results:
| Chip | Card | PCI ID | Status | BF16 GEMM Gain | Reports |
|---|---|---|---|---|---|
| GA102 | RTX 3090 Ti | 10de:2203 | Unlocked | #1 | |
| GA102 | RTX 3090 | 10de:2204 | Unlocked | #5, #9, #10... | |
| GA102 | RTX 3080 Ti 20GB (OEM) | 10de:2205 | Partial | Half rate | #28 |
| GA102 | RTX 3080 10GB | 10de:2206 | Unlocked | #14 | |
| GA102 | RTX 3080 20GB (Mod) | 10de:2206 | Unlocked | #10, #15 | |
| GA104 | RTX 3070 | 10de:2484 | Unlocked | #10, #12 | |
| GA104 | RTX 3070 Ti | 10de:2482 | Untested | N/A | #32 |
| GA106 | RTX 3060 12GB | 10de:2504 | Unlocked | #13, #31 | |
| GA103 | Any | 10de:2414 | Unknown | No reports | — |
Note: Gains vary based on benchmarks used. Power limits are critical; for instance, the lower gain was observed on cards capped at .
Real-World Application
- Accelerated: Matrix-heavy tasks such as FlashAttention, Diffusion models, and LLM prefill (increases of ).
- Neutral: LLM decode (bottlenecked by memory bandwidth) and INT8 operations remain unchanged.
- Accuracy: Outputs are confirmed to be bit-identical regardless of the unlock.
- Versatility: Confirmed working with up to 4 GPUs, primary display cards, and
vfio-pciVM passthrough.
📦 Installation Guide
Initial Setup
- Clone the repository:
git clone https://github.com/Zagitta/gpu-unlock - Enter directory:
cd gpu-unlock - Install:
make install
Kernel Configuration
You must append gpu_unlock.targets=all to your kernel command line. Depending on your bootloader:
- GRUB (Debian/Ubuntu/Mint): Edit
/etc/default/grubGRUB_CMDLINE_LINUX_DEFAULTsudo update-grub. - GRUB (Arch/CachyOS): Edit config
sudo grub-mkconfig -o /boot/grub/grub.cfg. - Fedora/RHEL:
sudo grubby --update-kernel=ALL --args="gpu_unlock.targets=all". - systemd-boot: Add to the options line (check
bootctl statusfor path). - UKI: Add to
/etc/kernel/cmdlineand regenerate images.
🛠️ Build System & Distribution
The build process is automated and secure, downloading pinned NVIDIA/CachyOS inputs via HTTPS and verifying them with SHA-256 hashes.
Installation Targets
The make install command automatically detects your OS via /etc/os-release. You can also specify targets manually:
| Target | Distribution Family | Action |
|---|---|---|
make install-arch | Arch Linux | Uses makepkg -sif |
make install-deb | Debian/Ubuntu | Uses dpkg-buildpackage |
make install-rpm | Fedora/RHEL/CentOS | Uses rpmbuild |
Developer Notes:
- Inputs are cached at
~/.cache/gpu-unlock/inputs. - To use a clean-chroot build (e.g.,
sbuild), set theGPU_UNLOCK_INPUTSenvironment variable. - The
make distarchive and source packages do not contain NVIDIA binaries or firmware.
Boot Flow & Initramfs
To minimize display downtime, the module is loaded into the initramfs before the NVIDIA driver:
- mkinitcpio: A config file at
/etc/mkinitcpio.conf.d/zz-gpu-unlock.confensuresgpu_unlockis placed immediately beforenvidiain theMODULESarray. - If
nvidiais not in the image,gpu_unlockloads last but still precedes any driver loaded from the root filesystem.