Shapeshifter Community Passes

Shapeshifter Community Passes#

Community-contributed Shapeshifter passes extend the graph-transformation capabilities of Shapeshifter beyond the core passes. They live in quark/contrib/shapeshifter_community_passes/ and use the same registration system, discovery mechanism, and implementation contract as core passes — the only difference is where they live and who maintains them.

Note

Community passes are a contrib area contribution. They are not officially supported by the Quark Core Team and are maintained by their original authors. See Quark’s contrib Area for the contrib policies.

Authoring a Community Pass#

Follow the same implementation requirements as core passes (subclass ONNXPass or PytorchPass, apply the @register_pass decorator, and implement _default_config() and _run_for_config()) — see Adding New Passes for the full contract and examples. The differences for a community pass are:

  • Location: place the pass file in quark/contrib/shapeshifter_community_passes/ instead of quark/shapeshifter/passes/. It is automatically discovered and registered to the same global registry as core passes.

  • Tests: add your tests to quark/contrib/shapeshifter_community_passes/test/.

  • Documentation: document your pass on the matching page below, depending on whether it transforms ONNX or PyTorch models.