Skip to content

Commit 9723157

Browse files
authored
[SYCL][XPTI][Doc] PI -> UR renaming (#15164)
Closes #15109
1 parent 93ee5b9 commit 9723157

File tree

9 files changed

+52
-58
lines changed

9 files changed

+52
-58
lines changed

sycl/doc/design/SYCLInstrumentationUsingXPTI.md

+14-14
Large diffs are not rendered by default.

sycl/source/detail/xpti_registry.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ namespace detail {
2727
// We define a sycl stream name and this will be used by the instrumentation
2828
// framework
2929
inline constexpr const char *SYCL_STREAM_NAME = "sycl";
30-
// Stream name being used for traces generated from the SYCL plugin layer
31-
inline constexpr const char *SYCL_PICALL_STREAM_NAME = "sycl.pi";
32-
// Stream name being used for traces generated from UR calls. This stream
33-
// contains information about function arguments.
34-
inline constexpr const char *SYCL_PIDEBUGCALL_STREAM_NAME = "sycl.pi.debug";
3530
inline constexpr auto SYCL_MEM_ALLOC_STREAM_NAME =
3631
"sycl.experimental.mem_alloc";
3732

xpti/doc/SYCL_Tracing_Implementation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ and all kernel executions in the applications are added as nodes in this
6363
global graph. In the SYCL runtime, there is no obvious location where the
6464
creation of the global graph can be inserted as many objects are
6565
instantiated statically. Currently, we embed the graph creation in the
66-
plugin interface (PI) layer `initialize()` call. In this call, we will
66+
Unified Runtime (UR) layer `initializePlugins()` call. In this call, we will
6767
perform two operations:
6868

6969
1. Initialize all listeners and create a trace event to represent the graph.
70-
This is done in `sycl/include/sycl/detail/pi.cpp`.
70+
This is done in `sycl/include/sycl/detail/ur.cpp`.
7171
2. Send a `graph_create` event to all subscribers. This notification
7272
will only be sent once.
7373

xptifw/samples/sycl_perf_collector/sycl-perf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ help()
3232
echo " -c,--color Boolean option, if provided will display output in color for stack data"
3333
echo " -s,--streams Streams to monitor in the SYCL runtime. Multiple streams can be provided"
3434
echo -e " as comma separated values for ${yellow}<Value4>${green}"
35-
echo -e " Example:- ${yellow}sycl,sycl.pi,sycl.perf ${clear}${green}"
35+
echo -e " Example:- ${yellow}sycl,ur.call,sycl.perf ${clear}${green}"
3636
echo " -e,--calibrate Boolean option, if provided will run the application with an empty collector."
3737
echo " -v,--verbose Boolean option, if provided will display verbose output of the collector status"
3838
echo " -d,--debug Boolean option, if provided will display debug output, including saved record information."

xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ event_instances_t *GRecordsInProgress = nullptr;
4141
xpti::utils::timer::measurement_t GMeasure;
4242

4343
constexpr const char *GStreamBasic = "sycl";
44-
constexpr const char *GStreamPI = "sycl.pi";
44+
constexpr const char *GStreamPI = "ur.call";
4545
constexpr const char *GStreamMemory = "sycl.experimental.mem_alloc";
4646
constexpr const char *GStreamL0 = "sycl.experimental.level_zero.call";
4747
constexpr const char *GStreamCuda = "sycl.experimental.cuda.call";
@@ -154,7 +154,7 @@ XPTI_CALLBACK_API void graphCallback(uint16_t trace_type,
154154
xpti::trace_event_data_t *parent,
155155
xpti::trace_event_data_t *event,
156156
uint64_t instance, const void *user_data);
157-
XPTI_CALLBACK_API void syclPiCallback(uint16_t trace_type,
157+
XPTI_CALLBACK_API void syclURCallback(uint16_t trace_type,
158158
xpti::trace_event_data_t *parent,
159159
xpti::trace_event_data_t *event,
160160
uint64_t instance, const void *user_data);
@@ -219,7 +219,7 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version,
219219
// characteristics that can be encapsulated in a launcher application
220220
//
221221
// 1. XPTI_SYCL_PERF_OUTPUT=[json,csv,table,stack,all]
222-
// 2. XPTI_STREAMS=[all] or [sycl,sycl.pi,sycl.perf,sycl.perf.detail,...]
222+
// 2. XPTI_STREAMS=[all] or [sycl,ur.call,sycl.perf,sycl.perf.detail,...]
223223
// 3. XPTI_STDOUT_USE_COLOR=[1,0]
224224
// 4. XPTI_IGNORE_LIST=piPlatformsGet,piProgramBuild
225225
// 5. XPTI_SIMULATION=10,20,50,100
@@ -464,10 +464,10 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version,
464464
auto StreamID = xptiRegisterStream(stream_name);
465465
xptiRegisterCallback(StreamID,
466466
(uint16_t)xpti::trace_point_type_t::function_begin,
467-
syclPiCallback);
467+
syclURCallback);
468468
xptiRegisterCallback(StreamID,
469469
(uint16_t)xpti::trace_point_type_t::function_end,
470-
syclPiCallback);
470+
syclURCallback);
471471
} else if (std::string(GStreamL0) == stream_name && Check) {
472472
auto StreamID = xptiRegisterStream(stream_name);
473473
xptiRegisterCallback(StreamID,
@@ -909,7 +909,7 @@ XPTI_CALLBACK_API void graphMemCallback(uint16_t TraceType,
909909
// Need to add DOT writer here
910910
}
911911

912-
XPTI_CALLBACK_API void syclPiCallback(uint16_t TraceType,
912+
XPTI_CALLBACK_API void syclURCallback(uint16_t TraceType,
913913
xpti::trace_event_data_t *Parent,
914914
xpti::trace_event_data_t *Event,
915915
uint64_t Instance, const void *UserData) {

xptifw/samples/syclpi_collector/CMakeLists.txt

-18
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
add_library(xpti_syclur_collector SHARED
2+
syclur_collector.cpp
3+
)
4+
target_compile_definitions(xpti_syclur_collector PUBLIC XPTI_CALLBACK_API_EXPORTS=1)
5+
target_link_libraries(xpti_syclur_collector PRIVATE
6+
${xptifw_lib}
7+
${CMAKE_DL_LIBS}
8+
)
9+
target_include_directories(xpti_syclur_collector PRIVATE
10+
${XPTIFW_DIR}/include
11+
${XPTI_DIR}/include
12+
${XPTIFW_DIR}/samples/include
13+
)
14+
15+
if (XPTI_ENABLE_TBB)
16+
target_link_libraries(xpti_syclur_collector PRIVATE tbb)
17+
endif()
18+

xptifw/samples/syclpi_collector/README.md renamed to xptifw/samples/syclur_collector/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Example SYCL PI Layer Collector
1+
# Example SYCL UR Layer Collector
22

3-
The SYCL PI layer collector demonstrates the creation of a subscriber and prints
4-
of the data received from SYCL PI layer stream. In order to obtain the data from
3+
The SYCL UR layer collector demonstrates the creation of a subscriber and prints
4+
of the data received from SYCL UR layer stream. In order to obtain the data from
55
an application instrumented with XPTI, the following steps must be performed.
66

77
1. Set the environment variable that indicates that tracing has been enabled.
@@ -19,9 +19,8 @@ an application instrumented with XPTI, the following steps must be performed.
1919
`XPTI_FRAMEWORK_DISPATCHER=/path/to/libxptifw.[so,dll,dylib]`
2020

2121
3. Set the environment variable that points to the subscriber, which in this
22-
case is `libsyclpi_collector.[so,dll,dylib]`.
23-
24-
`XPTI_SUBSCRIBERS=/path/to/libxpti_syclpi_collector.[so,dll,dylib]`
22+
case is `libsyclur_collector.[so,dll,dylib]`.
2523

24+
`XPTI_SUBSCRIBERS=/path/to/libxpti_syclur_collector.[so,dll,dylib]`
2625
For more detail on the framework, the tests that are provided and their usage,
2726
please consult the [XPTI Framework library documentation](doc/XPTI_Framework.md).

xptifw/samples/syclpi_collector/syclpi_collector.cpp renamed to xptifw/samples/syclur_collector/syclur_collector.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// An example collector/tool that prints out just the SYCL PI layer trace
2+
// An example collector/tool that prints out just the SYCL UR layer trace
33
// events
44
//
55
#include "xpti/xpti_trace_framework.h"
@@ -32,15 +32,15 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version,
3232
const char *stream_name) {
3333
// The example basic collector under xptifw/samples/basic_collector takes in
3434
// streams from anyone as an example. In this collector, we will accept
35-
// streams from just the SYCL plugin interface (PI) layer.
35+
// streams from just the SYCL Unified Runtime (UR) layer.
3636
printf("Stream Name: %s\n", stream_name);
37-
if (std::string("sycl.pi") == stream_name) {
37+
if (std::string("ur.call") == stream_name) {
3838
// Register this stream to get the stream ID; This stream may already have
3939
// been registered by the framework and will return the previously
4040
// registered stream ID. In this sample, we subscribe to only the events
41-
// generated by the SYCL PI layer. The protocol described by the PI layer
41+
// generated by the SYCL UR layer. The protocol described by the UR layer
4242
// is that `user_data` field in the tpCallback() function will contain the
43-
// SYCL PI function name.
43+
// SYCL UR function name.
4444
GStreamID = xptiRegisterStream(stream_name);
4545
xptiRegisterCallback(GStreamID,
4646
(uint16_t)xpti::trace_point_type_t::function_begin,
@@ -80,6 +80,6 @@ XPTI_CALLBACK_API void tpCallback(uint16_t TraceType,
8080
be = "END";
8181
else
8282
be = "BEGIN";
83-
printf("SYCL_PI: %-35s %s\n", Name, be);
83+
printf("SYCL_UR: %-35s %s\n", Name, be);
8484
}
8585
}

0 commit comments

Comments
 (0)