[PR #62] Add FP16 accumulation uncap hook for GeForce #106

Open
opened 2026-10-31 06:56:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JustAResearcher/gpu-unlock-ada/pull/62
Author: @AndrewCTF
Created: 10/26/2026
Status: 🔄 Open

Base: main ← Head: fp16-accum-uncap


📝 Commits (1)

  • c4e1b43 Add FP16 accumulation uncap hook for GeForce

📊 Changes

3 files changed (+77 additions, -0 deletions)

View changed files

➕ tools/fp16-uncap/README.md (+45 -0)
➕ tools/fp16-uncap/_nvidia_fp16_uncap.pth (+1 -0)
➕ tools/fp16-uncap/_nvidia_fp16_uncap.py (+31 -0)

📄 Description

What

Adds tools/fp16-uncap/: a ~30-line Python import hook (_nvidia_fp16_uncap.py + .pth) that enables PyTorch's public torch.backends.cuda.matmul.allow_fp16_accumulation toggle automatically in any venv it's installed into. GeForce cards run FP16 matmuls at half rate when accumulation is FP32; PyTorch already exposes the full-rate path — it's just off by default.

Measured on an RTX 5090 (driver 615.71.09): ~325 TFLOPS FP16 matmul with the hook vs ~217 without.

Scope / what this is NOT

  • No driver, firmware, kernel, or VBIOS changes. No patched binaries, no signatures, no security mechanisms touched.
  • It calls a documented, first-class PyTorch public API at import time. Nothing is circumvented — the option exists precisely so users can choose the full-rate path.
  • Does not affect the FP32-accumulate rate (that lives in signed firmware and remains unsolved; the GB202 notes in this repo are separate).

Legality

  • All committed code is original (written for this repo); no NVIDIA or third-party code included.
  • Compatible with the repo's GPL-2: files are offered under the same license.
  • No system-specific or security-posture information is disclosed.

Trade-offs

FP16 accumulation adds rounding error to long reductions (that's why the default is off). For inference and most fine-tuning it's practically indistinguishable; numerically sensitive training may want it off.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JustAResearcher/gpu-unlock-ada/pull/62 **Author:** [@AndrewCTF](https://github.com/AndrewCTF) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fp16-accum-uncap` --- ### 📝 Commits (1) - [`c4e1b43`](https://github.com/JustAResearcher/gpu-unlock-ada/commit/c4e1b4331afdffca54fcc0326f5341c873df142e) Add FP16 accumulation uncap hook for GeForce ### 📊 Changes **3 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tools/fp16-uncap/README.md` (+45 -0) ➕ `tools/fp16-uncap/_nvidia_fp16_uncap.pth` (+1 -0) ➕ `tools/fp16-uncap/_nvidia_fp16_uncap.py` (+31 -0) </details> ### 📄 Description ## What Adds `tools/fp16-uncap/`: a ~30-line Python import hook (`_nvidia_fp16_uncap.py` + `.pth`) that enables PyTorch's public `torch.backends.cuda.matmul.allow_fp16_accumulation` toggle automatically in any venv it's installed into. GeForce cards run FP16 matmuls at half rate when accumulation is FP32; PyTorch already exposes the full-rate path — it's just off by default. Measured on an RTX 5090 (driver 615.71.09): ~325 TFLOPS FP16 matmul with the hook vs ~217 without. ## Scope / what this is NOT - No driver, firmware, kernel, or VBIOS changes. No patched binaries, no signatures, no security mechanisms touched. - It calls a documented, first-class PyTorch public API at import time. Nothing is circumvented — the option exists precisely so users can choose the full-rate path. - Does not affect the FP32-accumulate rate (that lives in signed firmware and remains unsolved; the GB202 notes in this repo are separate). ## Legality - All committed code is original (written for this repo); no NVIDIA or third-party code included. - Compatible with the repo's GPL-2: files are offered under the same license. - No system-specific or security-posture information is disclosed. ## Trade-offs FP16 accumulation adds rounding error to long reductions (that's why the default is off). For inference and most fine-tuning it's practically indistinguishable; numerically sensitive training may want it off. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
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
JustAResearcher/gpu-unlock-ada#106
No description provided.