pub struct MultiEmitterBackend {
pub target: Target,
pub general: Box<dyn TargetEmitter>,
pub specialist: Option<Box<dyn TargetEmitter>>,
pub quorum_policy: QuorumPolicy,
pub diff_exec_engine: Option<Arc<dyn DiffExecEngine>>,
}Expand description
Multi-emitter backend wrapper. Composes a general emitter
(mandatory) + an optional specialist under a QuorumPolicy.
Implements Backend so it slots into the existing dispatch
without touching TranspileSession.
Fields§
§target: TargetSingle target this multi-emitter backend serves
(e.g., Target::Ptx).
general: Box<dyn TargetEmitter>Mandatory general emitter. Must handle any contract-conforming input as a fallback.
specialist: Option<Box<dyn TargetEmitter>>Optional specialist emitter. Returns None from try_emit
when its shape filter doesn’t match the input.
quorum_policy: QuorumPolicyHow to combine outputs when both emitters fire.
diff_exec_engine: Option<Arc<dyn DiffExecEngine>>PMAT-486: optional DiffExec execution engine. None (the
default) records NotRun { no-engine } under QuorumPolicy:: DiffExec; Some(engine) runs the Runtime-stratum comparison.
Implementations§
Source§impl MultiEmitterBackend
impl MultiEmitterBackend
pub fn new_single(target: Target, general: Box<dyn TargetEmitter>) -> Self
pub fn new_with_specialist( target: Target, general: Box<dyn TargetEmitter>, specialist: Box<dyn TargetEmitter>, quorum_policy: QuorumPolicy, ) -> Self
Sourcepub fn with_diff_exec_engine(self, engine: Arc<dyn DiffExecEngine>) -> Self
pub fn with_diff_exec_engine(self, engine: Arc<dyn DiffExecEngine>) -> Self
PMAT-486: install a DiffExec engine (builder style). The real
CUDA / Vulkan engines (PMAT-488 / PMAT-490) plug in here on the
self-hosted GPU runners; on free CI the engine stays None.