Skip to content

[triton-ext] Export triton+LLVM/MLIR symbols from triton-opt for use by plugin#9550

Open
plotfi wants to merge 2 commits into
triton-lang:mainfrom
plotfi:plotfi-triton-opt-ext
Open

[triton-ext] Export triton+LLVM/MLIR symbols from triton-opt for use by plugin#9550
plotfi wants to merge 2 commits into
triton-lang:mainfrom
plotfi:plotfi-triton-opt-ext

Conversation

@plotfi
Copy link
Copy Markdown
Contributor

@plotfi plotfi commented Feb 24, 2026

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.

This sits atop @neildhar's PR to fix libtriton.so's linkage (#9549).

This PR makes it so that triton-opt with extensions and the lit tests for extensions can work without LLVM SHARED builds; it does this by allowing triton-opt to export symbols thereby being the source of libtriton itself. The only conundrum is that the plugins are linked against libtriton.so, and which of course is handled by the fake libtriton in this PR mentioned above.

Comment thread bin/triton-opt.cpp Outdated
@plotfi
Copy link
Copy Markdown
Contributor Author

plotfi commented Feb 27, 2026

Ready for review, will land only when #9549 is also landed.

@plotfi plotfi force-pushed the plotfi-triton-opt-ext branch from f2d11c2 to a35dc2a Compare February 27, 2026 22:41
@CRobeck
Copy link
Copy Markdown
Contributor

CRobeck commented Mar 4, 2026

This change only applies to triton-opt right? We still need LLVM shared libs for Python executed files that right?

@plotfi
Copy link
Copy Markdown
Contributor Author

plotfi commented Mar 4, 2026

This change only applies to triton-opt right? We still need LLVM shared libs for Python executed files that right?

#9549 resolves this, and should land first. #9550 adds a similar fix for triton-opt.

together they drop the shared libs requirement entirely

@CRobeck
Copy link
Copy Markdown
Contributor

CRobeck commented Mar 4, 2026

OK. Can we also update the README then? Test to make sure the examples still work and remove the export LLVM_BUILD_SHARED_LIBS=1; lines.

@plotfi
Copy link
Copy Markdown
Contributor Author

plotfi commented Mar 4, 2026

OK. Can we also update the README then? Test to make sure the examples still work and remove the export LLVM_BUILD_SHARED_LIBS=1; lines.

Yeah, once this all lands. I can make the readme update in this PR. Do you want that?

plotfi added 2 commits March 11, 2026 19:16
…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
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