Skip to main content

Module compiler

Module compiler 

Source
Expand description

Compiler trait, and the compilation caches in front of one. Compilation caching for a runtime: the persistent store and the in-memory cache in front of it. The [Compiler] contract itself lives in cubecl-runtime and is re-exported here.

Structs§

CompilationCache
A server’s in-memory compilation cache: the compiled artifacts it memoizes — pipelines, loaded modules — in front of a persistent compilation_store.
CompilationRecord
One kernel’s trip through a backend’s compilation path, as the environment records it: compiled fresh, or loaded from the compilation store.
CompilationRecording
A compilation being recorded: a backend opens one where its compilation path starts — past its in-memory cache — tells it what the trip goes through, and closes it with how the artifact was obtained. Every call is a no-op when the environment records nothing, and one dropped unclosed, by a trip that failed, records nothing.
KernelCacheKey
Key for an entry in the persistent compilation cache.

Enums§

CompilationError
JIT compilation error.
CompilationOutcome
How a backend obtained a kernel’s artifact.

Traits§

Compiler
Compiles the representation into its own representation that can be formatted into tokens.

Functions§

build_id_hash
Pre-hashed build ID
compilation_store
A store for backend’s compiled artifacts, or None when compilation caching is disabled or the target has nowhere durable to put them.
store_compiled
Stores a freshly compiled artifact, logging rather than failing, and says whether the store took it.

Type Aliases§

BuildId
Platform-specific build identifier, changes on rebuild