Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@benvanik
Copy link
Collaborator

This introduces the foundational interfaces and attributes needed for timeline-aware scheduling of asynchronous operations that span module boundaries.

Of primary interest is the CallAnnotationAttrInterface + AttributeCallGraphPass. These two allow us to synchronize call site information with their callees to allow for local patterns/optimizations to operate without worrying about the globals. This gives us more tightly scoped (and parallelizable) passes in cases where previously they were just at the higher level to avoid hazards. A new
IREE::HAL::ABIConventionAttr implements the interface to give us automatic propagation and then later typed retrieval without leaking the input-level iree.abi.* ops as string values any lower. For now it just implements the two modes we support (synchronous and coarse-fences) but in the future can be used to provide per operand/result mapping to fences.

The HAL ABI convention attr is used to service the new
IREE::Stream::TimelineAwareOpInterface interface in order to allow for Stream transforms to detect calls to external HAL functions in a generic way. We can also use this for custom ops that behave like Stream ops.

No passes are updated to use timeline-aware ops yet as they have... bugs. Future changes will rework/improve the passes and integrate this behavior using the interfaces/attrs added here.

Part of #16168 PR sequence (2/6).

@benvanik benvanik added the compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) label Oct 22, 2025
@benvanik benvanik force-pushed the users/benvanik/16168-2 branch from fda1823 to 0712043 Compare October 22, 2025 21:44
Base automatically changed from users/benvanik/16168-1 to main October 24, 2025 03:08
@benvanik benvanik requested a review from AWoloszyn October 30, 2025 16:08
@benvanik benvanik force-pushed the users/benvanik/16168-2 branch 2 times, most recently from 336a10d to 577b0fd Compare November 3, 2025 16:34
This introduces the foundational interfaces and attributes needed for
timeline-aware scheduling of asynchronous operations that span module
boundaries.

Of primary interest is the CallAnnotationAttrInterface +
AttributeCallGraphPass. These two allow us to synchronize call site
information with their callees to allow for local patterns/optimizations
to operate without worrying about the globals. This gives us more tightly
scoped (and parallelizable) passes in cases where previously they were
just at the higher level to avoid hazards. A new
IREE::HAL::ABIConventionAttr implements the interface to give us automatic
propagation and then later typed retrieval without leaking the input-level
iree.abi.* ops as string values any lower. For now it just implements the
two modes we support (synchronous and coarse-fences) but in the future
can be used to provide per operand/result mapping to fences.

The HAL ABI convention attr implements the new
IREE::Stream::TimelineAwareOpInterface interface in order to allow for
Stream transforms to detect calls to external HAL functions in a generic
way. We can also use this for custom ops that behave like Stream ops.

No passes are updated to use timeline-aware ops yet as they have... bugs.
Future changes will rework/improve the passes and integrate this behavior.

Part of #16168 PR sequence (2/6).
@benvanik benvanik force-pushed the users/benvanik/16168-2 branch from 577b0fd to 50c7ddc Compare November 10, 2025 16:42
@benvanik benvanik merged commit 161b5bc into main Nov 10, 2025
48 of 50 checks passed
@benvanik benvanik deleted the users/benvanik/16168-2 branch November 10, 2025 17:37
lialan added a commit that referenced this pull request Nov 17, 2025
bangtianliu pushed a commit to bangtianliu/iree that referenced this pull request Nov 19, 2025
…-org#22381)

This introduces the foundational interfaces and attributes needed for
timeline-aware scheduling of asynchronous operations that span module
boundaries.

Of primary interest is the `CallAnnotationAttrInterface` +
`AttributeCallGraphPass`. These two allow us to synchronize call site
information with their callees to allow for local patterns/optimizations
to operate without worrying about the globals. This gives us more
tightly scoped (and parallelizable) passes in cases where previously
they were just at the higher level to avoid hazards. A new
`IREE::HAL::ABIConventionAttr` implements the interface to give us
automatic propagation and then later typed retrieval without leaking the
input-level `iree.abi.*` ops as string values any lower. For now it just
implements the two modes we support (synchronous and coarse-fences) but
in the future can be used to provide per operand/result mapping to
fences.

The HAL ABI convention attr is used to service the new
`IREE::Stream::TimelineAwareOpInterface` interface in order to allow for
Stream transforms to detect calls to external HAL functions in a generic
way. We can also use this for custom ops that behave like Stream ops.

No passes are updated to use timeline-aware ops yet as they have...
bugs. Future changes will rework/improve the passes and integrate this
behavior using the interfaces/attrs added here.

Part of iree-org#16168 PR sequence (2/6).
pstarkcdpr pushed a commit to pstarkcdpr/iree that referenced this pull request Nov 28, 2025
…-org#22381)

This introduces the foundational interfaces and attributes needed for
timeline-aware scheduling of asynchronous operations that span module
boundaries.

Of primary interest is the `CallAnnotationAttrInterface` +
`AttributeCallGraphPass`. These two allow us to synchronize call site
information with their callees to allow for local patterns/optimizations
to operate without worrying about the globals. This gives us more
tightly scoped (and parallelizable) passes in cases where previously
they were just at the higher level to avoid hazards. A new
`IREE::HAL::ABIConventionAttr` implements the interface to give us
automatic propagation and then later typed retrieval without leaking the
input-level `iree.abi.*` ops as string values any lower. For now it just
implements the two modes we support (synchronous and coarse-fences) but
in the future can be used to provide per operand/result mapping to
fences.

The HAL ABI convention attr is used to service the new
`IREE::Stream::TimelineAwareOpInterface` interface in order to allow for
Stream transforms to detect calls to external HAL functions in a generic
way. We can also use this for custom ops that behave like Stream ops.

No passes are updated to use timeline-aware ops yet as they have...
bugs. Future changes will rework/improve the passes and integrate this
behavior using the interfaces/attrs added here.

Part of iree-org#16168 PR sequence (2/6).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants