Repository navigation
int4 mixed on RDNA3
New: int4 mixed (optional)
The main project's second network, now on RDNA3: the heavy matrices of the ViT, of the C=512 attention and of the
C=256 and C=128 Swin runs are computed in int4, and the Swin MLP uses a hard-swish folded into the next weights.
It is faster and its picture is not the default network's. The installer asks (--int4 or --no-int4; Enter is
no); without it you get the default network, unchanged and bit-identical to the previous build.
RX 7900 XTX, network time per frame and score against NVIDIA's own output:
| 1080p | 1440p | 4K | |
|---|---|---|---|
| Default network | 14.8 ms, 45.47 dB | 25.2 ms, 47.71 dB | 56.1 ms, 49.02 dB |
| int4 mixed | 13.3 ms, 41.92 dB | 22.8 ms, 43.36 dB | 50.8 ms, 43.62 dB |
7 to 10 % less time for 3.5 to 5.4 dB less. At 50 % model resolution at 4K: 13.7 ms instead of 15.0.
How it works here: RDNA3 has an int4 matrix instruction that runs at twice the rate of the int8 and FP16 ones
(249 against 131 to 134 TOPS), but only for 16 values at a time and reading half of an int8 operand. Vulkan has no
int4 matrix type, so the shaders multiply int8 fragments that hold two nibbles each, twice, and the host rewrites
the multiplies in the pipeline binary (VK_KHR_pipeline_binary). The tables are calibrated on the FP8 network,
whose values this build reproduces, so the weights the installer makes from your model are the same ones as on
RDNA4 (same SHA-256, checked at install).
- The installer prints two extra Steam launch options for the Vulkan layer that int4 mixed needs
(VK_ADD_LAYER_PATH,VK_INSTANCE_LAYERS); copy the whole line. Without the layer the game keeps the default
network and the log says why. - Ctrl+F11 in game switches between the two networks; settings are
[Int4Mixed]indlssnr-amd.ini. - The first start takes longer: the rewritten pipelines are built and cached in
dlssnr-amd/int4. - int4 mixed needs the persistent kernels (as on RDNA4) and
VK_KHR_pipeline_binaryon the game's device.