Abenezer Belachew
About me
A note from the desk
Projects
Things I’ve built
GPU compute pipeline
12.4 TFLOPS
STEP 1
STEP 2
STEP 3
STEP 4
WORKLOAD
All
FP16
FP32
INT8
WGSL
KERNELS · 3 PASSES · 8.4 GB VRAM
Culling
Prefix sum
Indirect
GPU TIMELINE · 16.6MS WINDOW
BACKENDS
Vulkan
Metal
DirectX 12
NVIDIA RTX
AMD RDNA
Intel Arc
FRAME SUMMARY
Deferred compute
FRAME TIME
6.42ms
GPU BUSY
91%
BANDWIDTH
412GB/s
DISPATCHES
184
Capture trace
gpu-runtime/src/scan.rs
01
use wgpu::util::DeviceExt;
02
use crate::gpu::{Buffer, Kernel};
03
04
const WORKGROUP_SIZE: u32 = 256;
05
pub struct PrefixScan {
06
pipeline: wgpu::ComputePipeline,
07
scratch: wgpu::Buffer,
08
}
09
10
impl PrefixScan {
11
pub fn dispatch(&self, pass: &mut wgpu::ComputePass) {
12
pass.set_pipeline(&self.pipeline);
13
14
let groups = self.len.div_ceil(WORKGROUP_SIZE);
15
pass.dispatch_workgroups(groups, 1, 1);
16
}
17
}
gpu runtime
$ cargo run --release
wgpu-hal: Vulkan 1.3
adapter: NVIDIA RTX 4090
queue family: compute + graphics
pipeline cache: 14 hits
frame 0842: 6.42ms
validation: clean
test runner
$ cargo nextest run
profile: release + gpu-validation
✓ prefix_scan_1m 4.8ms
✓ radix_sort_4m 7.1ms
✓ indirect_cull 1.9ms
18 tests passed
0 validation errors
0:editor
1:runtime
2:tests
3:git
main* 22:48
Writing
Essays, notes, links, and small lessons
Bookshelf
Reading and notes