Skip to content

Conversation

@ApoKalipse-V
Copy link
Contributor

@ApoKalipse-V ApoKalipse-V commented Oct 28, 2025

Motivation

This PR adds triple buffering support for SQTT.
Limitations:

  • Aqlprofile support only for MI300+ and RDNA4
  • SDK support only for one shader engine at a time
  • We dlsym the aqlprofile functions to avoid issues with backwards compatiblity
  • Tests marked unstable because CI is not picking aqlprofile changes

Technical Details

The aqlprofile implementation should work the any N buffers, however I have chosen triple buffering for the SDK as it appears to be a good tradeoff of memory use, lean way and easy of programming.

Test Plan

Test Result

Submission Checklist

@ApoKalipse-V ApoKalipse-V marked this pull request as draft October 28, 2025 18:30
@ApoKalipse-V ApoKalipse-V changed the title Gbaraldi/doublebuffer2 Double buffer support for CDNA3/4 and RDNA4 Oct 28, 2025
@ApoKalipse-V ApoKalipse-V changed the title Double buffer support for CDNA3/4 and RDNA4 Thread trace double buffer support for CDNA3/4 and RDNA4 Oct 28, 2025
@ApoKalipse-V ApoKalipse-V changed the title Thread trace double buffer support for CDNA3/4 and RDNA4 Thread trace double/triple buffer support for CDNA3/4 and RDNA4 Oct 31, 2025
@ApoKalipse-V ApoKalipse-V requested a review from vlaindic October 31, 2025 00:32
Copy link
Member

@vlaindic vlaindic left a comment

Choose a reason for hiding this comment

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

The 1st part of the review. I was primarily asking questions about the aqlprofile part, and would be great is someone more familiar would take a look.

@ROCm ROCm deleted a comment from vlaindic Nov 3, 2025
Copy link
Member

@vlaindic vlaindic left a comment

Choose a reason for hiding this comment

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

Some more comments. General idea looks fine to me.

@ROCm ROCm deleted a comment from vlaindic Nov 3, 2025
@ApoKalipse-V ApoKalipse-V force-pushed the gbaraldi/doublebuffer2 branch 2 times, most recently from 9cc6782 to 611445a Compare November 3, 2025 21:41
@ApoKalipse-V ApoKalipse-V marked this pull request as ready for review November 3, 2025 21:56
@ApoKalipse-V ApoKalipse-V changed the title Thread trace double/triple buffer support for CDNA3/4 and RDNA4 Thread trace triple buffering support for CDNA3/4 and RDNA4 Nov 3, 2025
Copy link
Member

@vlaindic vlaindic left a comment

Choose a reason for hiding this comment

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

Some minor comments. Otherwise, the overall implementation looks fine

Copy link
Contributor

@bing-ma bing-ma left a comment

Choose a reason for hiding this comment

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

The aqlprofile portion looks good to me. Left comments for some minor issues.

Copy link
Contributor

@bing-ma bing-ma left a comment

Choose a reason for hiding this comment

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

The aqlprofile portion looks good to me.

Copy link
Member

@vlaindic vlaindic left a comment

Choose a reason for hiding this comment

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

Thanks for addressing comments! Minor comments about the tests and one question about the static scope. Otherwise, LGTM, so I approved.

@ApoKalipse-V ApoKalipse-V force-pushed the gbaraldi/doublebuffer2 branch from 53a82a4 to d3698df Compare November 6, 2025 19:52
@ApoKalipse-V ApoKalipse-V force-pushed the gbaraldi/doublebuffer2 branch 4 times, most recently from f9d8056 to d23743b Compare November 11, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants