HECer · version 1.0 · November 2026
LLVM
Vulkan
Portable compute for selected compiler calculations.
A C++ compute library and real LLVM optimization passes.
Defined scope. Reproducible evidence. No CUDA dependency.
Hermann Fischer / HECer · Apache-2.0 WITH LLVM-exception
AI-assisted presentation and vector design. Not an official LLVM or Khronos project.
What the project delivers
LLVM passes
Standalone compute API
Folding, reachability, dense dominators, gen/kill liveness, unsigned scan, key sorting and record hashing.
The standalone primitives do not replace LLVM’s register allocator, linker or native DominatorTree.
How a request runs
Own and mutate IR
Bound memory and dispatch
Converge → read back
LLVM retains semantic authority.
CPU references and independent LLVM oracles check the accepted subset. Unsupported instructions remain for upstream passes.
Portable Vulkan by capability
Wide folding requires shaderInt64. Physical RTX 5090 and software lavapipe are tested; physical AMD/Intel validation remains open.
First optimization iteration
Pooled buffers, persistent mappings, combined submissions, subgroup scan, radix sort and local graph solvers.
| Warm API time, ms | Original Vulkan | Iteration 1 | Speedup |
|---|---|---|---|
| Integer fold · 32-bit | 9.819 | 6.501 | 1.51× |
| Exclusive scan | 6.650 | 2.571 | 2.59× |
| Sort keys | 7.500 | 2.785 | 2.69× |
1,048,576 array elements · 27 warm samples per side · Earlier Vulkan versus optimized Vulkan, not CPU versus GPU.
Iteration-one evidence
Second optimization iteration
Small components converge locally around one oversized component. Per-round flags and adaptive batching reduce host polling.
Isolated batching reduced submissions from 257 to 36, yielding a 4.15× API speedup in that measured case.
Mixed components add one 2,048-node star or chain. Ratios compare iteration 1 with iteration 2. The isolated batching baseline already includes mixed execution and per-round flags.
All changes, discarded variants and counter evidence
Fresh CPU versus GPU
| 1,048,576 elements | CPU ms | GPU ms | CPU / GPU |
|---|---|---|---|
| Integer fold · 32-bit | 12.657 | 4.166 | 3.04× |
| Integer fold · 64-bit | 16.178 | 7.103 | 2.28× |
| Exclusive scan | 1.280 | 1.469 | 0.87× |
| Sort keys | 55.964 | 1.666 | 33.59× |
| Hash records | 3.330 | 2.646 | 1.26× |
Ratios above one favor GPU. Ryzen 9 5950X single-threaded project reference; sorting uses std::sort. RTX 5090 includes transfers/readback. 55 warm samples per side; every output checked. Not a comparison with upstream LLVM or a parallel CPU library.
All 37 rows and measurement boundaries
Where the CPU still wins
The CPU is faster on the tested long-chain mixed graph.
CPU: 0.0642 ms
GPU: 9.7100 ms
The CPU uses a work list. Vulkan still spends substantial work on convergence rounds.
CPU also wins every 1,024-element workload and scan at every measured size.
An improvement over earlier Vulkan does not imply a win over CPU. Work-efficient GPU frontiers and measured offload decisions remain future work.
Validation that can be rerun
Reproduction instructions · Validation records and remaining limits
The version 1.0 contract
Remaining engineering work
These are unimplemented follow-ups, not features or measured gains of version 1.0. Frontends, code generation, register allocation and linking remain upstream.
Build. Verify. Measure.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ -DLV_BUILD_LLVM_PLUGIN=OFF cmake --build build --config Release ctest --test-dir build -C Release --output-on-failure cmake --install build --config Release --prefix install
Explore the interactive benchmark graphs →
Build the LLVM plugin separately against the exact host installation. Measure complete compiler processes before deciding to offload.
github.com/HECer/llvm-vulkan · Release guide
Apache-2.0 WITH LLVM-exception · AI-assisted development, presentation and vector assets.
← / → navigate · Home / End jump · Browser print exports the full deck · Works offline