-
Notifications
You must be signed in to change notification settings - Fork 0
[XPU profiler] enable XPU profiler in kineto #3
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
base: main
Are you sure you want to change the base?
Conversation
|
Should we reserve a dedicated folder for all plugin, like libkineto/src/plugin/xpupti/ ? |
We can do, but the design of kineto build sys is to find the needed src file by function https://github.com/pytorch/kineto/blob/eeb4e9b44da82d09709c482dc2cde40f973cc0a1/libkineto/libkineto_defs.bzl#L12 |
d00d34b to
e9e5a5e
Compare
|
Commit message: |
libkineto/CMakeLists.txt
Outdated
| # Set LIBKINETO_NOXPUPTI to explicitly disable XPUPTI | ||
| # Otherwise, XPUPTI is disabled if not found | ||
| if(NOT LIBKINETO_NOXPUPTI) | ||
| if (NOT SYCL_INCLUDE_DIR OR NOT SYCL_LIBRARY) |
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.
why we do not follow IPEX as below? You are following torch_xpu_ops?
find_package(IntelSYCL REQUIRED)
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.
ok
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.
It's a question, not a request.
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.
Because there will introduce one new cmake file FindIntelSYCL.cmake.
It seems a little bit heavy. We just want to find the sycl include and lib when self building libkineto without torch.
When building with torch, the sycl include and lib has been found in torch.
|
|
||
| IF (NOT SYCL_INCLUDE_DIR OR NOT XPU_xpupti_LIBRARY) | ||
| set(LIBKINETO_NOXPUPTI ON CACHE BOOL "" FORCE) | ||
| endif() |
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.
can we move all of above lines to src/plugin/xpupti?
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.
sounds like the better solution is, make xpupti as a separate static .a ?
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.
ok
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.
.a is not a MUST option. You can move these lines to separate cmakefile first.
| set(XPUPTI_INCLUDE_DIR ${SYCL_INCLUDE_DIR} PARENT_SCOPE) | ||
|
|
||
| # find xpupti sdk | ||
| find_package(Pti) |
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.
The Pti is a MUST component. Should we add the "required" flag here?
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.
ok
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. |
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. Signed-off-by: Chen, Zejun <zejun.chen@intel.com>
f02c4f2 to
a59b653
Compare
TODO:
Discuss: