neuralqx.experimental.operators.symbolic.compiler.compiler module¶
Symbolic operator compiler orchestrator.
- class SymbolicCompiler(*, pipeline=None, lowerer_registry=None, artifact_store=None, options=None)¶
Bases:
objectOrchestrates the symbolic operator compilation pipeline.
The compiler accepts a symbolic operator (an
AbstractSymbolicOperator), runs it through the registered pass pipeline, optionally resolves a cache hit, and, on a miss, invokes the appropriate lowerer to produce a concreteComputationalJaxOperator.Typical usage:
from neuralqx.experimental.operators.symbolic import SymbolicCompiler compiler = SymbolicCompiler() compiled_op = compiler.compile_operator(my_symbolic_op) xp, mels = compiled_op.get_conn_padded(x_batch)
- Parameters:
pipeline (
SymbolicPassPipeline|None) – Pass pipeline to use. Defaults todefault_symbolic_pass_pipeline().lowerer_registry (
SymbolicLowererRegistry|None) – Lowerer registry. Defaults todefault_symbolic_lowerer_registry().artifact_store (
AbstractSymbolicArtifactStore|None) – Artifact cache store. Defaults to the module-level shareddefault_symbolic_artifact_store().options (
SymbolicCompilerOptions|None) – Compiler options. Defaults toSymbolicCompilerOptionswith all defaults.
- compile_symbolic_operator(operator, *, options=None, metadata=None)¶
Module-level convenience function for one-shot symbolic compilation.
Uses the module-level shared
SymbolicCompilerinstance (lazily created). The shared compiler reuses the global in-process artifact cache.- Parameters:
- Return type:
- Returns:
Executable
ComputationalJaxOperator.
Example:
from neuralqx.experimental.operators.symbolic import compile_symbolic_operator compiled_op = compile_symbolic_operator(my_symbolic_op) xp, mels = compiled_op.get_conn_padded(x_batch)