Skip to content

Commit 4b43eb7

Browse files
add one more test and fix
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent ae227b0 commit 4b43eb7

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

sycl/source/detail/scheduler/commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,7 @@ std::pair<xpti_td *, uint64_t> emitKernelInstrumentationData(
20942094
void ExecCGCommand::emitInstrumentationData() {
20952095
#ifdef XPTI_ENABLE_INSTRUMENTATION
20962096
constexpr uint16_t NotificationTraceType = xpti::trace_node_create;
2097-
if (!xptiCheckTraceEnabled(MStreamID, NotificationTraceType))
2097+
if (!xptiCheckTraceEnabled(MStreamID))
20982098
return;
20992099

21002100
std::string KernelName;
@@ -3200,7 +3200,7 @@ void KernelFusionCommand::resetQueue() {
32003200
void KernelFusionCommand::emitInstrumentationData() {
32013201
#ifdef XPTI_ENABLE_INSTRUMENTATION
32023202
constexpr uint16_t NotificationTraceType = xpti::trace_node_create;
3203-
if (!xptiCheckTraceEnabled(MStreamID, NotificationTraceType)) {
3203+
if (!xptiCheckTraceEnabled(MStreamID)) {
32043204
return;
32053205
}
32063206
// Create a payload with the command name and an event using this payload to
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// REQUIRES: cpu
2+
// UNSUPPORTED: windows
3+
// RUN: %{build} -o %t.out
4+
// RUN: %{run} sycl-trace --sycl --print-format=verbose %t.out | FileCheck %s
5+
6+
#include <sycl/sycl.hpp>
7+
8+
int main() {
9+
{
10+
sycl::queue Q;
11+
unsigned char *AllocSrc = (unsigned char *)sycl::malloc_device(1, Q);
12+
unsigned char *AllocDst = (unsigned char *)sycl::malloc_device(1, Q);
13+
Q.submit([&](sycl::handler &cgh)
14+
15+
{ cgh.memset(AllocSrc, 0, 1); })
16+
.wait();
17+
// CHECK: [SYCL] Task begin (event={{.*}},instanceID={{.*}})
18+
// CHECK-DAG: queue_id : 0
19+
// CHECK-DAG: sym_column_no : {{.*}}
20+
// CHECK-DAG: sym_function_name : {{.*}}
21+
// CHECK-DAG: kernel_name : {{.*}}
22+
// CHECK-DAG: sym_source_file_name : {{.*}}/task_execution_handler.cpp
23+
// CHECK-DAG: sycl_device_name : {{.*}}
24+
// CHECK-DAG: sycl_device_type : {{.*}}
25+
// CHECK-DAG: sym_line_no : {{.*}}
26+
// CHECK-DAG: sycl_device : {{.*}}
27+
// CHECK-NEXT: [SYCL] Task end (event={{.*}},instanceID={{.*}})
28+
// CHECK-NEXT: [SYCL] Task begin (event={{.*}},instanceID={{.*}})
29+
// CHECK-DAG: queue_id : 0
30+
// CHECK-DAG: sym_column_no : {{.*}}
31+
// CHECK-DAG: sym_function_name : {{.*}}
32+
// CHECK-DAG: kernel_name : {{.*}}
33+
// CHECK-DAG: sym_source_file_name : {{.*}}/task_execution_handler.cpp
34+
// CHECK-DAG: sycl_device_name : {{.*}}
35+
// CHECK-DAG: sycl_device_type : {{.*}}
36+
// CHECK-DAG: sym_line_no : {{.*}}
37+
// CHECK-DAG: sycl_device : {{.*}}
38+
// CHECK-NEXT: [SYCL] Task end (event={{.*}},instanceID={{.*}})
39+
Q.submit([&](sycl::handler &cgh)
40+
41+
{ cgh.memcpy(AllocDst, AllocSrc, 1); })
42+
.wait();
43+
sycl::free(AllocSrc, Q);
44+
sycl::free(AllocDst, Q);
45+
}
46+
return 0;
47+
}

0 commit comments

Comments
 (0)