Express memory offset in reported-clock domain, convert 2x at NVML boundary

On GDDR7/Blackwell (measured: RTX 5090, driver 615.78.08) the memory
V/F offset NVML APIs operate in a domain 2x the memory clock NVML
reports. Applying +3000 moved the under-load clock by only +1500 MHz;
the driver range -2000..+6000 maps to NvAPI's -1000..+3000.

- limits.py: multiply by _MEM_OFFSET_DOMAIN_FACTOR (2) on set, divide
  on get/readback/range for the MEM domain only; GPC untouched.
  API/CLI/profiles/UI now all speak the reported-clock domain
  (what nvidia-smi shows), so a +3000 slider value reaches the
  driver's full +6000 headroom (old UI half-used it).
- limits.py: call nvmlDeviceGet/SetClockOffsets via the raw function
  pointer for the real driver return code - nvidia-ml-py wrappers
  discard it and always report success, which would have masked
  erroring drivers and skipped the deprecated-API fallbacks.
- PerformancePanel: fallback range -1000..+3000, remove stale
  Math.min(max, 3000) cap that clamped the new max, add domain tooltip.
- Docs: document the domain conversion (API.md, Usage-Guide.md).
This commit is contained in:
ARIA committed 2026-11-12 13:43:17 +01:00
1 parent 2e8e580d79
commit a76685a10b
4 files changed
+134 -58

No files matched your search

@@ -138,10 +138,10 @@ export function PerformancePanel() {
const pwrMin = limits.min_power_limit_w ?? 100;
const pwrMax = limits.max_power_limit_w ?? 600;
// Memory offset
// Memory offset (reported-clock domain — what nvidia-smi shows)
const memVal = pending.mem_offset_mhz ?? limits.mem_offset_mhz ?? 0;
const memMin = limits.min_mem_offset_mhz ?? -2000;
const memMax = Math.min(limits.max_mem_offset_mhz ?? 3000, 3000);
const memMin = limits.min_mem_offset_mhz ?? -1000;
const memMax = limits.max_mem_offset_mhz ?? 3000;
return (
<>
@@ -319,7 +319,10 @@ export function PerformancePanel() {
{/* ── Memory Clock Offset ───────────────────────────────────────── */}
<div className="px-4 py-4 flex flex-col gap-3">
<div className="flex items-center justify-between">
<span className="text-xs text-zinc-500 uppercase tracking-wider">
<span
className="text-xs text-zinc-500 uppercase tracking-wider"
title="In the reported-clock domain (matches nvidia-smi memory clock). On GDDR7/Blackwell the driver applies 2x internally."
>
Memory Clock Offset
</span>
<div className="flex items-center gap-1.5">