qat.frontend.builder module
- class BuilderFrontend(model, pipeline=None)
Bases:
BaseFrontendAllows a
PurrInstructionBuilderto be used as an input to the compiler.Parses the
PurrInstructionBuilderinto aInstructionBuildercontaining QAT IR instructions, and then runs a pipeline to sanitise the IR.- Parameters:
model¶ (
PhysicalHardwareModel) – The hardware model is used to validate that the instruction builder is compatible with the target hardware.
- check_and_return_source(src)
Checks that the source is a
PurrInstructionBuilderand returns it.- Return type:
bool|InstructionBuilder
- emit(src, res_mgr, met_mgr, *args, **kwargs)
Parses the PuRR instruction builder and returns it as QAT IR.
- Parameters:
src¶ (
InstructionBuilder) – The source instruction builder to parse. Must be aPurrInstructionBuilder.- Return type: