embedl_deploy.backend package#
Module contents:
Backend discovery and selection.
- class embedl_deploy.backend.Backend(name: str, conversion_patterns: Sequence[type[Pattern]] = (), fusion_patterns: Sequence[type[Pattern]] = (), state_prep_patterns: Sequence[type[Pattern]] = (), stub_prep_patterns: Sequence[type[Pattern]] = ())[source]#
Bases:
objectA collection of patterns for a specific hardware target.
Each field holds patterns for exactly one
Phase.__post_init__validates that every pattern’s phase matches the field it is assigned to.- conversion_patterns: Sequence[type[Pattern]] = ()#
Structural rewrite patterns, applied iteratively.
- fusion_patterns: Sequence[type[Pattern]] = ()#
Fusion patterns, applied in a single pass after conversions.
- name: str#
Short unique identifier for the backend.
- state_prep_patterns: Sequence[type[Pattern]] = ()#
State-prep patterns, applied sequentially once each.
- stub_prep_patterns: Sequence[type[Pattern]] = ()#
Q/DQ stub surgery patterns, looped to a fixpoint.
- embedl_deploy.backend.discover_backends() list[Backend][source]#
Return all installed backends.
Results are cached after the first call.
- Returns:
List of discovered
Backendinstances.
- embedl_deploy.backend.get_backend() Backend[source]#
Return the active backend, discovering it if necessary.
If no backend has been set via
set_backend(), the installed backends are discovered automatically. When exactly one is found it becomes the active backend.- Returns:
The active
Backend.- Raises:
RuntimeError – If no backends are installed, or if multiple backends are installed and none has been explicitly selected.