Skip to content

[SYCL] Add code location data to XPTI trace in case of exception thrown #8101

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

Merged
merged 38 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bbbe150
Add sycl level stream to xpti
KseniyaTikhomirova Jan 9, 2023
1e26df7
not working draft to emit notification
KseniyaTikhomirova Jan 9, 2023
f31d458
add draft for test
KseniyaTikhomirova Jan 11, 2023
b755296
Add more tests
KseniyaTikhomirova Jan 12, 2023
a5bbf26
Put kernel info to tls (not working)
KseniyaTikhomirova Jan 13, 2023
83da734
Fix parralel_for code info extraction
KseniyaTikhomirova Jan 16, 2023
b6a3338
Add basic unittests for other APIs
KseniyaTikhomirova Jan 16, 2023
0e70171
restore handler.hpp state
KseniyaTikhomirova Jan 16, 2023
a64195f
Add exception desciption to message
KseniyaTikhomirova Jan 16, 2023
2eafcbc
change string types
KseniyaTikhomirova Jan 16, 2023
35e9755
Save code location for async commands
KseniyaTikhomirova Jan 16, 2023
0f8ff4d
Try to trace failure in host task
KseniyaTikhomirova Jan 16, 2023
e9b046a
Add handling to host task exceptions
KseniyaTikhomirova Jan 17, 2023
8cd2264
Finish host task submission handling
KseniyaTikhomirova Jan 18, 2023
0b39cc4
Add kernel async execution handling
KseniyaTikhomirova Jan 18, 2023
e43141c
Add small timeout to make test stable
KseniyaTikhomirova Jan 18, 2023
3a0e455
small update for sycl-trace
KseniyaTikhomirova Jan 20, 2023
23d1b5f
Merge branch 'sycl' into xpti_tracepoints
KseniyaTikhomirova Jan 20, 2023
7792103
Add missed instrumentation to queue::parallel_for
KseniyaTikhomirova Jan 20, 2023
1813df1
change string format to better parse it
KseniyaTikhomirova Jan 23, 2023
89f9eed
Add details to test
KseniyaTikhomirova Jan 23, 2023
043ffdc
Rework way of code_location report
KseniyaTikhomirova Jan 25, 2023
b7130e6
Update unit tests
KseniyaTikhomirova Jan 25, 2023
2522163
code clean up
KseniyaTikhomirova Jan 26, 2023
6f65c99
fix LIT
KseniyaTikhomirova Jan 26, 2023
981142e
fix ABI break for xpti
KseniyaTikhomirova Feb 6, 2023
9894d95
fix code review comments
KseniyaTikhomirova Feb 13, 2023
509fe1f
code review comments, change stream name
KseniyaTikhomirova Feb 13, 2023
66c98a8
code review comments, replace xptiNotifySubscribers with tracepoint u…
KseniyaTikhomirova Feb 14, 2023
a38601e
Merge branch 'sycl' into xpti_tracepoints
KseniyaTikhomirova Feb 14, 2023
3bd6301
code review comments
KseniyaTikhomirova Feb 14, 2023
7cdaef5
Merge branch 'sycl' into xpti_tracepoints
KseniyaTikhomirova Feb 23, 2023
be35232
Add Diagnostics XPTI event to documentation
KseniyaTikhomirova Feb 23, 2023
3c38840
fix wording
KseniyaTikhomirova Feb 24, 2023
3d2733f
Fix code-review comments
KseniyaTikhomirova Mar 6, 2023
4bfed74
fix comments
KseniyaTikhomirova Mar 7, 2023
b8ccd32
Fix function definition
KseniyaTikhomirova Mar 8, 2023
c2a3cb7
fix comment
KseniyaTikhomirova Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sycl/doc/design/SYCLInstrumentationUsingXPTI.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ by the SYCL runtime.

## SYCL Stream `"sycl"` Notification Signatures

All trace point types in bold provide semantic information about the graph, nodes and edges and the toplogy of the asynchronous task graphs created by the runtime.
All trace point types in bold provide semantic information about the graph, nodes and edges and the topology of the asynchronous task graphs created by the runtime.
| Trace Point Type | Parameter Description | Metadata |
| :--------------: | :-------------------- | :------- |
| **`graph_create`** | <div style="text-align: left"><li>**trace_type**: `xpti::trace_point_type_t::graph_create` that marks the creation of an asynchronous graph.</li> <li> **parent**: `nullptr`</li> <li> **event**: The global asynchronous graph object ID. All other graph related events such as node and edge creation will always this ID as the parent ID. </li> <li> **instance**: Unique ID related to the event, but not a correlation ID as there are other events to correlate to. </li> <li> **user_data**: `nullptr`</li> <p></p> SYCL runtime will always have one instance of a graph object with many disjoint subgraphs that get created during the execution of an application. </div> | None |
Expand All @@ -256,6 +256,7 @@ All trace point types in bold provide semantic information about the graph, node
| `wait_end` | <div style="text-align: left"><li>**trace_type**: `xpti::trace_point_type_t::wait_end` that marks the beginning of the wait on an `event`</li> <li> **parent**: `nullptr`</li> <li> **event**: The event ID will reflect the ID of the command group object submission that created this event or a new event based on the combination of the string "queue.wait" and the address of the event. </li> <li> **instance**: Unique ID to allow the correlation of the `wait_begin` event with the `wait_end` event. </li> <li> **user_data**: String indicating `queue.wait` and the address of the event as `const char *` </li></div> | `sycl_device`, `sycl_device_type`, `sycl_device_name`, `sym_function_name`, `sym_source_file_name`, `sym_line_no`, `sym_column_no` |
| `barrier_begin` | <div style="text-align: left"><li>**trace_type**: `xpti::trace_point_type_t::barrier_begin` that marks the beginning of a barrier while enqueuing a command group object</li> <li> **parent**: The global graph event that is created during the `graph_create` event.</li> <li> **event**: The event ID will reflect the ID of the command group object that has encountered a barrier during the enqueue operation. </li> <li> **instance**: Unique ID to allow the correlation of the `barrier_begin` event with the `barrier_end` event. </li> <li> **user_data**: String indicating `enqueue.barrier` and the reason for the barrier as a `const char *` </li> <p></p>The reason for the barrier could be one of `Buffer locked by host accessor`, `Blocked by host task` or `Unknown reason`.</div> | <li> Computational Kernels </li> `sycl_device`, `sycl_device_type`, `sycl_device_name`, `kernel_name`, `from_source`, `sym_function_name`, `sym_source_file_name`, `sym_line_no`, `sym_column_no` <li>Memory operations</li> `memory_object`, `offset`, `access_range_start`, `access_range_end`, `allocation_type`, `copy_from`, `copy_to` |
| `barrier_end` | <div style="text-align: left"><li>**trace_type**: `xpti::trace_point_type_t::barrier_end` that marks the end of the barrier that is encountered during enqueue.</li> <li> **parent**: The global graph event that is created during the `graph_create` event.</li> <li> **event**: The event ID will reflect the ID of the command group object that has encountered a barrier during the enqueue operation. </li> <li> **instance**: Unique ID to allow the correlation of the `barrier_begin` event with the `barrier_end` event. </li> <li> **user_data**: String indicating `enqueue.barrier` and the reason for the barrier as a `const char *` </li> <p></p>The reason for the barrier could be one of `Buffer locked by host accessor`, `Blocked by host task` or `Unknown reason`.</div> | <li> Computational Kernels </li> `sycl_device`, `sycl_device_type`, `sycl_device_name`, `kernel_name`, `from_source`, `sym_function_name`, `sym_source_file_name`, `sym_line_no`, `sym_column_no` <li>Memory operations</li> `memory_object`, `offset`, `access_range_start`, `access_range_end`, `allocation_type`, `copy_from`, `copy_to` |
| `diagnostics` | <div style="text-align: left"><li>**trace_type**: `xpti::trace_point_type_t::diagnostics` that represents general purpose notifications. For example, it is emitted when an exception is thrown in SYCL runtime. </li> <li> **parent**: Set to NULL.</li> <li> **event**: The event ID will reflect the code location of notification origin, if available. </li> <li> **instance**: An instance ID that records the number of times this code location has been seen. </li> <li> **user_data**: String with diagnostic message as a `const char *` </li></div> | `sym_function_name`, `sym_source_file_name`, `sym_line_no`, `sym_column_no` |

### Metadata description

Expand Down
2 changes: 0 additions & 2 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ class __SYCL_EXPORT handler {
typename LambdaArgType>
void StoreLambda(KernelType KernelFunc) {
using KI = detail::KernelInfo<KernelName>;

constexpr bool IsCallableWithKernelHandler =
detail::KernelLambdaHasKernelHandlerArgT<KernelType,
LambdaArgType>::value;
Expand All @@ -669,7 +668,6 @@ class __SYCL_EXPORT handler {
KernelType *KernelPtr =
ResetHostKernel<KernelType, LambdaArgType, Dims>(KernelFunc);

using KI = sycl::detail::KernelInfo<KernelName>;
constexpr bool KernelHasName =
KI::getName() != nullptr && KI::getName()[0] != '\0';

Expand Down
53 changes: 37 additions & 16 deletions sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
/// \return a SYCL event object for the submitted command group.
template <typename T> event submit(T CGF _CODELOCPARAM(&CodeLoc)) {
_CODELOCARG(&CodeLoc);

detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
#if __SYCL_USE_FALLBACK_ASSERT
auto PostProcess = [this, &CodeLoc](bool IsKernel, bool KernelUsesAssert,
event &E) {
Expand Down Expand Up @@ -343,7 +343,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
template <typename T>
event submit(T CGF, queue &SecondaryQueue _CODELOCPARAM(&CodeLoc)) {
_CODELOCARG(&CodeLoc);

detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
#if __SYCL_USE_FALLBACK_ASSERT
auto PostProcess = [this, &SecondaryQueue, &CodeLoc](
bool IsKernel, bool KernelUsesAssert, event &E) {
Expand Down Expand Up @@ -432,7 +432,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
/// @param CodeLoc is the code location of the submit call (default argument)
void wait(_CODELOCONLYPARAM(&CodeLoc)) {
_CODELOCARG(&CodeLoc);

detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
wait_proxy(CodeLoc);
}

Expand All @@ -446,7 +446,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
/// @param CodeLoc is the code location of the submit call (default argument)
void wait_and_throw(_CODELOCONLYPARAM(&CodeLoc)) {
_CODELOCARG(&CodeLoc);

detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
wait_and_throw_proxy(CodeLoc);
}

Expand Down Expand Up @@ -1345,6 +1345,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
"sycl::queue.single_task() requires a kernel instead of command group. "
"Use queue.submit() instead");
_CODELOCARG(&CodeLoc);
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.template single_task<KernelName, KernelType, PropertiesT>(
Expand Down Expand Up @@ -1384,6 +1385,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
"sycl::queue.single_task() requires a kernel instead of command group. "
"Use queue.submit() instead");
_CODELOCARG(&CodeLoc);
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvent);
Expand Down Expand Up @@ -1427,6 +1429,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
"sycl::queue.single_task() requires a kernel instead of command group. "
"Use queue.submit() instead");
_CODELOCARG(&CodeLoc);
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvents);
Expand Down Expand Up @@ -1667,8 +1670,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
ext::oneapi::experimental::is_property_list<PropertiesT>::value,
event>
parallel_for(nd_range<Dims> Range, PropertiesT Properties, RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.template parallel_for<KernelName>(Range, Properties, Rest...);
Expand Down Expand Up @@ -1701,8 +1707,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
template <typename KernelName = detail::auto_name, int Dims,
typename... RestT>
event parallel_for(nd_range<Dims> Range, event DepEvent, RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvent);
Expand All @@ -1723,8 +1732,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
typename... RestT>
event parallel_for(nd_range<Dims> Range, const std::vector<event> &DepEvents,
RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvents);
Expand Down Expand Up @@ -1950,8 +1962,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
event>
parallel_for_impl(range<Dims> Range, PropertiesT Properties,
RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.template parallel_for<KernelName>(Range, Properties, Rest...);
Expand Down Expand Up @@ -1985,8 +2000,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
ext::oneapi::experimental::is_property_list<PropertiesT>::value, event>
parallel_for_impl(range<Dims> Range, event DepEvent, PropertiesT Properties,
RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvent);
Expand Down Expand Up @@ -2022,8 +2040,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
ext::oneapi::experimental::is_property_list<PropertiesT>::value, event>
parallel_for_impl(range<Dims> Range, const std::vector<event> &DepEvents,
PropertiesT Properties, RestT &&...Rest) {
// Actual code location needs to be captured from KernelInfo object.
const detail::code_location CodeLoc = {};
using KI = sycl::detail::KernelInfo<KernelName>;
constexpr detail::code_location CodeLoc(
KI::getFileName(), KI::getFunctionName(), KI::getLineNumber(),
KI::getColumnNumber());
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvents);
Expand Down
1 change: 0 additions & 1 deletion sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#2. Use AddLLVM to modify the build and access config options
#cmake_policy(SET CMP0057 NEW)
#include(AddLLVM)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc
Expand Down
50 changes: 50 additions & 0 deletions sycl/source/detail/global_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,49 @@ std::atomic_uint ObjectUsageCounter::MCounter{0};
GlobalHandler::GlobalHandler() = default;
GlobalHandler::~GlobalHandler() = default;

void GlobalHandler::InitXPTI() {
#ifdef XPTI_ENABLE_INSTRUMENTATION
// Let subscribers know a new stream is being initialized
getXPTIRegistry().initializeStream(SYCL_STREAM_NAME, GMajVer, GMinVer,
GVerStr);
xpti::payload_t SYCLPayload("SYCL Runtime Exceptions");
uint64_t SYCLInstanceNo;
GSYCLCallEvent = xptiMakeEvent("SYCL Try-catch Exceptions", &SYCLPayload,
xpti::trace_algorithm_event, xpti_at::active,
&SYCLInstanceNo);
#endif
}

void GlobalHandler::TraceEventXPTI(const char *Message) {
#ifdef XPTI_ENABLE_INSTRUMENTATION
if (!Message)
return;
if (xptiTraceEnabled()) {
// We have to handle the cases where: (1) we may have just the code location
// set and not UID and (2) UID set
detail::tls_code_loc_t Tls;
auto CodeLocation = Tls.query();

// Creating a tracepoint will convert a CodeLocation to UID, if not set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If TLS is not set, Tls.query() will return a codelocation object with all data set to null/0. To handle this condition, we may need additional guards. Apologies for missing this in the last review. The below code shows how we can handle this case by creating a unique string based on the message ptr and using that in our trace point. This will create a unique ID that will return a payload with a "Unknown Function" + [Address] for the function name.

bool ValidCL = CodeLocation.fileName() && CodeLocation.funtionName();
xpti::utils::StringHelper NG;
auto Name = NG.nameWithAddress<void *>("Unknown Function", const_cast<void *>(Message));
const char *FileName=nullptr, *FuncName = Name.c_str();
unsigned long LineNo = 0, ColNo = 0;

if (ValidCL) {
FileName = CodeLocation.fileName();
FuncName = CodeLocation.functionName();
LineNo = CodeLocation.lineNumber();
ColNo = CodeLocation.columnNumber();
}

xpti::framework::tracepoint_t TP(FileName, FuncName,LineNo, ColNo, nullptr);

...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tovinkere I would suggest to left responsibility how to treat absence of data to subscribers. Adding extra strings to this data brings more contracts between rt and xpti subscribers which I think could lead to confusion and necessity to align them each time we make any change.
If you will take a look at unit tests subscriber implementation - it handles it by its own and decides what to print. The same is for sycl-trace subscriber.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are sending in invalid event types on occasion where code location is not available, we should be documenting it or the "sycl" stream as one of the possibilities for the trace type in question so the callback handler can handle it. All other trace types that are a part of this stream will be sending in valid events, if I am not mistaken. Either we fix it in code or we add documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tovinkere why is it invalid event? If we not specify code location - event should be still valid. We still could trace exception using its message. When subscriber receives event it will check if it has code location since we have flags to check. Now we could not guarantee that any exception sent will contain code location - at least because not all APIs has instrumentation. But it is not the reason to not trace exceptions at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KseniyaTikhomirova The section in the documentation for the "sycl" stream should be updated to include expected inputs for xpti::trace_diagnostics.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing me to that, updated be35232 😊

xpti::framework::tracepoint_t TP(
CodeLocation.fileName(), CodeLocation.functionName(),
CodeLocation.lineNumber(), CodeLocation.columnNumber(), nullptr);

// The call to notify will have the signature of:
// (1) the stream defined in .stream()
// (2) The trace type equal to what is set by .trace_type()
// (3) Parent event set to NULL
// (4) Current event set to one created from CodeLocation and UID
// (5) An instance ID that records the number of times this code location
// has been seen (6) The message generated by the exception handler
TP.stream(SYCL_STREAM_NAME)
.trace_type(xpti::trace_point_type_t::diagnostics)
.notify(static_cast<const void *>(Message));
}

#endif
}

GlobalHandler *&GlobalHandler::getInstancePtr() {
static GlobalHandler *RTGlobalObjHandler = new GlobalHandler();
return RTGlobalObjHandler;
Expand All @@ -79,6 +122,13 @@ GlobalHandler *&GlobalHandler::getInstancePtr() {
GlobalHandler &GlobalHandler::instance() {
GlobalHandler *RTGlobalObjHandler = GlobalHandler::getInstancePtr();
assert(RTGlobalObjHandler && "Handler must not be deallocated earlier");

#ifdef XPTI_ENABLE_INSTRUMENTATION
static std::once_flag InitXPTIFlag;
if (xptiTraceEnabled()) {
std::call_once(InitXPTIFlag, [&]() { RTGlobalObjHandler->InitXPTI(); });
}
#endif
return *RTGlobalObjHandler;
}

Expand Down
7 changes: 7 additions & 0 deletions sycl/source/detail/global_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@ class GlobalHandler {
void drainThreadPool();
void prepareSchedulerToRelease();

void InitXPTI();
void TraceEventXPTI(const char *Message);

// For testing purposes only
void attachScheduler(Scheduler *Scheduler);

private:
#ifdef XPTI_ENABLE_INSTRUMENTATION
void *GSYCLCallEvent = nullptr;
#endif

friend void shutdown();
friend class ObjectUsageCounter;
static GlobalHandler *&getInstancePtr();
Expand Down
9 changes: 0 additions & 9 deletions sycl/source/detail/pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
#include "xpti/xpti_trace_framework.h"
#endif

#define STR(x) #x
#define SYCL_VERSION_STR \
"sycl " STR(__LIBSYCL_MAJOR_VERSION) "." STR(__LIBSYCL_MINOR_VERSION)

namespace sycl {
__SYCL_INLINE_VER_NAMESPACE(_V1) {
namespace detail {
Expand All @@ -54,11 +50,6 @@ xpti_td *GSYCLGraphEvent = nullptr;
xpti_td *GPICallEvent = nullptr;
/// Event to be used by PI layer calls with arguments
xpti_td *GPIArgCallEvent = nullptr;
/// Constants being used as placeholder until one is able to reliably get the
/// version of the SYCL runtime
constexpr uint32_t GMajVer = __LIBSYCL_MAJOR_VERSION;
constexpr uint32_t GMinVer = __LIBSYCL_MINOR_VERSION;
constexpr const char *GVerStr = SYCL_VERSION_STR;
#endif // XPTI_ENABLE_INSTRUMENTATION

template <sycl::backend BE> void *getPluginOpaqueData(void *OpaqueDataParam) {
Expand Down
Loading