Skip to content

Commit d394e8e

Browse files
committed
Fix Clang-format issues
Signed-off-by: Soumi Manna <[email protected]>
1 parent d4eba22 commit d394e8e

18 files changed

+44
-39
lines changed

sycl/test/inline-asm/asm_16_empty.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
25-
// clang-format on
25+
// clang-format on
2626
C[wiID] = 43;
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm volatile("");

sycl/test/inline-asm/asm_16_matrix_mult.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
25-
// clang-format on
25+
// clang-format on
2626
volatile int output = 0;
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm volatile("mov (M1,16) %0(0,0)<1> 0x7:d"

sycl/test/inline-asm/asm_16_no_input_int.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
25-
// clang-format on
25+
// clang-format on
2626
volatile int output = 0;
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm volatile("mov (M1,16) %0(0,0)<1> 0x7:d"

sycl/test/inline-asm/asm_16_no_opts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
25-
// clang-format on
25+
// clang-format on
2626
for (int i = 0; i < 10; ++i) {
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm("fence_sw");

sycl/test/inline-asm/asm_8_empty.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
25-
// clang-format on
25+
// clang-format on
2626
C[wiID] = 43;
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm volatile("");

sycl/test/inline-asm/asm_8_no_input_int.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
25-
// clang-format on
25+
// clang-format on
2626
volatile int output = 0;
2727
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2828
asm volatile("mov (M1,8) %0(0,0)<1> 0x7:d"

sycl/test/inline-asm/asm_decl_in_scope.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ struct KernelFunctor : WithInputBuffers<T, 2>, WithOutputBuffer<T> {
2222
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2323

2424
cgh.parallel_for<KernelFunctor<T>>(
25-
// clang-format off
25+
// clang-format off
2626
cl::sycl::range<1>{this->getOutputBufferSize()},
2727
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
28-
// clang-format on
28+
// clang-format on
2929
// declaration of temp within and outside the scope
3030
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3131
asm("{\n"

sycl/test/inline-asm/asm_float_add.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ struct KernelFunctor : WithInputBuffers<T, 2>, WithOutputBuffer<T> {
2323
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2424

2525
cgh.parallel_for<KernelFunctor<T>>(
26-
// clang-format off
26+
// clang-format off
2727
cl::sycl::range<1>{this->getOutputBufferSize()},
2828
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
29-
// clang-format on
29+
// clang-format on
3030
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3131
asm("add (M1, 8) %0(0, 0)<1> %1(0, 0)<1;1,0> %2(0, 0)<1;1,0>"
3232
: "=rw"(C[wiID])

sycl/test/inline-asm/asm_float_neg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ struct KernelFunctor : WithInputBuffers<T, 1>, WithOutputBuffer<T> {
2121
auto B = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2222

2323
cgh.parallel_for<KernelFunctor<T>>(
24-
// clang-format off
24+
// clang-format off
2525
cl::sycl::range<1>{this->getOutputBufferSize()},
2626
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
27-
// clang-format on
27+
// clang-format on
2828
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2929
asm("mov (M1, 8) %0(0, 0)<1> (-)%1(0, 0)<1;1,0>"
3030
: "=rw"(B[wiID])

sycl/test/inline-asm/asm_mul.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ struct KernelFunctor : WithInputBuffers<T, 2>, WithOutputBuffer<T> {
2121
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2222

2323
cgh.parallel_for<KernelFunctor<T>>(
24-
// clang-format off
24+
// clang-format off
2525
cl::sycl::range<1>{this->getOutputBufferSize()},
2626
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
27-
// clang-format on
27+
// clang-format on
2828
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2929
asm("mul (M1, 8) %0(0, 0)<1> %1(0, 0)<1;1,0> %2(0, 0)<1;1,0>"
3030
: "=rw"(C[wiID])

sycl/test/inline-asm/asm_multiple_instructions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ struct KernelFunctor : WithInputBuffers<T, 3>, WithOutputBuffer<T> {
2626
auto D = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2727

2828
cgh.parallel_for<KernelFunctor<T>>(
29-
// clang-format off
29+
// clang-format off
3030
cl::sycl::range<1>{this->getOutputBufferSize()},
3131
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
32-
// clang-format on
32+
// clang-format on
3333
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3434
asm("{\n"
3535
"add (M1, 8) %1(0, 0)<1> %1(0, 0)<1;1,0> %2(0, 0)<1;1,0>\n"

sycl/test/inline-asm/asm_no_operands.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ int main() {
2727
cgh.parallel_for<no_operands_kernel>(
2828
NumOfWorkItems, [=](cl::sycl::id<1> WIid)
2929
[[intel::reqd_sub_group_size(8)]] {
30+
// clang-format off
3031
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3132
asm("barrier");
3233
#endif
33-
});
34+
});
35+
// clang-format on
3436
});
3537
}

sycl/test/inline-asm/asm_no_output.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ struct KernelFunctor : WithOutputBuffer<T> {
1919
void operator()(cl::sycl::handler &cgh) {
2020
auto C = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2121
cgh.parallel_for<KernelFunctor<T>>(
22-
// clang-format off
22+
// clang-format off
2323
cl::sycl::range<1>{this->getOutputBufferSize()},
2424
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(8)]] {
25-
// clang-format on
25+
// clang-format on
2626
volatile int local_var = 47;
2727
local_var += C[0];
2828
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)

sycl/test/inline-asm/asm_plus_mod.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ struct KernelFunctor : WithInputBuffers<T, 1>, WithOutputBuffer<T> {
2121
auto B = this->getOutputBuffer().template get_access<cl::sycl::access::mode::write>(cgh);
2222

2323
cgh.parallel_for<KernelFunctor<T>>(
24-
// clang-format off
24+
// clang-format off
2525
cl::sycl::range<1>{this->getOutputBufferSize()},
2626
[=](cl::sycl::id<1> wiID) [[intel::reqd_sub_group_size(16)]] {
27-
// clang-format on
27+
// clang-format on
2828
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
2929
asm("add (M1, 16) %0(0, 0)<1> %0(0, 0)<1;1,0> %1(0, 0)<1;1,0>"
3030
: "+rw"(B[wiID])

sycl/test/inline-asm/letter_example.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ int main() {
2828
}
2929
q.submit([&](cl::sycl::handler &cgh) {
3030
cgh.parallel_for<kernel_name>(
31-
cl::sycl::range<1>(problem_size), [=](cl::sycl::id<1> idx)
32-
// clang-format off
33-
[[intel::reqd_sub_group_size(16)]] {
34-
// clang-format on
31+
// clang-format off
32+
cl::sycl::range<1>(problem_size),
33+
[=](cl::sycl::id<1> idx) [[intel::reqd_sub_group_size(16)]] {
34+
// clang-format on
3535
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3636
int i = idx[0];
3737
asm volatile("{\n.decl V52 v_type=G type=d num_elts=16 align=GRF\n"

sycl/test/inline-asm/malloc_shared_32.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ int main() {
3535

3636
q.submit([&](cl::sycl::handler &cgh) {
3737
cgh.parallel_for<kernel_name>(
38-
// clang-format off
38+
// clang-format off
3939
cl::sycl::range<1>(problem_size),
4040
[=](cl::sycl::id<1> idx) [[intel::reqd_sub_group_size(32)]] {
41-
// clang-format on
41+
// clang-format on
4242
int i = idx[0];
4343
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
4444
asm volatile(R"a(
@@ -58,15 +58,18 @@ int main() {
5858
svm_scatter.4.1 (M1, 16) %0.0 V52.0
5959
svm_scatter.4.1 (M1, 16) %1.0 V53.0
6060
}
61+
// clang-format off
6162
)a" ::"rw"(&b[i]),
62-
"rw"(&b[i] + 16), "rw"(&a[i]), "rw"(&a[i] + 16), "rw"(&c[i]),
63+
"rw"(&b[i] + 16), "rw"(&a[i]), "rw"(&a[i] + 16), "rw"(&c[i]),
6364
"rw"(&c[i] + 16));
6465
#else
6566
b[i] = a[i] * c[i];
6667
#endif
67-
});
68+
});
69+
6870
}).wait();
6971

72+
// clang-format on
7073
bool currect = true;
7174
for (int i = 0; i < problem_size; i++) {
7275
if (b[i] != a[i] * c[i]) {

sycl/test/inline-asm/malloc_shared_in_out_dif.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ int main() {
3131

3232
q.submit([&](cl::sycl::handler &cgh) {
3333
cgh.parallel_for<kernel_name>(
34-
// clang-format off
34+
// clang-format off
3535
cl::sycl::range<1>(problem_size),
3636
[=](cl::sycl::id<1> idx) [[intel::reqd_sub_group_size(16)]] {
37-
// clang-format on
37+
// clang-format on
3838
int i = idx[0];
3939
volatile int tmp = a[i];
4040
tmp += 1;

sycl/test/inline-asm/malloc_shared_no_input.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ int main() {
2828

2929
q.submit([&](cl::sycl::handler &cgh) {
3030
cgh.parallel_for<kernel_name>(
31-
// clang-format off
31+
// clang-format off
3232
cl::sycl::range<1>(problem_size),
3333
[=](cl::sycl::id<1> idx) [[intel::reqd_sub_group_size(16)]] {
34-
// clang-format on
34+
// clang-format on
3535
int i = idx[0];
3636
#if defined(INLINE_ASM) && defined(__SYCL_DEVICE_ONLY__)
3737
asm volatile("mov (M1, 16) %0(0,0)<1> 0x7:d"

0 commit comments

Comments
 (0)