Skip to content

[Test] Add more tests for cross CTA local_load/local_store#10344

Merged
ThomasRaoux merged 9 commits into
triton-lang:mainfrom
ThomasRaoux:codex/local-ldst-cluster-layout
May 27, 2026
Merged

[Test] Add more tests for cross CTA local_load/local_store#10344
ThomasRaoux merged 9 commits into
triton-lang:mainfrom
ThomasRaoux:codex/local-ldst-cluster-layout

Conversation

@ThomasRaoux
Copy link
Copy Markdown
Collaborator

@ThomasRaoux ThomasRaoux commented May 21, 2026

support local_store/local_load even if the layouts cross CTAs

@ThomasRaoux ThomasRaoux marked this pull request as ready for review May 21, 2026 01:52
@ThomasRaoux ThomasRaoux changed the title Support clustered local load/store layout remaps [Test] Add more tests for cross CTA local_load/local_store May 21, 2026
Comment thread python/test/gluon/test_lowerings.py Outdated
Comment on lines +558 to +561
smem = ttgl.allocate_shared_memory(x.dtype, dst_shape, shared_layout)
smem.store(x)
ttgl.barrier(cluster=True)
y = smem.load(dst_layout)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, does the user need to always insert the cluster barriers themself? In general that's not possible because of allocator re-use.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or rather it's possible, but you need to be pessimistic. Here I think you need a barrier between the load and any future potential reuse.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, two things:
We have a pass that handles the barriers between descriptors that have been aliased, so in that sense, if you declare two different descriptors you can treat them as independent.

Now, about this pattern, this pattern is just a convert_layout, so I wonder whether we really want to spell it factored like this or what.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

here this is a single smem so user needs to make sure ctas are synchronized, since it writes cross CTAs this seem like the simpler way to do it.

@ThomasRaoux ThomasRaoux merged commit 0475130 into triton-lang:main May 27, 2026
10 checks passed
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