Skip to content

feature: Add interface for plugin pass - #496

Merged
ZwFink merged 12 commits into
mainfrom
feature/bowen/support-plugin-pass-jit
Jul 8, 2026
Merged

feature: Add interface for plugin pass#496
ZwFink merged 12 commits into
mainfrom
feature/bowen/support-plugin-pass-jit

Conversation

@johnbowen42

Copy link
Copy Markdown
Collaborator

We want our lambda interface to be compatible with Enzyme. Towards this end, this PR adds an option to run a user-supplied plugin pass as part of the optimization pipeline at JIT optimization time

@johnbowen42

Copy link
Copy Markdown
Collaborator Author

@jandrej this PR is the first step in towards solving compatibility between Proteus and Enzyme

@johnbowen42 johnbowen42 changed the title draft: Add interface for plugin pass feature: Add interface for plugin pass May 27, 2026
@johnbowen42
johnbowen42 marked this pull request as ready for review May 27, 2026 23:23
@ZwFink

ZwFink commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Why only for serial codegen?

@ZwFink ZwFink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice changes! I have a couple small issues

Comment thread src/runtime/JITPassPluginRegistry.cpp Outdated
Comment thread src/runtime/JITPassPluginRegistry.cpp
Comment thread src/include/proteus/impl/CoreLLVM.h
Comment thread src/runtime/JITPassPluginRegistry.cpp
@johnbowen42

johnbowen42 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Why only for serial codegen?

@ZwFink We only ever call optimizeIR if CodegenOption::Serial is set:

optimizeIR(M, DeviceArch, OptConfig);

@ggeorgakoudis

Copy link
Copy Markdown
Collaborator

LGTM, but I'll delegate acceptance to @ZwFink, who has a more recent view of the codebase. I see some trivial issues with tests (linter and matrix was probably down)

Does it solve the issue with including the enzyme plugin?

@ZwFink
ZwFink force-pushed the feature/bowen/support-plugin-pass-jit branch from d538cd1 to 827ea0e Compare July 1, 2026 21:58
@ZwFink
ZwFink force-pushed the feature/bowen/support-plugin-pass-jit branch from 335c3f5 to c0c8db9 Compare July 7, 2026 16:14
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.57009% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/runtime/JITPassPluginRegistry.cpp 73.33% 12 Missing ⚠️
src/include/proteus/impl/CoreLLVM.h 80.95% 8 Missing ⚠️
src/include/proteus/impl/CoreLLVMHIP.h 50.00% 3 Missing ⚠️
src/runtime/Init.cpp 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ZwFink
ZwFink force-pushed the feature/bowen/support-plugin-pass-jit branch from c0c8db9 to 0c893a0 Compare July 8, 2026 16:49
@ZwFink
ZwFink merged commit a6292b6 into main Jul 8, 2026
68 checks passed
@ZwFink
ZwFink deleted the feature/bowen/support-plugin-pass-jit branch July 8, 2026 20:37
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.

3 participants