Skip to content

SpawnDev.ILGPU 5.4.0

Latest

Choose a tag to compare

@LostBeard LostBeard released this 21 Oct 01:04

SpawnDev.ILGPU 5.4.0

Headline: Velocity, the SIMD CPU backend, is now a complete backend and the default CPU backend.

Velocity compiles kernels like the GPU backends (vectorized IL over Vector128<T>) and runs them on all cores. The plain CPU accelerator is ILGPU's debugging backend.

Behavior change

AllAccelerators() and AllAcceleratorsAsync() register Velocity instead of the plain CPU accelerator on desktop and server.

  • Register the plain CPU explicitly where you need it: builder.DefaultCPU() or builder.CPU(). GetCPUDevice(0) on a default context now fails.
  • 32-bit processes keep the plain CPU accelerator. In the browser no CPU accelerator is registered.
  • A context with nothing registered still falls back to the default CPU device.
  • GetBestDevice() ranks Velocity below the GPU backends and above the plain CPU.

Velocity

  • Runs all 731 tests of the shared suite (pass or capability skip).
  • Half, BFloat16, FP8, FP4 and packed 4-bit types, loads and stores.
  • 1D, 2D and 3D grids and groups, groups of up to 256 threads, shared memory, fast barriers, atomics, warp shuffles, ILGPU.Algorithms.
  • New Vector256 (8 lanes) and Vector512 (16 lanes) device types. Vector128 stays the default.
  • Measured on one PC: LayerNorm 411 ms on the CPU backend, 0.69 ms on Velocity. An at-scale scan 131 s, 1 s.

Fixes

  • MathF.Truncate and Math.Truncate work on every compiled backend without ILGPU.Algorithms.
  • Velocity: shared memory of one-warp groups was exhausted after about 16000 groups (access violation).
  • XMath.RoundToEven, RoundAwayFromZero and IEEERemainder returned 0 on Velocity.
  • Velocity buffers are zeroed like on every other backend.

Verification

Full PMT sweep before the release: 5563 passed, 0 failed, 478 skipped.

Details: CHANGELOG, Docs/velocity.md. Packages: SpawnDev.ILGPU 5.4.0, SpawnDev.ILGPU.Fork 2.4.0, SpawnDev.ILGPU.Algorithms.Fork 2.4.0.