[hal] Add ObjectLike trait to hal.executable.source#23958
Open
jtuyls wants to merge 1 commit intoiree-org:mainfrom
Open
[hal] Add ObjectLike trait to hal.executable.source#23958jtuyls wants to merge 1 commit intoiree-org:mainfrom
jtuyls wants to merge 1 commit intoiree-org:mainfrom
Conversation
f88f427 to
d64222a
Compare
Every other executable op in the pipeline (flow.executable, stream.executable, hal.executable) has ObjectLike. `hal.executable.source` satisfies the same requirements — symbol table, isolated from above, only referenced by symbol — but was missing the trait. This matters for iree-link: when linking input-level MLIR modules that use extern dispatch, hal.executable.source ops are transitive symbol dependencies of the linked functions (referenced via `flow.dispatch @name::@export`). Without ObjectLike, the linker's symbol indexing skips them (LinkModules.cpp filters IsolatedFromAbove ops that aren't ObjectLike or FunctionOpInterface), causing silent "unresolved external symbol" errors. All 10 ObjectLike consumers in the compiler handle hal.executable.source correctly: analysis passes (affinity, device, async copy) skip it, DeduplicateExecutables can deduplicate it, and MaterializeInterfaces already processes it explicitly by type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jorn <jorn.tuyls@gmail.com>
d64222a to
6a4d8bc
Compare
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.
Every other executable op in the pipeline (flow.executable, stream.executable, hal.executable) has ObjectLike.
hal.executable.sourceseems to satisfy the same requirements: symbol table, isolated from above, only referenced by symbol.This PR adds the trait as it matters for iree-link: when linking input-level MLIR modules that use extern dispatch, hal.executable.source ops are transitive symbol dependencies of the linked functions (referenced via
flow.dispatch @name::@export). Without ObjectLike, the linker's symbol indexing skips them (LinkModules.cpp filters IsolatedFromAbove ops that aren't ObjectLike or FunctionOpInterface), causing silent "unresolved external symbol" errors.All 10 ObjectLike consumers in the compiler handle hal.executable.source correctly: analysis passes (affinity, device, async copy) skip it, DeduplicateExecutables can deduplicate it, and MaterializeInterfaces already processes it explicitly by type.