kineto icon indicating copy to clipboard operation
kineto copied to clipboard

[RFC][XPU profiler] Introduce XPU profiler by following kineto plugin design

Open zejun-chen opened this issue 1 year ago • 1 comments

The backend XPU has became a PyTorch built-in device for now and represents the Intel GPU Platform. The need for the profiling of the workloads on XPU device is increasing sharply in the community. Here we kick off a official proposal to enable the XPU profiler into the pytorch/kineto.

Kineto defines the general industrial standard of the profiling in torch and has convenient plugin design for new backends. Here the XPU profiler leverages this plugin design and its backbone code is planned to be placed under the libkineto/src/plugin/xpupti. The primitives and key classes defined in XPU profiler imitates the CUDA profiler. The XPU profiler is based on the underlying tracing tool - XPUPTI toolkit(https://github.com/intel/pti-gpu), which is the counterpart of the CUPTI. For the XPU profiler building in kineto, a build option LIBKINETO_NOXPUPTI is used to control for upper application(torch) for XPU. When kineto is initialized, the ChildActivityProfilerFactory for the XPU profiler XPUActivityProfiler will be registered to kineto.

image

PR link torch: https://github.com/pytorch/pytorch/pull/130811 kineto: https://github.com/pytorch/kineto/pull/961

zejun-chen avatar Jul 18 '24 03:07 zejun-chen

Hi, @aaronenyeshi @briancoutinho @davidberard98 @sraikund16

Could you help review the RFC? 😄

Thank you.

zejun-chen avatar Jul 18 '24 03:07 zejun-chen

Thank you for the RFC. This sounds great to me, and I am happy to help with merging diffs into plugin/xpupti.

aaronenyeshi avatar Aug 06 '24 14:08 aaronenyeshi

Thank you @aaronenyeshi. Really appreciate that!

zejun-chen avatar Aug 07 '24 02:08 zejun-chen