Skip to content

[CUPTI] Do not clear out per-thread buffer flag #1115

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

Closed
wants to merge 2 commits into from

Conversation

Aidyn-A
Copy link
Contributor

@Aidyn-A Aidyn-A commented Jul 18, 2025

According to the documentation it is not safe to modify CUPTI_ACTIVITY_ATTR_PER_THREAD_ACTIVITY_BUFFER attribute: "Changing this attribute in the middle of the profiling session will result in undefined behavior."

@meta-cla meta-cla bot added the cla signed label Jul 18, 2025
@sraikund16
Copy link
Contributor

@Aidyn-A the flag is being turned off after all of the profiling activity is disabled, so I believe it is safe in this case.

@Aidyn-A
Copy link
Contributor Author

Aidyn-A commented Jul 18, 2025

@Aidyn-A the flag is being turned off after all of the profiling activity is disabled, so I believe it is safe in this case.

Thanks for the quick response. My experiments show that it is still not safe call it after all activities are disabled. If clearing it out is a must, it is safe to do it after the flush.

@sraikund16
Copy link
Contributor

Ok sounds good lets add it to CuptiActivityApi::flushActivities then?

@facebook-github-bot
Copy link
Contributor

@sraikund16 has imported this pull request. If you are a Meta employee, you can view this in D78676076.

@facebook-github-bot
Copy link
Contributor

@sraikund16 merged this pull request in 1928370.

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.

4 participants