Skip to content

Commit 7b30bd4

Browse files
committed
Another code review fix and clang fixes.
1 parent 015a364 commit 7b30bd4

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2144,7 +2144,6 @@ void ExecCGCommand::emitInstrumentationData() {
21442144
return;
21452145

21462146
std::string KernelName;
2147-
std::string FuncName;
21482147
std::optional<bool> FromSource;
21492148
switch (MCommandGroup->getType()) {
21502149
case detail::CGType::Kernel: {
@@ -2161,6 +2160,7 @@ void ExecCGCommand::emitInstrumentationData() {
21612160

21622161
// If code location is above sycl layer, use function name from code
21632162
// location instead of kernel name in event payload
2163+
std::string FuncName;
21642164
if (!MCommandGroup->MIsTopCodeLoc)
21652165
FuncName = MCommandGroup->MFunctionName;
21662166

sycl/unittests/xpti_trace/NodeCreation.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <gmock/gmock.h>
1616
#include <gtest/gtest.h>
1717

18-
#include <sycl/sycl.hpp>
1918
#include <sycl/ext/oneapi/experimental/graph.hpp>
19+
#include <sycl/sycl.hpp>
2020

2121
using ::testing::HasSubstr;
2222
using namespace sycl;
@@ -96,7 +96,8 @@ TEST_F(NodeCreation, QueueParallelForWithUserCodeLoc) {
9696
sycl::queue Q;
9797
try {
9898
sycl::buffer<int, 1> buf(sycl::range<1>(1));
99-
sycl::detail::tls_code_loc_t myLoc({"LOCAL_CODELOC_FILE", "LOCAL_CODELOC_NAME", 1, 1});
99+
sycl::detail::tls_code_loc_t myLoc(
100+
{"LOCAL_CODELOC_FILE", "LOCAL_CODELOC_NAME", 1, 1});
100101
Q.submit(
101102
[&](handler &Cgh) {
102103
sycl::accessor acc(buf, Cgh, sycl::read_write);
@@ -148,16 +149,17 @@ TEST_F(NodeCreation, QueueMemsetNode) {
148149
TEST_F(NodeCreation, CommandGraphRecord) {
149150
sycl::queue Q;
150151
try {
151-
sycl::ext::oneapi::experimental::command_graph cmdGraph(Q.get_context(), Q.get_device());
152+
sycl::ext::oneapi::experimental::command_graph cmdGraph(Q.get_context(),
153+
Q.get_device());
152154

153155
cmdGraph.begin_recording(Q);
154156

155157
{
156-
sycl::detail::tls_code_loc_t myLoc({"LOCAL_CODELOC_FILE", "LOCAL_CODELOC_NAME", 1, 1});
157-
Q.submit(
158-
[&](handler &Cgh) {
159-
Cgh.parallel_for<TestKernel<KernelSize>>(1, [=](sycl::id<1> idx) {});
160-
});
158+
sycl::detail::tls_code_loc_t myLoc(
159+
{"LOCAL_CODELOC_FILE", "LOCAL_CODELOC_NAME", 1, 1});
160+
Q.submit([&](handler &Cgh) {
161+
Cgh.parallel_for<TestKernel<KernelSize>>(1, [=](sycl::id<1> idx) {});
162+
});
161163
}
162164

163165
cmdGraph.end_recording(Q);
@@ -188,14 +190,14 @@ TEST_F(NodeCreation, CommandGraphRecord) {
188190
TEST_F(NodeCreation, CommandGraphAddAPI) {
189191
sycl::queue Q;
190192
try {
191-
sycl::ext::oneapi::experimental::command_graph cmdGraph(Q.get_context(), Q.get_device());
193+
sycl::ext::oneapi::experimental::command_graph cmdGraph(Q.get_context(),
194+
Q.get_device());
192195

193196
auto doAddNode = [&](const sycl::detail::code_location &loc) {
194197
sycl::detail::tls_code_loc_t codeLoc(loc);
195-
return cmdGraph.add(
196-
[&](handler &Cgh) {
197-
Cgh.parallel_for<TestKernel<KernelSize>>(1, [=](sycl::id<1> idx) {});
198-
});
198+
return cmdGraph.add([&](handler &Cgh) {
199+
Cgh.parallel_for<TestKernel<KernelSize>>(1, [=](sycl::id<1> idx) {});
200+
});
199201
};
200202

201203
auto node1 = doAddNode({"LOCAL_CODELOC_FILE", "LOCAL_NODE_1", 1, 1});

0 commit comments

Comments
 (0)