60 lines
3.6 KiB
Markdown
60 lines
3.6 KiB
Markdown
# Performance
|
||
|
||
## Method
|
||
|
||
- **Hardware and settings:** Radeon RX 7700 XT (RDNA3, 54 CUs), Ryzen 9 5900XT, Linux 6.18. SILENT HILL Townfall at 2560×1440 output.
|
||
- **Route:** every run plays the same scripted 62-second walk through a street, with fog, wires, fences and signage.
|
||
- **Frame rate:** from MangoHud's per-frame log over the walk, as frames divided by the sum of frame times.
|
||
- **Pairing:** runs are compared back-to-back in one session, because repeated runs of an identical setup vary by about 1%.
|
||
- **Screen recording:** it costs a few fps, so recorded videos show slightly lower numbers than the table.
|
||
- **Latency:** all DLSS numbers are same-frame (frame age 0). Every frame shows its own DLSS result, as with a native upscaler.
|
||
- **Other upscaler modes:** Balanced, Performance and Ultra Performance use OptiScaler's render-ratio override (1.72, 2.0, 3.0) on top of the game's Quality mode.
|
||
|
||
## Results
|
||
|
||
| Mode (render resolution) | DLSS 3 CNN (E) | DLSS 4 (K) | DLSS 4.5 (M) | FSR 4 |
|
||
|---|---|---|---|---|
|
||
| Quality (1705×960) | **72.4** | 69.4 | 51.5 | 76.0 |
|
||
| Balanced (1488×837) | **80.5** | 76.6 | 59.6 | 84.5 |
|
||
| Performance (1280×720) | **87.8** | 84.0 | 69.9 | 94.0 |
|
||
| Ultra Performance (853×480) | 88.9 | **94.5** | 90.3 | 107.3 |
|
||
| Native 2560×1440, no upscaling (TSR at 100%) | | 49.1 | | |
|
||
|
||
DLSS 4's cost is almost constant across modes (about 2.8 ms of GPU time per frame). Its network runs on a grid set by the output resolution, not the render resolution, so the gap to FSR 4 widens as the render resolution drops. The CNN gets more expensive at the 3× ratio, so K is the better choice at Ultra Performance.
|
||
|
||
## What each step contributed
|
||
|
||
DLSS 4 (K) at Quality, frames per second on the walk:
|
||
|
||
| Step | fps |
|
||
|---|---|
|
||
| ZLUDA only: the transformer's outputs were non-finite, so the network had no effect | 58.5\* |
|
||
| All eleven K layers native | 65.0\* |
|
||
| Wide deep layers, f32 accumulation, cheaper operand transposes | 66.0 |
|
||
| NGX's CPU syncs removed, faster marker polling, no sync before the output copy | 66.7 |
|
||
| DLSS queued behind a GPU-side wait for the inputs (GPU busy 95% → 99%) | 68.0 |
|
||
| Native output kernel writes the game-side buffer directly | 68.4 |
|
||
| NGX samples the input buffers in place (no array copies) | 69.4 |
|
||
|
||
\* Measured from the shim's frame log on a similar stretch, before the MangoHud method was in use.
|
||
|
||
DLSS 4.5 (M) at Quality went from 28 fps (ZLUDA only) to 42 with the first native Swin layers, 46 with more waves per window, 50 with fast numerics and the texture-kernel tails, and 51.5 with the hand-off changes.
|
||
|
||
## What did not help
|
||
|
||
- **Accumulating in f16 on the WMMA units.** The error grows about 20× and the image degrades.
|
||
- **Occupancy tweaks** (VGPR caps, waves-per-EU hints) and **persistent work-groups.**
|
||
- **Non-temporal hints** for activation traffic.
|
||
- **Splitting the position-only layers by channel** instead of by token. It halves weight traffic but serialises the compute.
|
||
- **Mapping the Vulkan buffers directly as HIP arrays.** ROCm 7.2 does not export `hipExternalMemoryGetMappedMipmappedArray`.
|
||
- **Signalling the game's Vulkan timeline semaphore from HIP.** HIP does not import timeline semaphores, so the end of DLSS is still signalled from the CPU.
|
||
|
||
## Where the time goes now
|
||
|
||
For DLSS 4 at Quality the GPU spends about 2.8 ms per frame in DLSS kernels:
|
||
- NVIDIA's output kernel: 0.82 ms. It is ALU-bound at close to the GPU's instruction rate.
|
||
- The eleven network layers: 1.6 ms.
|
||
- The input kernel, exposure and miscellaneous kernels: about 0.35 ms.
|
||
|
||
The game-side input and output copies add about 0.3 ms. [native-kernels.md](native-kernels.md) lists every kernel.
|