Skip to content

vk_oidn 0.1.3

Choose a tag to compare

@mklefrancois mklefrancois released this 15 Oct 17:58
· 3 commits to main since this release

vk_oidn 0.1.3 is 1.2–1.34x faster than 0.1.2. The results are bit-identical and the API is unchanged.

Performance

GPU time on an NVIDIA RTX PRO 4500 Blackwell, HDR color with albedo and normal:

Resolution Quality 0.1.2 0.1.3 Speedup OIDN 2.5.1 CUDA
1920x1080 high 6.72 ms 5.01 ms 1.34x 8.10 ms
1920x1080 fast 3.65 ms 2.89 ms 1.26x 5.55 ms
3840x2160 high 27.83 ms 22.77 ms 1.22x 34.65 ms
3840x2160 fast 14.63 ms 12.55 ms 1.17x 23.41 ms

vk_oidn is now 1.5–1.9x faster than Open Image Denoise's CUDA backend on this GPU.

Changes

  • Convolution weights staged in shared memory. In the main and the sub-pixel (upsampling) convolution kernels, each workgroup loads the weights of a chunk once into shared memory with coalesced loads. Before, each subgroup loaded them from global memory, and diagnostic builds showed that these loads were the main cost of the kernels.
    • The outputs are bit-identical to 0.1.2: all 11 validation configurations, with buffers and with image views, compare byte for byte.
  • Simpler tile selection: 32x8-pixel tiles for every layer. The 48-pixel tiles no longer fit in shared memory with the staged weights, and they were slower.
  • New environment variables for tuning and kernel development:
    • VK_OIDN_CONV_VARIANT=mx2_nf1 forces the number of output blocks per workgroup.
    • VK_OIDN_KERNEL_DIR=<dir> loads <dir>/<kernel>.spv instead of the embedded kernel.
  • New tools:
    • tools/update_weights.py updates the packed weights from a commit of RenderKit/oidn-weights.
    • tests/microbench measures the tensor core peak (FP16 ~200 TFLOPS, FP8 ~395 on this GPU) and contains an experiment with cooperative vectors. That experiment was not faster for the convolutions.
  • Documentation: the analysis, the attempts that did not help, and the per-layer times are in docs/validation_and_performance.md.

Packages

Package Contents
vk_oidn-0.1.3-windows-x64.zip vk_oidn.lib (Release) and vk_oidnd.lib (Debug, with embedded debug information). Built with Visual Studio 2022 and the /MD runtime; usable with Visual Studio 2022 and newer.
vk_oidn-0.1.3-linux-x64.tar.gz libvk_oidn.a (Release, position-independent code). Built with GCC 13 on Ubuntu 24.04.

The SHA-256 checksums are in SHA256SUMS.txt. To upgrade, change the version and the checksum in your FetchContent_Declare (see the 0.1.1 notes).