解锁Nvidia 3000卡上的FP/BF16指示发卡率到其专业等同器
这个Linux内核模块结合了CMP解锁器的V67/PLM技术与UEFI方法的驱动前时间。 它运行解锁,写出速度选择器(SS0 0x8888888888,它选择了完整的 BF16 速率,以及4位的SS1 0x8 IMLA4),并在未修改的NVIDIA驱动器绑定卡前执行FLR. 它既不是UEFI应用程序,也不是补丁的NVIDIA驱动程序。
这个早期klod驱动程序的好处是,它不需要每次手动补丁nvidia 发布一个新的驱动版本。
这个解锁的作用是它翻倍,指令发售速度为FP/BF16 FMA,可进入GA102,GA103,GA104和GA106等卡的FP32操作。
3090 Ti 稠密 81923 GEMM 在450 W,有FP32累积的五样中位数:
用户报告的结果。 模块接受列表中的每个 GeForce ID
内核/gpu unlock/main.c,但下面的卡片是某人拥有的
报告。 请加上你的
兼容性报告
无论它是否有效。
收益来自每份报告本身的基准测试的密集的GEMM吞吐量,因此无法直接比较。 功率限制很重要:最低(+25%)出自被封为225 W的牌。
矩阵-重力工作加快:LLM预填(+14-36%在#9,#15,#25和#33),扩散和闪存。 LLM解码器受内存带宽限制,INT8工作保持了大致相同。 比较产出的报告在前后发现它们完全相同。
报道中还用一款机器覆盖了最多4张卡片,由卡片驱动显示器,卡片通过Vfio-pci(#17)传递给一个VM.
首发:
git 克隆 https://github.com/Zagitta/gpu-unlock
cd gpu- 解锁
制造安装
然后将 gpu unlock. targers = all 附加到您的内核命令行中,保留
现有选项:
- GRUB(Debian/Ubuntu/Mint):在GRUB CMDLINE LINUX DEFAULT内加入/etc/default/grub,再运行sudo更新-grub.
- GRUB(Arch/CachyOS):同样的编辑,然后运行
sudo grub-mkconfig -o /boot/grub/grub.cfg.
费多拉/雷尔:跑
sudo grubby -- update-内核=ALL --args="gpu unlock. targers=全部".
- systemd-boot:附加到您启动条目中的选项行
(botctl状态显示它的位置).
- UKI / 生成条目:将其添加到/etc/内核/立方体并再生
您的启动图像/ 连接( 如 sudo mkinitcpio - P for mkinitcpio UKIs)。
每个编组在 HTTPS 上下载被绑定的 NVIDIA/ CachyOS 输入,检查
及其SHA-256,并且只在构建目录和
二进制包。 所有三种格式都通过相同的制造安装-*
目标。 包裹由坚定的总部建造。
构建、安装构建依赖,并一步安装软件包( 您的sudo 密码的任务):
制作安装 # 检测分布并选择安装器
制造安装- arch # makepkg - sif
制作安装- deb # apt-get build-dep, dpkg-build package, apt-get 安装
制造安装- rpm # dnf 构建dep, rpmbuilding, dnf 安装
制造安装使用/etc/os-release(ID,然后是ID LIKE)来检测Arch
Debian/Ubuntu,或Fedora/RHEL/CentOS家族。 RPM安装器需要DNF.
对于其他分布,请在上面选择一个相容的明显目标。
造出拱门,制造出地盘,只制造出rpm. Debian 和 RPM 软件包开始
用于建造/拆卸和建造/倒置。 NVIDIA 输入被缓存于
~.cache/gpu-unlock/输入(输入;与 INPUTS=覆盖).
dpkg-building package本身从未使用过网络,所以一个干净的芯片建筑(built 或
pbuilder)需要GPU UNLOCK INPUTS指向缓存。
make distr档案,Debian 源软件包和.nosrc.rpm
没有 NVIDIA 档案或生成固件。
软件包将 gpu unlock 及其固件放入initramfs 并加载
在nvidia绑定卡片之前:
- mkinitcpio:/etc/mkinitcpio.conf.d/zz-gpu-unlock.conf在MODULES的nvidia前插入gpu unlock,所以显示卡为空白。
尽可能短的时间。 没有nvidia在图像中,它去
在从根文件系统中装入 nvidia 之前,上一站仍在运行。
图像在安装时重建。 mkinitcpio 对图像忽略了滴入
以 -c < config > 或预设 config 所建;将 gpu unlock 右移
之前的nvidia 在那个配置的Modules自己。
- initramfs-工具:/usr/share/initramfs-tools/modules.d/gpu-unlock.conf.
- dracut: /usr/lib/dracut/dracut.conf.d/gpu-unlock.conf.
用initramfs-tool和dracut为每个已安装有头的内核建造了模块,这些内核的图像在安装时重建,去除时再重建。 被安装的内核后来从内核自己的安装钩子中得到模块和新图像。
没有柔软的nvidia前:规则:klod只荣耀第一个
软接nvidia行读取,所以其他包的规则(nvidia-utils)
gddr6 hwmon)会默默地覆盖它,或者它会覆盖他们的。
除非内核命令行选择在:
gpu unlock. targers=全部# 每张无约束的GA102/GA103/GA104/GA106卡
gpu unlock. 目标=00: 21:00. 0 只有这些牌
gpu unlock. 目标=00:21:00.00000:22:00.0#逗号分离
地址是完整的 PCI 名称,因为 Ispci - D 打印它们( 任意一个位数 )
case),独立于GPU编号和显示角色。 不是一个条目
a GA102/GA103/GA104/GA106卡,包括所有与地址相混合的卡,均登录并被忽略。
牌是同时解锁的,大约1秒左右,不管多少
有一张卡片,每张卡片都是靠自己已经捆绑或供电
下来跳过。 控制板固件留下的巴士(超微分)
X11 无论选择 ROM 和总线主机设置如何,都会被清除。
首先;已经启用的驱动程序仍然被拒绝。 礛
nvidia装入并按常制装每张卡。
显示卡也有效。 它的固件帧缓冲器(起动控制台和
Plymouth)在解锁的坚固器皿走出跑道时一直运行,并且是
nvidia-drm在卡片重置前就被移除了,因为nvidia-drm会做一分钟
以后再说吧它的屏幕是空白的从重置,直到 nvidia -drm
结束了。
在靴子后手动装入模块对nvidia的卡没有任何作用
已经捆绑。
悬停在RAM上使出卡片被关闭,它会重放速度选择器。 之后
恢复模块解锁在靴子上解锁的每张卡片
nvidia恢复:它的暂停通知器运行在nvidia的正前方
恢复来自( NVreg UseKernelSupend Notifers=1) 的卡片,默认为
当前驱动程序;nvidia-resume. service 后期运行。 这个新增大约是a
第二段继续发言。 保持动力的卡片,就像暂停闲置一样,仍然
解锁后只读取。 nvidia已经恢复的名片,或就是
绑在另一个驱动器上,是左侧的,和日志称为什么。 添加
gpu unlock.resume=0 到内核命令行,或写出 0 到
/sys/module/gpu unlock/parameters/resume,以关闭此功能。 休眠状态是
未覆盖。
检查结果为:
日记ctl -k -b QQ grep gpu 解锁
lspci -nnk -s 0000:21:00.0
要停止解锁,请移除 gpu unlock。 目标=来自内核命令行;
对于一次性的靴子,删除它在靴子装填器的编辑屏幕。 删除
软件包还去除了模块和initramfs 滴入。
如果卡片上的固件从未停止,模块会记录并保留固件可能仍然使用的 DMA 缓冲器,直到下一个电源关闭。 再试一次就关掉电源
内核模块和本地包装只有GPL-2.0-. 生成的有效载荷
(b) NVIDIA固件仍由它自己保管;
条件。 有关归属和通知,见固件/NOTIEC.md和许可证。
帮我买更多 GPU < 3
https://burymeacoffee.com/zagitta 页面存档备份,存于互联网档案馆。
ETH: 0xf4eee937937f92038D70B16AbD7736D8a53a1c5c
BTC: bc1克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克。
索尔:8Rih6HY7V4LcdjYHz4iSffT4fTniqw5 CACa BigSVxNYu(英语:CACa BigSVxNYu) 互联网档案馆的存檔,存档日期2013-12-21.
本文由 AI宝库自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Unlock FP/BF16 instruction issue rate on Nvidia 3000's cards to their professional equivalents
This Linux kernel module combines the CMP unlocker's V67/PLM technique with the pre-driver timing of the UEFI approach. It runs the unlock, writes the speed selectors (SS0 0x88888888, which selects the full BF16 rate, and the 4-bit SS1 0x8 IMLA4) and performs FLR before the unmodified NVIDIA driver binds the card. It is neither a UEFI application nor a patched NVIDIA driver.
The benefit of this early kmod driver is that it does not require manual patching each time nvidia releases a new driver version.
The effect of this unlock is that it doubles the instruction issuing speed of FP/BF16 FMA into FP32 operations on GA102, GA103, GA104 and GA106 cards.
3090 Ti dense 8192³ GEMM at 450 W, five-sample medians with FP32 accumulation:
Results reported by users. The module accepts every GeForce ID listed in
kernel/gpu_unlock/main.c, but the cards below are the ones someone has
reported on. Please add yours with a
compatibility report,
whether it worked or not.
The gains are dense GEMM throughput from each report's own benchmark, so they are not directly comparable. The power limit matters a lot: the lowest figure (+25%) is from cards capped at 225 W.
Matrix-heavy work speeds up: LLM prefill (+14–36% in #9, #15, #25 and #33), diffusion and FlashAttention. LLM decode, which is limited by memory bandwidth, and INT8 work stay about the same. The reports that compared outputs found them bit-identical before and after.
Reports also cover up to four cards in one machine, the card driving the display, and cards passed through to a VM with vfio-pci (#17).
First run:
git clone https://github.com/Zagitta/gpu-unlock
cd gpu-unlock
make install
Then append gpu_unlock.targets=all to your kernel command line, keeping
existing options:
- GRUB (Debian/Ubuntu/Mint): add it inside GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then run sudo update-grub.
- GRUB (Arch/CachyOS): same edit, then run
sudo grub-mkconfig -o /boot/grub/grub.cfg.
- Fedora/RHEL: run
sudo grubby --update-kernel=ALL --args="gpu_unlock.targets=all".
- systemd-boot: append it to the options line in your boot entry
(bootctl status shows its location).
- UKI / generated entries: add it to /etc/kernel/cmdline and regenerate
your boot images/entries (e.g. sudo mkinitcpio -P for mkinitcpio UKIs).
Every build downloads the pinned NVIDIA/CachyOS inputs over HTTPS, checks
their SHA-256, and generates firmware only in the build directory and the
binary package. All three formats install through the same make install-*
targets. Packages are built from the committed HEAD.
Build, install build dependencies, and install the packages in one step (asks for your sudo password):
make install # detect the distribution and select an installer
make install-arch # makepkg -sif
make install-deb # apt-get build-dep, dpkg-buildpackage, apt-get install
make install-rpm # dnf builddep, rpmbuild, dnf install
make install uses /etc/os-release (ID, then ID_LIKE) to detect Arch,
Debian/Ubuntu, or Fedora/RHEL/CentOS families. The RPM installer requires DNF.
For other distributions, select a compatible explicit target above.
make arch, make deb and make rpm only build. Debian and RPM packages go
to build/deb and build/rpm. The NVIDIA inputs are cached in
~/.cache/gpu-unlock/inputs (make inputs; override with INPUTS=).
dpkg-buildpackage itself never uses the network, so a clean-chroot build (sbuild or
pbuilder) needs GPU_UNLOCK_INPUTS pointing at that cache.
The make dist archive, the Debian source package and the .nosrc.rpm
contain no NVIDIA archives or generated firmware.
The packages put gpu_unlock and its firmware in the initramfs and load it
there, before nvidia can bind a card:
- mkinitcpio: /etc/mkinitcpio.conf.d/zz-gpu-unlock.conf inserts gpu_unlock right before nvidia in MODULES, so a display card is blank
for as short a time as possible. Without nvidia in the image, it goes
last and still runs before an nvidia loaded from the root filesystem.
Images are rebuilt on install. mkinitcpio ignores drop-ins for an image
built with -c <config> or a preset _config; put gpu_unlock right
before nvidia in that config's MODULES yourself.
- initramfs-tools: /usr/share/initramfs-tools/modules.d/gpu-unlock.conf.
- dracut: /usr/lib/dracut/dracut.conf.d/gpu-unlock.conf.
With initramfs-tools and dracut, the module is built for every installed kernel that has headers, and those kernels' images are rebuilt on install and again on removal. Kernels installed later get the module and a new image from the kernel's own install hooks.
There is no softdep nvidia pre: rule: kmod honours only the first
softdep nvidia line it reads, so other packages' rules (nvidia-utils,
gddr6_hwmon) would silently override it, or it would override theirs.
The module does nothing unless the kernel command line opts in:
gpu_unlock.targets=all # every unbound GA102/GA103/GA104/GA106 card
gpu_unlock.targets=0000:21:00.0 # only these cards
gpu_unlock.targets=0000:21:00.0,0000:22:00.0 # comma-separated
Addresses are full PCI names as lspci -D prints them (hex digits in either
case), independent of GPU numbering and display role. An entry that is not
a GA102/GA103/GA104/GA106 card, including all mixed with addresses, is logged and ignored.
The cards are unlocked concurrently, about a second in all however many
there are, and each on its own: a card that is already bound or powered
down is skipped. Bus mastering that the board firmware left on (Supermicro
X11 does this whatever its option ROM and bus master settings) is cleared
first; a card some driver already initialised is still refused. Then
nvidia loads and binds every card as usual.
The display card works too. Its firmware framebuffer (the boot console and
Plymouth) keeps running while the unlock's firmware steps run, and is
removed just before the card's reset, as nvidia-drm would do a moment
later anyway. Its screen is blank from that reset until nvidia-drm takes
over.
Loading the module by hand after boot does nothing to a card that nvidia
has bound.
Suspend to RAM powers the cards off, which resets the speed selectors. After
resume the module unlocks every card it unlocked at boot again, before
nvidia resumes it: its suspend notifier runs just ahead of the one nvidia
resumes its cards from (NVreg_UseKernelSuspendNotifiers=1, the default in
current drivers; nvidia-resume.service runs later still). This adds about a
second to resume. A card that kept power, as in suspend to idle, is still
unlocked and is only read. A card that nvidia has already resumed, or that is
bound to another driver, is left as it is, and the log says why. Add
gpu_unlock.resume=0 to the kernel command line, or write 0 to
/sys/module/gpu_unlock/parameters/resume, to turn this off. Hibernation is
not covered.
Check the result with:
journalctl -k -b | grep gpu_unlock
lspci -nnk -s 0000:21:00.0
To stop unlocking, remove gpu_unlock.targets= from the kernel command line;
for a one-off boot, delete it in the bootloader's edit screen. Removing the
packages also removes the module and the initramfs drop-ins.
If the firmware on a card never stops, the module logs it and keeps the DMA buffers that firmware may still use until the next power off. Power off before trying again.
The kernel module and local packaging are GPL-2.0-only. The generated payload
derives from the pinned CMP reference; NVIDIA firmware remains under its own
terms. See firmware/NOTICE.md and licenses/ for attribution and notices.
Help me buy more GPUs <3
https://buymeacoffee.com/zagitta
ETH: 0xf4eee937937f92038D70B16AbD7736D8a53a1c5c
BTC: bc1qwpkwp70fn76z3s4kg2l9y3j4kst95twcznuugf
SOL: 8Rih6HY7V4LcdjYHz4iSffT4fTniqw5CACaBigSVxNYu
Auto-fetched and translated by AI Gem Box. All rights belong to the original author.