Skip to content

[Profiler][PrivateUse1] Profiler support PrivateUse1 key - #124818

Closed
fwenguang wants to merge 1 commit into
pytorch:mainfrom
fwenguang:support_profiler_privateuse1
Closed

fwenguang wants to merge 1 commit into
pytorch:mainfrom
fwenguang:support_profiler_privateuse1

Conversation

@fwenguang

Copy link
Copy Markdown
Contributor

Summary:
1.Package public headers of kineto if USE_KINETO so that they can be used by PrivateUse1 user.
2.Add PrivateUse1 key to ActivityType.
3. Support PrivateUse1 key in function deviceTypeFromActivity and _supported_activities.
4. Fix some bugs when processing profiler results.

@pytorch-bot

pytorch-bot Bot commented Apr 24, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/124818

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b87e9bf with merge base 81740fd (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@fwenguang

Copy link
Copy Markdown
Contributor Author

Hi @aaronenyeshi , i noticed the kineto commit id had updated, so this issue #120556 (comment) will be fixed.
I make a copy of #120556 and rebase it on main branch, please help to review this.Thank you.

@aaronenyeshi aaronenyeshi added release notes: profiler release notes category topic: new features topic category labels Apr 24, 2024

@aaronenyeshi aaronenyeshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@aaronenyeshi aaronenyeshi added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 24, 2024
@aaronenyeshi

Copy link
Copy Markdown
Member

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

petrex pushed a commit to petrex/pytorch that referenced this pull request May 3, 2024
)

Summary:
1.Package public headers of kineto if USE_KINETO so that they can be used by PrivateUse1 user.
2.Add PrivateUse1 key to ActivityType.
3. Support PrivateUse1 key in function deviceTypeFromActivity and _supported_activities.
4. Fix some bugs when processing profiler results.

Pull Request resolved: pytorch#124818
Approved by: https://github.com/aaronenyeshi
scotts added a commit to scotts/pytorch that referenced this pull request Nov 2, 2026
…aths

libkineto is registered once per process, and its cpuOnly flag says whether
the process has a device Kineto could trace. Two places register it: the first
profiling session (prepareProfiler) and, when KINETO_USE_DAEMON is set,
global_kineto_init at import. Each spelled out its own device check, and they
drifted: pytorch#124818 added registered PrivateUse1 backends to the session path but
not to the daemon path.

Both now call torch::profiler::impl::kineto::isDevicePresent(). The daemon
path gains the PrivateUse1 term. In practice that changes little today:
global_kineto_init runs while torch._C initializes, before a PrivateUse1
backend normally registers its name.

Test Plan:
Not built or tested locally yet; relying on CI.

This change was authored with the assistance of an AI assistant (Claude).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: profiler release notes category topic: new features topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants