Runtime README: a compute buffer argument's checked address access, against a native build's bound buffer
A known gap of pipeline states: a compute function's buffer argument is reached at its device address with its non-constant accesses checked in the shader, where a native Vulkan program binds the buffer and the device's range check applies. The entry gives the price as our kernel's GPU time over a native Vulkan build of the same kernel (a particle kernel, two convolutions), what a build that bound the arguments under robust buffer access 2 ran them at, and why buffers are not bound: a descriptor set per dispatch lost GPU time on the Iris Xe's recorded streams and on dependent dispatch chains on the Radeon cards, and a table of descriptors indexed by a pushed word moves the range check into the shader on the Iris Xe's driver. The Iris Xe's convolution and copy gap at equal shape did not move when the buffers were bound, so it is not this gap's. Every figure was read again from its job's log before it was written: particle kernel jobs m3-max-74926 (Radeon 780M), 74927 (RX 7900 XTX), 74928 (Iris Xe), 74929 (RTX 3090); convolutions m3-max-74957, 74959, 74960; Iris Xe at equal shape m3-max-75079; the bound build m3-max-75061 to 75064; descriptor set per dispatch m3-max-75119, 75120 (dispatch chain) and m3-max-75124, 75128, 75132 (Iris Xe streams). The table's form is from Mesa 26.2.6's ANV source, not run. Docs only: no Rust or Cargo input changes, and the README is not included in any crate's rustdoc.
This commit is contained in:
1 parent
c6518caf3b
commit
da7577de03
1 file changed
+27
@@ -3600,6 +3600,33 @@ cache is answered compile-required on both.
|
||||
runs a relaxed form of the kernel, whose accesses of that buffer claim 4-byte alignment. A
|
||||
build that took that form for every such argument, bound so or not, ran the harness's four
|
||||
`constant_*` rows on an RTX 3090 in 234-252 us against 99-122 us (job 74651).
|
||||
- A compute function's buffer argument is reached at its device address, with its accesses at an
|
||||
offset that is not a constant checked in the shader (Compute encoders, above), where a native
|
||||
Vulkan program binds the buffer as a storage buffer and the device's own range check applies.
|
||||
Our kernel's GPU time over a native Vulkan build of the same kernel on the same device
|
||||
(device-local buffers, release, two runs each):
|
||||
- a particle kernel whose inner loop makes one 8-byte load: 1.15x on an RTX 3090 (job
|
||||
m3-max-74929), 1.35x on an RX 7900 XTX (m3-max-74927), 1.37x on an Iris Xe (m3-max-74928) and
|
||||
1.48x-1.50x on a Radeon 780M (m3-max-74926);
|
||||
- a vertical and a horizontal convolution: 1.86x-2.02x and 1.83x on the RTX 3090
|
||||
(m3-max-74960), 1.23x-1.28x and 1.22x on the RX 7900 XTX (m3-max-74959), 1.05x and 1.11x on
|
||||
the Radeon 780M (m3-max-74957).
|
||||
|
||||
A build that bound those arguments as storage buffers under the pipeline's robust buffer access
|
||||
2 ran the particle kernel at 1.01x-1.02x of the native build on the 780M, 1.02x-1.03x on the RX
|
||||
7900 XTX, 1.05x on the RTX 3090 and 1.09x on the Iris Xe (m3-max-75062, m3-max-75063,
|
||||
m3-max-75064, m3-max-75061), so that much of the difference is the address form's. Buffers are
|
||||
not bound because each way of binding them loses on a device: a descriptor set written for a
|
||||
dispatch's buffers took 6.0% to 7.9% more GPU time a frame on the Iris Xe over two recorded
|
||||
streams (m3-max-75124, m3-max-75128, m3-max-75132) and 25% to 29% more on a chain of dependent
|
||||
dispatches on the 780M and the RX 7900 XTX (m3-max-75120, m3-max-75119); and a table of every
|
||||
buffer's descriptor, indexed by a pushed word, is reached on the Iris Xe under Mesa 26.2.6's ANV
|
||||
by an address with the range check in the shader, one bounded load for each component, by that
|
||||
driver's source, where the address form makes one load. On the Iris Xe the vertical and
|
||||
horizontal convolutions and a copy kernel take 1.38x, 1.38x and 1.61x of the native build at the
|
||||
same threadgroup shape (m3-max-75079), and the build that bound their buffers ran them in the
|
||||
same time (m3-max-75061): that difference is not the address form's, and its cause is not
|
||||
found.
|
||||
- A driver's create of a state's main pipeline can fail after the state has answered, where Metal
|
||||
compiles the state before it answers and a program never meets a state it was given that cannot
|
||||
run. Vulkan lets `vkCreateComputePipelines` and `vkCreateGraphicsPipelines` fail with
|
||||
|
||||
Reference in new issue
Block a user