Skip to content

Commit 2ea8d3a

Browse files
committed
[SYCL][XPTI] Addressing review feedback
Signed-off-by: Vasanth Tovinkere <[email protected]>
1 parent dd3bacd commit 2ea8d3a

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

sycl/source/detail/queue_impl.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,9 @@ void queue_impl::wait(const detail::code_location &CodeLoc) {
679679
void queue_impl::constructorNotification() {
680680
#if XPTI_ENABLE_INSTRUMENTATION
681681
if (xptiTraceEnabled()) {
682-
// Making it ABI compatible and not removing the member variable
683-
MStreamID = detail::GSYCLStreamID;
684682
constexpr uint16_t NotificationTraceType =
685683
static_cast<uint16_t>(xpti::trace_point_type_t::queue_create);
686-
if (xptiCheckTraceEnabled(MStreamID, NotificationTraceType)) {
684+
if (xptiCheckTraceEnabled(detail::GSYCLStreamID, NotificationTraceType)) {
687685
xpti::utils::StringHelper SH;
688686
std::string AddrStr = SH.addressAsString<size_t>(MQueueID);
689687
std::string QueueName = SH.nameWithAddressString("queue", AddrStr);
@@ -711,9 +709,10 @@ void queue_impl::constructorNotification() {
711709
reinterpret_cast<size_t>(getHandleRef()));
712710
// Also publish to TLS before notification
713711
xpti::framework::stash_tuple(XPTI_QUEUE_INSTANCE_ID_KEY, MQueueID);
714-
xptiNotifySubscribers(
715-
MStreamID, (uint16_t)xpti::trace_point_type_t::queue_create, nullptr,
716-
TEvent, MInstanceID, static_cast<const void *>("queue_create"));
712+
xptiNotifySubscribers(detail::GSYCLStreamID,
713+
(uint16_t)xpti::trace_point_type_t::queue_create,
714+
nullptr, TEvent, MInstanceID,
715+
static_cast<const void *>("queue_create"));
717716
}
718717
}
719718
#endif
@@ -723,10 +722,10 @@ void queue_impl::destructorNotification() {
723722
#if XPTI_ENABLE_INSTRUMENTATION
724723
constexpr uint16_t NotificationTraceType =
725724
static_cast<uint16_t>(xpti::trace_point_type_t::queue_destroy);
726-
if (xptiCheckTraceEnabled(MStreamID, NotificationTraceType)) {
725+
if (xptiCheckTraceEnabled(detail::GSYCLStreamID, NotificationTraceType)) {
727726
// Use the cached trace event, stream id and instance IDs for the
728727
// destructor
729-
xptiNotifySubscribers(MStreamID, NotificationTraceType, nullptr,
728+
xptiNotifySubscribers(detail::GSYCLStreamID, NotificationTraceType, nullptr,
730729
(xpti::trace_event_data_t *)MTraceEvent, MInstanceID,
731730
static_cast<const void *>("queue_destroy"));
732731
xptiReleaseEvent((xpti::trace_event_data_t *)MTraceEvent);

sycl/source/detail/queue_impl.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
105105
queue_impl(device_impl &Device, const async_handler &AsyncHandler,
106106
const property_list &PropList, private_tag tag)
107107
: queue_impl(Device, getDefaultOrNew(Device), AsyncHandler, PropList,
108-
tag) {};
108+
tag){};
109109

110110
/// Constructs a SYCL queue with an async_handler and property_list provided
111111
/// form a device and a context.
@@ -278,7 +278,8 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
278278
ur_native_handle_t nativeHandle = 0;
279279
getAdapter().call<UrApiKind::urQueueGetNativeHandle>(MQueue, nullptr,
280280
&nativeHandle);
281-
__SYCL_OCL_CALL(clRetainCommandQueue, ur::cast<cl_command_queue>(nativeHandle));
281+
__SYCL_OCL_CALL(clRetainCommandQueue,
282+
ur::cast<cl_command_queue>(nativeHandle));
282283
return ur::cast<cl_command_queue>(nativeHandle);
283284
}
284285

@@ -1036,8 +1037,6 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
10361037
// to ensure we have the same object layout when the macro in the library and
10371038
// SYCL app are not the same.
10381039
void *MTraceEvent = nullptr;
1039-
/// The stream under which the traces are emitted from the queue object
1040-
uint8_t MStreamID = 0;
10411040
/// The instance ID of the trace event for queue object
10421041
uint64_t MInstanceID = 0;
10431042

sycl/test-e2e/XPTI/basic_event_collection_linux.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
// CHECK-DAG: xptiTraceInit: Stream Name = sycl.experimental.image
1111
// CHECK-DAG: xptiTraceInit: Stream Name = sycl.experimental.mem_alloc
1212
// CHECK-DAG: xptiTraceInit: Stream Name = ur.api
13-
// CHECK-DAG: xptiTraceInit: Stream Name = ur.call
14-
// CHECK-DAG: Graph create
15-
// CHECK-DAG: UR Call Begin : urPlatformGet
16-
// CHECK-DAG: UR Call Begin : urContextCreate
17-
// CHECK-DAG: UR Call Begin : urQueueCreate
18-
// CHECK-DAG: UR Call Begin : urDeviceSelectBinary
13+
// CHECK: Graph create
14+
// CHECK: xptiTraceInit: Stream Name = ur.call
15+
// CHECK: UR Call Begin : urPlatformGet
16+
// CHECK: UR Call Begin : urContextCreate
17+
// CHECK: UR Call Begin : urQueueCreate
18+
// CHECK: UR Call Begin : urDeviceSelectBinary
1919
// CHECK: UR Call Begin : urKernelCreate
2020
// CHECK-NEXT: UR Call Begin : urPlatformGetInfo
2121
// CHECK-NEXT: UR Call Begin : urPlatformGetInfo

0 commit comments

Comments
 (0)