Skip to content

[triton-ext] Drop LLVM_BUILD_SHARED_LIBS, enable libtriton visibility through TRITON_EXT_ENABLED#9783

Merged
CRobeck merged 30 commits into
triton-lang:mainfrom
plotfi:plotfi-neils-shared-cleanup
Mar 24, 2026
Merged

[triton-ext] Drop LLVM_BUILD_SHARED_LIBS, enable libtriton visibility through TRITON_EXT_ENABLED#9783
CRobeck merged 30 commits into
triton-lang:mainfrom
plotfi:plotfi-neils-shared-cleanup

Conversation

@plotfi
Copy link
Copy Markdown
Contributor

@plotfi plotfi commented Mar 20, 2026

This PR pulls from @neildhar's work on #9549 (exposes libtriton.so symbols for plugin extensions) and my own triton-opt exposure PR #9550 (exposes symbols, and does a trick to load a fake libtriton).

This PR adds a build flag to control if we enable all of this, and if we build any of the example plugins and run the plugin extension testing using TRITON_EXT_ENABLED; this PR also drops LLVM shared builds because they are no longer needed.

Co-Authored w/ @neildhar

@plotfi plotfi marked this pull request as ready for review March 20, 2026 03:09
@plotfi plotfi requested a review from ptillet as a code owner March 20, 2026 03:09
@plotfi
Copy link
Copy Markdown
Contributor Author

plotfi commented Mar 20, 2026

@ThomasRaoux @neildhar jFYI

Copy link
Copy Markdown
Collaborator

@neildhar neildhar left a comment

Choose a reason for hiding this comment

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

Just some comments on the details, but makes sense to me overall.

Comment thread bin/CMakeLists.txt Outdated
Comment thread bin/triton-opt.cpp Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread examples/plugins/FakeLibTriton/CMakeLists.txt Outdated
@plotfi plotfi requested a review from lezcano as a code owner March 20, 2026 06:46
Comment thread test/CMakeLists.txt
Comment thread CMakeLists.txt Outdated
Comment thread bin/CMakeLists.txt Outdated
Comment thread examples/plugins/FakeLibTriton/CMakeLists.txt Outdated
@neildhar
Copy link
Copy Markdown
Collaborator

Looks good from my side, but I'll let @ThomasRaoux approve

@plotfi plotfi force-pushed the plotfi-neils-shared-cleanup branch from 236e521 to 462e844 Compare March 23, 2026 19:02
Copy link
Copy Markdown
Collaborator

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

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

I think that's reasonable although I'm still confused about the triton-opt-ext story

Comment thread examples/plugins/triton-ext-cli/triton-ext-cli.cpp Outdated
Comment thread CMakeLists.txt Outdated
Comment thread lib/Tools/PluginUtils.cpp
Copy link
Copy Markdown
Collaborator

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

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

LGTM, one last question

Comment thread CMakeLists.txt
Copy link
Copy Markdown
Collaborator

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

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

LGTM unless there is any more comments from @neildhar

neildhar and others added 17 commits March 24, 2026 13:18
…ITON_EXT_ENABLED), remove LLVM_BUILD_SHARED_LIBS shared builds option
…by plugin

Also, provide a fake libtriton.so as a LD_PRELOAD for plugin tests for
now, until we can find another solution. This is because plugins are
linked against libtriton.so.

add fake plugin

(cherry picked from commit eb094d7)
Co-authored-by: neildhar <neildhar@users.noreply.github.com>
Co-authored-by: neildhar <neildhar@users.noreply.github.com>
(cherry picked from commit e78e393c12f645e3ea4a7ed589f105acc372bb5c)
@plotfi plotfi force-pushed the plotfi-neils-shared-cleanup branch from e2dc92e to 1c9c6f9 Compare March 24, 2026 20:18
@CRobeck CRobeck merged commit 6cb8445 into triton-lang:main Mar 24, 2026
9 checks passed
jvican pushed a commit to jvican/triton that referenced this pull request Mar 27, 2026
plotfi added a commit to plotfi/triton that referenced this pull request Apr 8, 2026
… through TRITON_EXT_ENABLED (triton-lang#9783)

(cherry picked from commit 6cb8445)
plotfi added a commit to plotfi/triton that referenced this pull request Apr 8, 2026
… through TRITON_EXT_ENABLED (triton-lang#9783)

(cherry picked from commit 6cb8445)
(cherry picked from commit d9f8bb9)
@plotfi plotfi mentioned this pull request Apr 8, 2026
atalman pushed a commit that referenced this pull request Apr 10, 2026
[triton-ext] Update plugin extension changes for release 3.7.x

cherry-picking the following plugin extension changes since January:

- **[triton-ext] Fix garbage string in reported errors (#9687)**
- **[triton-ext] add string arguments to addPass API (#9691)**
- **[triton-ext][FrontEnd] Custom DSL Plugin Ops (#9626)**
- **[triton-ext] Drop LLVM_BUILD_SHARED_LIBS, enable libtriton
visibility through TRITON_EXT_ENABLED (#9783)**
- **[triton-ext] Pass a single `PluginInfo *` pointer (#9748)**
- **[triton-ext] plugin extension's version check (#9937)**

---------

Co-authored-by: Andrew Brown <andrew@kernelize.ai>
Co-authored-by: Corbin Robeck <robeck@meta.com>
plognjen pushed a commit to plognjen/triton that referenced this pull request Apr 14, 2026
quinnlp added a commit to intel/intel-xpu-backend-for-triton that referenced this pull request May 4, 2026
This reverts commit 006159c.

We do not need this patch anymore because
triton-lang/triton#9783 introduced a similar
build option (`TRITON_EXT_ENABLED`), which is OFF by default.
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