Move python/src/ir.h to triton/Tools/OpBuilder.h#9826
Closed
abrown wants to merge 1 commit into
Closed
Conversation
Using `python/src/ir.h` in `PluginUtils.h` causes build failures for plugins (e.g., this triton-ext [failure]) because those headers are not included in the C++ artifact package plugins build against (introduced in triton-lang#9534). And they should not be: the C++ source in the `python` directory is used for building the Python-interfacing library. This change fixes all of that by moving the header-defined `TritonOpBuilder` class to the `include` directory. [failure]: https://github.com/triton-lang/triton-ext/actions/runs/23460115506/job/68259370483#step:12:86
ThomasRaoux
reviewed
Mar 24, 2026
Collaborator
ThomasRaoux
left a comment
There was a problem hiding this comment.
I think this is worse in term of code organization.
Contributor
Author
|
Is there a better place? |
Contributor
Author
|
Superseded by #9847. |
peterbell10
pushed a commit
that referenced
this pull request
Apr 24, 2026
#9626 added a way to construct custom ops by depending on `python/src/ir.h`, a header not present in the installation artifacts (#9534) used for building plugins in [triton-ext](https://github.com/triton-lang/triton-ext). If we don't want to move this header to a directory already packaged up by CMake (#9826), we could additionally package up the headers in the `python` directory instead: this change does exactly that. In doing so, it also exposed another problem in how we package up these installation artifacts. We currently only package up files ending in `*.h`, so `Dump.hpp` and `GetEnv.hpp` were not included. To fix this, this change renames these files to `Dump.h` and `GetEnv.h` which seems more in line with the rest of the project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
python/src/ir.hinPluginUtils.hcauses build failures for plugins (e.g., this triton-ext failure) because those headers are not included in the C++ artifact package plugins build against (introduced in #9534). And they should not be: the C++ source in thepythondirectory is used for building the Python-interfacing library. This change fixes all of that by moving the header-definedTritonOpBuilderclass to theincludedirectory.