Skip to content

Conversation

@qedawkins
Copy link
Contributor

Adds the FusePCFWritesPass which consolidates pcf.write_slice ops in loop bodies by fusing them with tensor.parallel_insert_slice operations from scf.forall terminators.

When a pcf.write_slice writes to an sref that is produced by an scf.forall result, this pass composes the offsets, sizes, and strides of both operations to create a single write_slice inside the forall body.

The implementation is exposed through the helper
composeWriteSliceWithParallelInsert for use within larger passes.

Copy link
Collaborator

@MaheshRavishankar MaheshRavishankar left a comment

Choose a reason for hiding this comment

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

Ha! Easier PR to review compared to the others. Good to go!

@qedawkins qedawkins force-pushed the users/qedawkins/pcf-transforms-fuse-writes branch from c6b4cf5 to 7c630ab Compare January 2, 2026 17:58
@qedawkins qedawkins force-pushed the users/qedawkins/pcf-transforms-fuse-consumers branch from 092c3d4 to 3735172 Compare January 5, 2026 16:45
Adds the FusePCFWritesPass which consolidates pcf.write_slice ops in
loop bodies by fusing them with tensor.parallel_insert_slice operations
from scf.forall terminators.

When a pcf.write_slice writes to an sref that is produced by an
scf.forall result, this pass composes the offsets, sizes, and strides
of both operations to create a single write_slice inside the forall
body.

The implementation is exposed through the helper
composeWriteSliceWithParallelInsert for use within larger passes.
@qedawkins qedawkins force-pushed the users/qedawkins/pcf-transforms-fuse-writes branch from 7c630ab to b061486 Compare January 5, 2026 17:16
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