Skip to main content

Module dialect_dispatch

Module dialect_dispatch 

Source
Expand description

Registry-driven dispatch entry point (B-B4).

Routes an op id through the global DialectRegistry and invokes the registered cpu_ref function. Complements the execution-tree evaluators by giving external dialect crates a zero-patch path to run on the reference interpreter. Dispatch entry point that routes through the DialectRegistry.

B-B4 routes CPU reference calls through the dialect registry. The execution tree keeps the direct fast path for built-ins while this module provides the extensible dispatch contract that cross-backend comparison, demos, and third-party dialect crates consume.

The registry-driven path gives one concrete benefit: external dialect crates can inventory::submit! an OpDef (vyre_driver::OpDef) with an executable cpu_ref function, and the reference interpreter immediately knows how to run it — no patch to vyre-reference required.

The BackendRegistration exported below makes the capability layer aware of the reference backend so Programs that reference unsupported dialects surface a clean Unsupported error instead of panicking at dispatch time.

Constants§

REFERENCE_BACKEND_NAME
Capabilities advertised by the reference backend.

Functions§

dispatch_op
Run a single op against its registered CPU reference.