Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pix: Cope with group shared AS->MS payload #6619

Merged
merged 12 commits into from
May 15, 2024

Conversation

jeffnn
Copy link
Collaborator

@jeffnn jeffnn commented May 14, 2024

This change copes with the AS->MS payload being placed in group-shared by the application (and MSFT's samples do indeed do this). (TIL, thanks to pow2clk, that the spec says that the payload counts against the group-shared total, implying, if not explicitly stating, that at least on some platforms, the payload will be in group-shared anyway.)

The MS pass needs to be given data from the AS about the AS's thread group topology, and this is done by extending the payload struct to add three uints. This can't be done when the payload is resident in group-shared, of course, because that would change the layout of group-shared memory.
So the new approach here is to copy the payload to a new alloca (in the default address space) struct with the members of the base struct plus the extended data the MS needs, and then to copy piece-wise because llvm.memcpy isn't appropriate for group-shared-to-normal address space copies.

@jeffnn jeffnn self-assigned this May 14, 2024
@jeffnn jeffnn requested a review from a team as a code owner May 14, 2024 17:00
Copy link
Contributor

github-actions bot commented May 14, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@jeffnn jeffnn changed the title Pix group shared payload Pix: Cope with group shared AS->MS payload May 14, 2024
Copy link
Member

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Looks good, just a minor nit and a question

Copy link
Collaborator

@coopp coopp left a comment

Choose a reason for hiding this comment

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

Looks good to me..

@jeffnn jeffnn merged commit fd7e54b into microsoft:main May 15, 2024
13 checks passed
@jeffnn jeffnn deleted the PIX_GroupSharedPayload branch May 15, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants