kineto
kineto copied to clipboard
[XPU profiler] Introduce XPU profiler by following kineto plugin design
As XPU became a PyTorch built-in device, the profiler support is indispensable part of functionality completeness. In this PR, the XPU profiler is introduced by following kineto plugin design under libkineto/src/plugin/xpupti. The XPU profiler plugin is built on the foundation of intel PTI toolkit (https://github.com/intel/pti-gpu), and underlying SYCL runtime. The LIBKINETO_NOXPUPTI option is added to enable or disable the XPU profiler plugin during kineto build stage.
CC: @aaronenyeshi @briancoutinho @davidberard98 @sraikund16
Hi @zejun-chen!
Thank you for your pull request.
We require contributors to sign our Contributor License Agreement, and yours needs attention.
You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.
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!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!
@aaronenyeshi could you help review?
The associated PR in pytorch is https://github.com/pytorch/pytorch/pull/130811
Thanks.
please check and fix broken CI signals
@zejun-chen pls. follow and fix. Thanks.
please check and fix broken CI signals
Hi, @aaronenyeshi
Thank you for review 👍. Fix the CI error and wait for new CI result. Here is our RFC for the PR: https://github.com/pytorch/kineto/issues/962 Could you help review?
Thank you.
Hi, @aaronenyeshi
The new CI failure is caused by the missing file cupti.h. Could you help take a look at the CI env?
[ 32%] Building CXX object CMakeFiles/kineto_base.dir/src/CuptiNvPerfMetric.cpp.o
[ 35%] Building CXX object CMakeFiles/kineto_base.dir/src/Demangle.cpp.o
In file included from /home/runner/work/kineto/kineto/libkineto/src/CuptiMetricApi.cpp:9:
/home/runner/work/kineto/kineto/libkineto/src/CuptiMetricApi.h:11:10: fatal error: cupti.h: No such file or directory
11 | #include <cupti.h>
| ^~~~~~~~~
compilation terminated.
Thank you
Hi, @aaronenyeshi
The XPU profiler is targeting PT 2.5(6th. Sep). We need to land the feature before the timeline. Could you help review? Thank you for any comments. :)
Thank you.
@aaronenyeshi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@aaronenyeshi merged this pull request in pytorch/kineto@0cded49b0cce22f7d777861db5c937da7f3e22db.
Hi, @aaronenyeshi
Thank you for help! Really appreciate that! Could you help review https://github.com/pytorch/pytorch/pull/130811? It enables the build option for XPUPTI in kineto.
Thank you.