Introduce XPU scope profiler extending existing XPU profiler plugin#1174
Introduce XPU scope profiler extending existing XPU profiler plugin#1174moksiuc wants to merge 34 commits intopytorch:mainfrom
Conversation
|
@moksiuc It's great that we are going to update our PTI integration code, and introduce new profiler path.
|
|
For sure not in this PR. I'll add this to our list of tasks. |
Extracted clean up and adding config for scope profiler to separate PR's. |
- place of config initialization - removal of passing unused C compiler flag into test cmake file
|
@moksiuc Let's close this PR. |
|
@gujinghui this is the core of the scope profiler. When 2 smaller parts are merged this one would have only core profiler left. |
Yes, I did. |
|
@malfet @sraikund16 could you help review this PR? Thanks. |
|
@malfet @sraikund16 could you review, please ? |
There was a problem hiding this comment.
Thanks for the PR. I'm ramping up on this space. I'm curious to understand how much does it differ from the existing XPU profiler - maybe it should exist as a separate class in itself ? How can I learn more about the scope profiler ?
Also, thank you for adding tests.
This PR adds new activity ActivityType::XPU_SCOPE_PROFILER, accepted by XPU profiler. With this new mode enabled XPU profiler additionally gathers requested HW metrics. |
Hi @divyanshk , For more details of CuptiRangeProfiler, please see this page. https://deepwiki.com/pytorch/kineto/3.1-nvidia-gpu-support-(cupti)#4-cupti-range-profiler-integration @moksiuc is going to provide similar functionalities on XPU in this PR. |
|
Hi, @moksiuc, I'm also a new maintainer to this library. Thanks for all of the recent cleanup PRs! On this PR, I have a similar concern that @divyanshk does on the code structuring. Specifically, this code uses We should be able to achieve the same functionality by defining |
|
@divyanshk , @scotts I've split files and moved the new code to new files. Please review. |
divyanshk
left a comment
There was a problem hiding this comment.
@moksiuc @gujinghui Can you help me understand a few things, thanks
1.) Do we have a different intel PTI API that is being leveraged for the range profiler ? How stable and well-supported is that API ? I ask because CUPTIRangeProfiler uses a different CUPTI API (CUPTI Profiling API) from the canonical profiler. Also that API is marked for deprecation so we are thinking of deprecating and deleting the CUPTIRangeProfiler.
2.) Can you point me to the official documentation for scope profiler API for Intel?
3.) Deferring code restructuring concerns to @scotts, I am starting to think ActivityType might be over-used here; because activitytype should be signifying profiling activities/events but CUDA_PROFILER_RANGE and XPU_SCOPE_PROFILER are independent profilers. Thoughts?
|
|
@scotts, could you review restructured code, please ? |
Summary:
As XPU became a PyTorch built-in device, the profiler support is indispensable part of functionality completeness. In this PR, the XPU scope profiler is introduced by extending existing XPU profiler plugin. The XPU scope profiler is built on the foundation of intel PTI toolkit (https://github.com/intel/pti-gpu), and underlying SYCL runtime. It allows to gather XPU hardware metrics. The LIBKINETO_NOXPUPTI option is used to enable or disable the whole XPU profiler plugin during kineto build stage.
Changes: