PennyLaneAI / catalyst

A JIT compiler for hybrid quantum programs in PennyLane
https://docs.pennylane.ai/projects/catalyst
Apache License 2.0
142 stars 36 forks source link

Fix MLIR default pipeline #1255

Closed joeycarter closed 3 weeks ago

joeycarter commented 3 weeks ago

Context: There was a bug when running the new catalyst-cli tool without supplying a --catalyst-pipeline argument. In such cases, the tool gets a default pipeline using the getDefaultPipeline() function, which contained an incorrect std::vector initialization resulting in an index-out-of-bounds assertion error. Furthermore, the bug was never picked up because the cli test suite was never registered in the CMake config.

Description of the Change: This change correctly initializes a vector in getDefaultPipeline() to avoid the index-out-of-bounds assert and registers the cli test suite in the CMake config. It also makes an opportunistic typo fix ("pipline" -> "pipeline")

github-actions[bot] commented 3 weeks ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md on your branch with: