macro_rules! register_fused {
(
$registry:expr,
$id:expr,
$backend:expr,
$dtypes:expr,
$kernel:expr,
cost = $cost:expr,
precision = $precision:expr
$(, caps = $caps:expr)?
$(, revision = $revision:expr)?
$(,)?
) => { ... };
}Expand description
Register a BackendImpl into a FusedKernelRegistry via the
step-6 macro shape. Hides the boilerplate of constructing the
BackendImpl struct so registration sites read as a flat list of
(id, backend, dtypes, kernel, cost, precision) tuples.
Caps default to KernelCaps::empty() and revision to
KernelRevisionHash::UNTRACKED; pass caps = ... and
revision = ... to override.
§Examples
ⓘ
register_fused!(
registry,
FusedOps::FUSED_LINEAR,
BackendId::Cpu,
&[F32, F32, F32, F32],
fused_linear_f32_cpu_wrapper,
cost = cost_fused_linear_cpu,
precision = PrecisionGuarantee::REFERENCE,
);