Backend

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Backend(val id: String, val displayName: String = "", val internal: Boolean = false)(source)

Marks a class as a concrete compute backend implementation of the TensorOps interface. The docs KSP processor uses this to derive the statusByBackend map for each operator automatically, so adding a new backend is one annotation instead of N hand-edits to @InProgress.

Parameters

id

Stable identifier used as a column key in the ops status matrix (e.g. "cpu", "apple", "wasm", "cuda"). Keep it short and lowercase.

displayName

Human-readable label for rendered tables. Defaults to id if left empty.

internal

Marks the backend as internal-only — a shape/dtype sentinel, test double, or profiling stub that should never appear in user-facing docs or coverage matrices. VoidTensorOps is the canonical example: it exists so the KMP build and shape propagation work without a real compute backend, but it has no runtime on any target.

Properties

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
val internal: Boolean = false