Expand description
Host-side module-binary cache and EU-occupancy heuristics.
Compiling SPIR-V to an Intel native binary (the zeModuleCreate JIT) is
expensive. Level Zero lets an application retrieve the compiled native
binary via zeModuleGetNativeBinary and re-create the module from it on a
later run, skipping the JIT. The cache bookkeeping — keying compiled
binaries by a stable hash of the SPIR-V input and build flags, tracking hit
/ miss statistics — is pure host-side logic modelled here by
ModuleBinaryCache.
This module also provides EuOccupancyAdvisor, a tile-size heuristic that
consumes an EU-utilisation fraction (which on hardware comes from sysman
zesDeviceProcessesGetState) and recommends a workgroup size. The heuristic
itself is CPU-testable; only the utilisation reading is device-gated.
Structs§
- EuOccupancy
Advisor - Recommends a workgroup size from an EU-utilisation fraction.
- Module
Binary Cache - An in-memory cache mapping
(SPIR-V, build flags)to compiled native binaries, with hit/miss accounting. - Native
Binary - A compiled Intel native binary retrieved from
zeModuleGetNativeBinary.
Functions§
- spirv_
cache_ key - 64-bit FNV-1a hash over a SPIR-V word stream and its build flags.