Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autograph with make plxpr #6645

Merged
merged 105 commits into from
Dec 5, 2024
Merged

Autograph with make plxpr #6645

merged 105 commits into from
Dec 5, 2024

Conversation

lillian542
Copy link
Contributor

@lillian542 lillian542 commented Nov 27, 2024

Context:

We have autograph functionality that allows us to convert user code with Python control flow to something PL-compatible, but it's not integrated in make_plxpr.

Also something happened with the changelog organization and things ended up under Qubit Mixed Device API and Dynamic Lie algebra that didn't belong there, so I shuffled things around.

Description of the Change:

We add this to make_plxpr. By default, autograph will be run on all functions.

A few tests that were using mocker.spy had to be updated, because now make_jaxpr is called with an 'unknown' argument (the function that comes out of run_autograph), so we can't spy on its calls the same way we were.

[sc-71823]

@lillian542 lillian542 marked this pull request as draft December 4, 2024 15:53
@lillian542 lillian542 marked this pull request as ready for review December 4, 2024 21:13
@JerryChen97 JerryChen97 self-requested a review December 4, 2024 21:48
Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

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

Thanks! Looks straightforward and good to me. Left some docstr suggestions

tests/capture/test_make_plxpr.py Outdated Show resolved Hide resolved
tests/capture/test_make_plxpr.py Outdated Show resolved Hide resolved
tests/capture/test_make_plxpr.py Outdated Show resolved Hide resolved
@mudit2812 mudit2812 requested a review from albi3ro December 5, 2024 16:17
@lillian542 lillian542 enabled auto-merge (squash) December 5, 2024 18:46
@lillian542 lillian542 merged commit fa63372 into master Dec 5, 2024
46 checks passed
@lillian542 lillian542 deleted the autograph_with_make_plxpr branch December 5, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants