-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[profiler] update CUDA runtime kernel identification logic #157890
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157890
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit b0b748d with merge base ee72338 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: profiler" |
torch/profiler/_utils.py
Outdated
|
|
||
| name = str(getattr(e, "name", e)).lower() | ||
| # Exclude launcher and memory events | ||
| exclude_patterns = ["cudalaunch", "cudamem"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is necessary. cudalaunch will already have DeviceType.CPU. I think we should just check if kernel is in the name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I misunderstood it due to my lack of background. Then how about keeping the current structure and removing #TODO? (cc @davidchencsl )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think until we can procedurally determine it is a kernel besides looking at the name we should keep the todo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sraikund16 Thanks for your review. For focusing on excluding memory kernel, I updated for more edge-cases in this commit. Could you take a look at this PR?
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Use cases: - "mem" : "cudaMemcpy", "cudaMemset" - "alloc" : "cudaMalloc", "cudaMallocManaged" - "free" : "cudaFree"
|
Successfully rebased |
1f85809 to
b0b748d
Compare
|
@pytorchbot merge |
|
Pull workflow has not been scheduled for the PR yet. It could be because author doesn't have permissions to run those or skip-checks keywords were added to PR/commits, aborting merge. Please get/give approval for the workflows and/or remove skip ci decorators before next merge attempt. If you think this is a mistake, please contact PyTorch Dev Infra. |
|
@pytorchmergebot merge |
Merge startedYour 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 |
Update CUDA kernel detection to exclude memory API calls References: - https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html - https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__EXECUTION.html Pull Request resolved: #157890 Approved by: https://github.com/sraikund16
Update CUDA kernel detection to exclude memory API calls
References: