Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Improvements to RocprofLogger - #1421

Open
jrmadsen wants to merge 2 commits into
pytorch:mainfrom
jrmadsen:jrmadsen/RocprofLogger-improvements
Open

jrmadsen wants to merge 2 commits into
pytorch:mainfrom
jrmadsen:jrmadsen/RocprofLogger-improvements

Conversation

@jrmadsen

@jrmadsen jrmadsen commented Jun 2, 2026

Copy link
Copy Markdown
  • Check return codes of rocprofiler-sdk API calls and log errors
  • Avoid using .handle for opaque types directly
  • Improve finalization variable lifetime and ordering
    • use placement new into buffer in .bss section to prevent destruction of GlobalContext singleton
    • Implement RocprofLogger::endTracing() to force invocation of finalization function
  • Remove superfluous logging_ and registered_ variables
    • can be handled by queries to rocprofiler-sdk API

@meta-cla

meta-cla Bot commented Jun 2, 2026

Copy link
Copy Markdown

Hi @jrmadsen!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@jrmadsen

Copy link
Copy Markdown
Author

I have signed the CLA.

@scotts

scotts commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@jrmadsen, thank you! The bot isn't picking up that you signed the CLA. We're also getting a failure on the ROCm PyTorch tests, but it may be an infra issue, so I've kicked it off again. Can you also rebase from main? We've made some testing improvements in the past week that may also help with that.

@meta-cla meta-cla Bot added the cla signed label Jun 17, 2026
@meta-cla

meta-cla Bot commented Jun 17, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-codesync

meta-codesync Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Comment thread libkineto/src/RocprofLogger.cpp Resolved
@mwootton

Copy link
Copy Markdown
Contributor

@scotts Are there any other changes @jrmadsen or I need to work on here? Thanks.

Comment thread libkineto/src/RocprofLogger.cpp Resolved
Comment thread libkineto/src/RocprofLogger.cpp Resolved
Comment thread libkineto/src/RocprofLogger.cpp Resolved
Comment thread libkineto/src/RocprofLogger.cpp Resolved
@scotts

scotts commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@mwootton, I added some other minor comments.

@mwootton

mwootton commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

I pinged @jrmadsen. Removing the items from the filter list looks like a mistake, those are pure noise AFAIK. They wrap each kernel launch api.

- Check return codes of rocprofiler-sdk API calls and log errors
- Avoid using .handle for opaque types directly
- Improve finalization variable lifetime and ordering
  - use placement new into buffer in .bss section to prevent destruction of "GlobalContext" singleton
  - Implement RocprofLogger::endTracing() to force invocation of finalization function
- Remove superfluous logging_ and registered_ variables
  - can be handled by queries to rocprofiler-sdk API
@jrmadsen
jrmadsen force-pushed the jrmadsen/RocprofLogger-improvements branch from a79be54 to 6f5b348 Compare August 4, 2026 03:04
@pytorch-bot

pytorch-bot Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@jrmadsen

jrmadsen commented Aug 4, 2026

Copy link
Copy Markdown
Author

I pinged @jrmadsen. Removing the items from the filter list looks like a mistake, those are pure noise AFAIK. They wrap each kernel launch api.

It was not a mistake. Those __hip* functions are part of the HIP_COMPILER_API and y'all are only tracing the HIP_RUNTIME_API.

return -1;
}
}
rocprofiler_stop_context(globalContext.context);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Contexts are not started automatically... there is no need to stop this if it was never started.

@scotts

scotts commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@jrmadsen, the lint job is failing. Can you fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants