Skip to content

Commit 26b0011

Browse files
zejun-chenaaronenyeshi
authored andcommitted
[XPU][Kineto Submodule] Introduce kineto-based XPU profiler (pytorch#130811)
As XPU became a PyTorch built-in device, the profiler support is indispensable part of functionality completeness. This PR is associated with the PR to introduce XPU profiler plugin into the kineto. When USE_XPU is enabled, the LIBKINETO_NOXPUPTI option will be suppressed accordingly, which allows kineto to build with XPU profiler plugin. Associated PR to introduce kineto-based XPU profiler into kineto: pytorch/kineto#961 Also updates the Kineto Submodule to include XPU changes. Co-authored-by: Aaron Enye Shi <[email protected]> Pull Request resolved: pytorch#130811 Approved by: https://github.com/aaronenyeshi
1 parent 0755188 commit 26b0011

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

cmake/Dependencies.cmake

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,14 @@ if(USE_KINETO)
15631563
message(STATUS "Using Kineto with Roctracer support")
15641564
endif()
15651565

1566-
if(LIBKINETO_NOCUPTI AND LIBKINETO_NOROCTRACER)
1566+
if(NOT USE_XPU)
1567+
set(LIBKINETO_NOXPUPTI ON CACHE STRING "" FORCE)
1568+
else()
1569+
set(LIBKINETO_NOXPUPTI OFF CACHE STRING "")
1570+
message(STATUS "Using Kineto with XPUPTI support")
1571+
endif()
1572+
1573+
if(LIBKINETO_NOCUPTI AND LIBKINETO_NOROCTRACER AND LIBKINETO_NOXPUPTI)
15671574
message(STATUS "Using CPU-only version of Kineto")
15681575
endif()
15691576

@@ -1662,7 +1669,12 @@ if(USE_KINETO)
16621669
if(LIBKINETO_NOROCTRACER)
16631670
string(APPEND CMAKE_CXX_FLAGS " -DLIBKINETO_NOROCTRACER")
16641671
endif()
1665-
if(LIBKINETO_NOCUPTI AND LIBKINETO_NOROCTRACER)
1672+
if(LIBKINETO_NOXPUPTI)
1673+
string(APPEND CMAKE_CXX_FLAGS " -DLIBKINETO_NOXPUPTI=ON")
1674+
else()
1675+
string(APPEND CMAKE_CXX_FLAGS " -DLIBKINETO_NOXPUPTI=OFF")
1676+
endif()
1677+
if(LIBKINETO_NOCUPTI AND LIBKINETO_NOROCTRACER AND LIBKINETO_NOXPUPTI)
16661678
message(STATUS "Configured Kineto (CPU)")
16671679
else()
16681680
message(STATUS "Configured Kineto")

0 commit comments

Comments
 (0)