Files
reims-vgpu/scripts/internal/lane-gate/gpuload.comp
T
Anees Iqbal f1239a5563 🆕 Measure beside a fixed GPU load (--load)
Numbers from a shared boot carry the other VMs' unknown load, and a
regression that shows only under contention (a slow or missed wake) needs a
load that is the same each time. gpuload, a headless Vulkan compute loop built
on the lane host, keeps the GPU busy a fixed share of every 10 ms; the bench
boot starts it by its pid before the guest's run and stops it after the drags,
and records the duty it reached. --bench-phases picks the bench boot's
phases. Each boot also records the host's load average beside its
measurements: other work's CPU and memory use, which the GPU lock does not
cover, moves the numbers of the Vulkan platform's imported host RAM.
2026-11-05 21:59:27 -08:00

17 lines
467 B
Plaintext

#version 450
// gpuload's dispatch (gpuload.c): ITERS dependent FMAs a thread, the result stored so the loop stays.
layout(local_size_x = 256) in;
layout(push_constant) uniform Push { uint iters; } p;
layout(std430, binding = 0) buffer Out { float v[]; } o;
void main()
{
uint i = gl_GlobalInvocationID.x;
float x = float(i) * 1e-6, y = 1.0;
for (uint k = 0u; k < p.iters; k++) {
x = fma(x, 1.000001, 0.5);
y = fma(y, x, -0.25);
}
o.v[i & 1023u] = x + y;
}