Skip to content

Conversation

@mudit2812
Copy link
Contributor

@mudit2812 mudit2812 commented Dec 22, 2025

Context:
Currently, trying to apply xDSL passes using @catalyst.apply_pass("my-pass") or @qml.transform(pass_name="my-pass") doesn't work for the passes in catalyst.python_interface.transforms because their files do not get collected unless something from that module is imported. This PR makes sure that the global xDSL pass registry is up-to-date before QJIT workflows are lowered to MLIR.

Description of the Change:

  • Import XDSL_UNIVERSE when lowering transforms programs to transform.named_sequence. The XDSL_UNIVERSE is a data structure that collects all dialects and transforms into a single entry point. This makes sure that the transforms get imported, and consequently, registered.
  • While fixing this change, I realized that the filecheck tests for the unified compiler were not executing at all. So, this PR also updates requirements.txt to install filecheck
  • Additionally, this caused new test failures to be detected, which are resolved too.

Benefits:

Possible Drawbacks:

  • This only works for transforms that are present in catalyst/python_interface/transforms/__init__.py. But, there are probably not any other cases in which we would want to use a transform that has not been directly or indirectly imported.

Related GitHub Issues:

[sc-106692]

@mudit2812 mudit2812 added the unified compiler Pull requests for the integration with xDSL label Dec 22, 2025
@mudit2812 mudit2812 marked this pull request as ready for review December 23, 2025 16:28
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.10%. Comparing base (cb54fa4) to head (3a8a55f).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2322      +/-   ##
==========================================
- Coverage   97.28%   97.10%   -0.18%     
==========================================
  Files         107      107              
  Lines       12946    12947       +1     
  Branches     1076     1076              
==========================================
- Hits        12594    12572      -22     
- Misses        290      308      +18     
- Partials       62       67       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@sengthai sengthai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks @mudit2812

@dime10 dime10 merged commit ac2c383 into main Dec 29, 2025
39 checks passed
@dime10 dime10 deleted the xdsl-pass-visibility branch December 29, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unified compiler Pull requests for the integration with xDSL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants