From 6c3c1cabefde706db566cd5621b68dc2e27689d0 Mon Sep 17 00:00:00 2001 From: Martin Morrison-Grant Date: Thu, 22 Aug 2024 09:47:40 +0100 Subject: [PATCH 1/3] [SYCL][XPTI][Doc] PI -> UR renaming. --- sycl/source/detail/xpti_registry.hpp | 5 ----- xpti/doc/SYCL_Tracing_Implementation.md | 4 ++-- .../samples/sycl_perf_collector/sycl-perf.sh | 2 +- .../sycl_perf_collector.cpp | 8 ++++---- xptifw/samples/syclpi_collector/CMakeLists.txt | 18 ------------------ xptifw/samples/syclur_collector/CMakeLists.txt | 18 ++++++++++++++++++ .../README.md | 12 ++++++------ .../syclur_collector.cpp} | 8 ++++---- 8 files changed, 35 insertions(+), 40 deletions(-) delete mode 100644 xptifw/samples/syclpi_collector/CMakeLists.txt create mode 100644 xptifw/samples/syclur_collector/CMakeLists.txt rename xptifw/samples/{syclpi_collector => syclur_collector}/README.md (76%) rename xptifw/samples/{syclpi_collector/syclpi_collector.cpp => syclur_collector/syclur_collector.cpp} (93%) diff --git a/sycl/source/detail/xpti_registry.hpp b/sycl/source/detail/xpti_registry.hpp index 0b96dc2f99a78..c9b72a22ed626 100644 --- a/sycl/source/detail/xpti_registry.hpp +++ b/sycl/source/detail/xpti_registry.hpp @@ -27,11 +27,6 @@ namespace detail { // We define a sycl stream name and this will be used by the instrumentation // framework inline constexpr const char *SYCL_STREAM_NAME = "sycl"; -// Stream name being used for traces generated from the SYCL plugin layer -inline constexpr const char *SYCL_PICALL_STREAM_NAME = "sycl.pi"; -// Stream name being used for traces generated from UR calls. This stream -// contains information about function arguments. -inline constexpr const char *SYCL_PIDEBUGCALL_STREAM_NAME = "sycl.pi.debug"; inline constexpr auto SYCL_MEM_ALLOC_STREAM_NAME = "sycl.experimental.mem_alloc"; diff --git a/xpti/doc/SYCL_Tracing_Implementation.md b/xpti/doc/SYCL_Tracing_Implementation.md index 02185567f01c6..c004c12cdee12 100644 --- a/xpti/doc/SYCL_Tracing_Implementation.md +++ b/xpti/doc/SYCL_Tracing_Implementation.md @@ -63,11 +63,11 @@ and all kernel executions in the applications are added as nodes in this global graph. In the SYCL runtime, there is no obvious location where the creation of the global graph can be inserted as many objects are instantiated statically. Currently, we embed the graph creation in the -plugin interface (PI) layer `initialize()` call. In this call, we will +Unified Runtime (UR) layer `initializePlugins()` call. In this call, we will perform two operations: 1. Initialize all listeners and create a trace event to represent the graph. -This is done in `sycl/include/sycl/detail/pi.cpp`. +This is done in `sycl/include/sycl/detail/ur.cpp`. 2. Send a `graph_create` event to all subscribers. This notification will only be sent once. diff --git a/xptifw/samples/sycl_perf_collector/sycl-perf.sh b/xptifw/samples/sycl_perf_collector/sycl-perf.sh index 661c44839a095..cdad1eda59534 100755 --- a/xptifw/samples/sycl_perf_collector/sycl-perf.sh +++ b/xptifw/samples/sycl_perf_collector/sycl-perf.sh @@ -32,7 +32,7 @@ help() echo " -c,--color Boolean option, if provided will display output in color for stack data" echo " -s,--streams Streams to monitor in the SYCL runtime. Multiple streams can be provided" echo -e " as comma separated values for ${yellow}${green}" - echo -e " Example:- ${yellow}sycl,sycl.pi,sycl.perf ${clear}${green}" + echo -e " Example:- ${yellow}sycl,ur.call,sycl.perf ${clear}${green}" echo " -e,--calibrate Boolean option, if provided will run the application with an empty collector." echo " -v,--verbose Boolean option, if provided will display verbose output of the collector status" echo " -d,--debug Boolean option, if provided will display debug output, including saved record information." diff --git a/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp b/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp index 13619f747a9a1..106265f62d760 100644 --- a/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp +++ b/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp @@ -154,7 +154,7 @@ XPTI_CALLBACK_API void graphCallback(uint16_t trace_type, xpti::trace_event_data_t *parent, xpti::trace_event_data_t *event, uint64_t instance, const void *user_data); -XPTI_CALLBACK_API void syclPiCallback(uint16_t trace_type, +XPTI_CALLBACK_API void syclURCallback(uint16_t trace_type, xpti::trace_event_data_t *parent, xpti::trace_event_data_t *event, uint64_t instance, const void *user_data); @@ -464,10 +464,10 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version, auto StreamID = xptiRegisterStream(stream_name); xptiRegisterCallback(StreamID, (uint16_t)xpti::trace_point_type_t::function_begin, - syclPiCallback); + syclURCallback); xptiRegisterCallback(StreamID, (uint16_t)xpti::trace_point_type_t::function_end, - syclPiCallback); + syclURCallback); } else if (std::string(GStreamL0) == stream_name && Check) { auto StreamID = xptiRegisterStream(stream_name); xptiRegisterCallback(StreamID, @@ -909,7 +909,7 @@ XPTI_CALLBACK_API void graphMemCallback(uint16_t TraceType, // Need to add DOT writer here } -XPTI_CALLBACK_API void syclPiCallback(uint16_t TraceType, +XPTI_CALLBACK_API void syclURCallback(uint16_t TraceType, xpti::trace_event_data_t *Parent, xpti::trace_event_data_t *Event, uint64_t Instance, const void *UserData) { diff --git a/xptifw/samples/syclpi_collector/CMakeLists.txt b/xptifw/samples/syclpi_collector/CMakeLists.txt deleted file mode 100644 index f4333e4e527aa..0000000000000 --- a/xptifw/samples/syclpi_collector/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_library(xpti_syclpi_collector SHARED - syclpi_collector.cpp -) -target_compile_definitions(xpti_syclpi_collector PUBLIC XPTI_CALLBACK_API_EXPORTS=1) -target_link_libraries(xpti_syclpi_collector PRIVATE - ${xptifw_lib} - ${CMAKE_DL_LIBS} -) -target_include_directories(xpti_syclpi_collector PRIVATE - ${XPTIFW_DIR}/include - ${XPTI_DIR}/include - ${XPTIFW_DIR}/samples/include -) - -if (XPTI_ENABLE_TBB) - target_link_libraries(xpti_syclpi_collector PRIVATE tbb) -endif() - diff --git a/xptifw/samples/syclur_collector/CMakeLists.txt b/xptifw/samples/syclur_collector/CMakeLists.txt new file mode 100644 index 0000000000000..1348dc1afe472 --- /dev/null +++ b/xptifw/samples/syclur_collector/CMakeLists.txt @@ -0,0 +1,18 @@ +add_library(xpti_syclur_collector SHARED + syclur_collector.cpp +) +target_compile_definitions(xpti_syclur_collector PUBLIC XPTI_CALLBACK_API_EXPORTS=1) +target_link_libraries(xpti_syclur_collector PRIVATE + ${xptifw_lib} + ${CMAKE_DL_LIBS} +) +target_include_directories(xpti_syclur_collector PRIVATE + ${XPTIFW_DIR}/include + ${XPTI_DIR}/include + ${XPTIFW_DIR}/samples/include +) + +if (XPTI_ENABLE_TBB) + target_link_libraries(xpti_syclur_collector PRIVATE tbb) +endif() + diff --git a/xptifw/samples/syclpi_collector/README.md b/xptifw/samples/syclur_collector/README.md similarity index 76% rename from xptifw/samples/syclpi_collector/README.md rename to xptifw/samples/syclur_collector/README.md index 7eb077abcb95e..64182729e610c 100644 --- a/xptifw/samples/syclpi_collector/README.md +++ b/xptifw/samples/syclur_collector/README.md @@ -1,7 +1,7 @@ -# Example SYCL PI Layer Collector +# Example SYCL UR Layer Collector -The SYCL PI layer collector demonstrates the creation of a subscriber and prints -of the data received from SYCL PI layer stream. In order to obtain the data from +The SYCL UR layer collector demonstrates the creation of a subscriber and prints +of the data received from SYCL UR layer stream. In order to obtain the data from an application instrumented with XPTI, the following steps must be performed. 1. Set the environment variable that indicates that tracing has been enabled. @@ -19,9 +19,9 @@ an application instrumented with XPTI, the following steps must be performed. `XPTI_FRAMEWORK_DISPATCHER=/path/to/libxptifw.[so,dll,dylib]` 3. Set the environment variable that points to the subscriber, which in this - case is `libsyclpi_collector.[so,dll,dylib]`. - - `XPTI_SUBSCRIBERS=/path/to/libxpti_syclpi_collector.[so,dll,dylib]` + case is `libsyclur_collector.[so,dll,dylib]`. + `XPTI_SUBSCRIBERS=/path/to/libxpti_syclur_collector.[so,dll,dylib]` +CHECK THIS!!! For more detail on the framework, the tests that are provided and their usage, please consult the [XPTI Framework library documentation](doc/XPTI_Framework.md). diff --git a/xptifw/samples/syclpi_collector/syclpi_collector.cpp b/xptifw/samples/syclur_collector/syclur_collector.cpp similarity index 93% rename from xptifw/samples/syclpi_collector/syclpi_collector.cpp rename to xptifw/samples/syclur_collector/syclur_collector.cpp index 7134db9949cf6..43e6081123a63 100644 --- a/xptifw/samples/syclpi_collector/syclpi_collector.cpp +++ b/xptifw/samples/syclur_collector/syclur_collector.cpp @@ -1,5 +1,5 @@ // -// An example collector/tool that prints out just the SYCL PI layer trace +// An example collector/tool that prints out just the SYCL UR layer trace // events // #include "xpti/xpti_trace_framework.h" @@ -32,15 +32,15 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version, const char *stream_name) { // The example basic collector under xptifw/samples/basic_collector takes in // streams from anyone as an example. In this collector, we will accept - // streams from just the SYCL plugin interface (PI) layer. + // streams from just the SYCL Unified Runtime (UR) layer. printf("Stream Name: %s\n", stream_name); if (std::string("sycl.pi") == stream_name) { // Register this stream to get the stream ID; This stream may already have // been registered by the framework and will return the previously // registered stream ID. In this sample, we subscribe to only the events - // generated by the SYCL PI layer. The protocol described by the PI layer + // generated by the SYCL UR layer. The protocol described by the UR layer // is that `user_data` field in the tpCallback() function will contain the - // SYCL PI function name. + // SYCL UR function name. GStreamID = xptiRegisterStream(stream_name); xptiRegisterCallback(GStreamID, (uint16_t)xpti::trace_point_type_t::function_begin, From 35079a5d4f8c6d1875e125002d6f7456889d0a07 Mon Sep 17 00:00:00 2001 From: Martin Morrison-Grant Date: Wed, 28 Aug 2024 12:38:15 +0100 Subject: [PATCH 2/3] [SYCL][XPTI][Doc] Further renames of sycl.pi to ur.call. --- .../design/SYCLInstrumentationUsingXPTI.md | 28 +++++++++---------- .../sycl_perf_collector.cpp | 4 +-- xptifw/samples/syclur_collector/README.md | 1 - .../syclur_collector/syclur_collector.cpp | 2 +- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sycl/doc/design/SYCLInstrumentationUsingXPTI.md b/sycl/doc/design/SYCLInstrumentationUsingXPTI.md index 71bde866cb55b..bac15cd555b91 100644 --- a/sycl/doc/design/SYCLInstrumentationUsingXPTI.md +++ b/sycl/doc/design/SYCLInstrumentationUsingXPTI.md @@ -225,19 +225,19 @@ trace point that includes an event, a trace point type and a notification. This document will outline the protocol for the streams of data being generated by the SYCL runtime. -## SYCL Stream `"sycl.pi"` Notification Signatures +## SYCL Stream `"ur.call"` Notification Signatures | Trace Point Type | Parameter Description | Metadata | | :--------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | -| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | -## SYCL Stream `"sycl.pi.debug"` Notification Signatures +## SYCL Stream `"ur.call.debug"` Notification Signatures | Trace Point Type | Parameter Description | Metadata | | :------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` if code location is not available or event ID with code location data.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | -| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` if code location is not available or event ID with code location data.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | +| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` if code location is not available or event ID with code location data.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | +| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` if code location is not available or event ID with code location data.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | ## SYCL Stream `"sycl"` Notification Signatures @@ -319,8 +319,8 @@ application. | Trace Point Type | Parameter Description | Metadata | | :--------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | -| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | ## SYCL Stream `"sycl.experimental.level_zero.debug"` Notification Signatures @@ -329,8 +329,8 @@ arguments made by SYCL application. | Trace Point Type | Parameter Description | Metadata | | :------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | -| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | +| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | +| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | ## SYCL Stream `"sycl.experimental.cuda.call"` Notification Signatures @@ -339,8 +339,8 @@ application. | Trace Point Type | Parameter Description | Metadata | | :--------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | -| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event.
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | +| `function_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_begin` event with the `function_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_begin`
  • **user_data**: Name of the function being called sent in as `const char *`
  • | None | ## SYCL Stream `"sycl.experimental.cuda.debug"` Notification Signatures @@ -349,6 +349,6 @@ arguments made by SYCL application. | Trace Point Type | Parameter Description | Metadata | | :------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | -| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `sycl.pi.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | +| `function_with_args_begin` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_begin` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event.
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, and arguments.
  • | None | +| `function_with_args_end` |
  • **trace_type**: `xpti::trace_point_type_t::function_with_args_end` that marks the beginning of a function
  • **parent**: Event ID created for all functions in the `ur.call.debug` layer.
  • **event**: `nullptr` - since the stream of data just captures functions being called.
  • **instance**: Unique ID to allow the correlation of the `function_with_args_begin` event with the `function_with_args_end` event. This value is guaranteed to be the same value received by the trace event for the corresponding `function_with_args_begin`
  • **user_data**: A pointer to `function_with_args_t` object, that includes function ID, name, arguments, and return value.
  • | None | diff --git a/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp b/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp index 106265f62d760..837aef05fe9d2 100644 --- a/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp +++ b/xptifw/samples/sycl_perf_collector/sycl_perf_collector.cpp @@ -41,7 +41,7 @@ event_instances_t *GRecordsInProgress = nullptr; xpti::utils::timer::measurement_t GMeasure; constexpr const char *GStreamBasic = "sycl"; -constexpr const char *GStreamPI = "sycl.pi"; +constexpr const char *GStreamPI = "ur.call"; constexpr const char *GStreamMemory = "sycl.experimental.mem_alloc"; constexpr const char *GStreamL0 = "sycl.experimental.level_zero.call"; constexpr const char *GStreamCuda = "sycl.experimental.cuda.call"; @@ -219,7 +219,7 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version, // characteristics that can be encapsulated in a launcher application // // 1. XPTI_SYCL_PERF_OUTPUT=[json,csv,table,stack,all] - // 2. XPTI_STREAMS=[all] or [sycl,sycl.pi,sycl.perf,sycl.perf.detail,...] + // 2. XPTI_STREAMS=[all] or [sycl,ur.call,sycl.perf,sycl.perf.detail,...] // 3. XPTI_STDOUT_USE_COLOR=[1,0] // 4. XPTI_IGNORE_LIST=piPlatformsGet,piProgramBuild // 5. XPTI_SIMULATION=10,20,50,100 diff --git a/xptifw/samples/syclur_collector/README.md b/xptifw/samples/syclur_collector/README.md index 64182729e610c..fc072410c7de2 100644 --- a/xptifw/samples/syclur_collector/README.md +++ b/xptifw/samples/syclur_collector/README.md @@ -22,6 +22,5 @@ an application instrumented with XPTI, the following steps must be performed. case is `libsyclur_collector.[so,dll,dylib]`. `XPTI_SUBSCRIBERS=/path/to/libxpti_syclur_collector.[so,dll,dylib]` -CHECK THIS!!! For more detail on the framework, the tests that are provided and their usage, please consult the [XPTI Framework library documentation](doc/XPTI_Framework.md). diff --git a/xptifw/samples/syclur_collector/syclur_collector.cpp b/xptifw/samples/syclur_collector/syclur_collector.cpp index 43e6081123a63..00939e54ba44b 100644 --- a/xptifw/samples/syclur_collector/syclur_collector.cpp +++ b/xptifw/samples/syclur_collector/syclur_collector.cpp @@ -34,7 +34,7 @@ XPTI_CALLBACK_API void xptiTraceInit(unsigned int major_version, // streams from anyone as an example. In this collector, we will accept // streams from just the SYCL Unified Runtime (UR) layer. printf("Stream Name: %s\n", stream_name); - if (std::string("sycl.pi") == stream_name) { + if (std::string("ur.call") == stream_name) { // Register this stream to get the stream ID; This stream may already have // been registered by the framework and will return the previously // registered stream ID. In this sample, we subscribe to only the events From 76b6c297f7850bb40af4328dabcfb05a255e326a Mon Sep 17 00:00:00 2001 From: Martin Morrison-Grant Date: Fri, 6 Sep 2024 15:17:09 +0100 Subject: [PATCH 3/3] [SYCL][XPTI][Doc] Update reference to PI in printf. --- xptifw/samples/syclur_collector/syclur_collector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xptifw/samples/syclur_collector/syclur_collector.cpp b/xptifw/samples/syclur_collector/syclur_collector.cpp index 00939e54ba44b..5e2deb16d22f6 100644 --- a/xptifw/samples/syclur_collector/syclur_collector.cpp +++ b/xptifw/samples/syclur_collector/syclur_collector.cpp @@ -80,6 +80,6 @@ XPTI_CALLBACK_API void tpCallback(uint16_t TraceType, be = "END"; else be = "BEGIN"; - printf("SYCL_PI: %-35s %s\n", Name, be); + printf("SYCL_UR: %-35s %s\n", Name, be); } }