Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 91fd21d

Browse files
authored
[SYCL] Change labels in inline asms to allow kernel cloning. (#274)
Signed-off-by: rdeodhar <[email protected]>
1 parent 4f3a3c0 commit 91fd21d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

SYCL/InlineAsm/asm_loop.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ struct KernelFunctor : WithInputBuffers<T, 2>, WithOutputBuffer<T> {
3434
".decl temp v_type=G type=d num_elts=8 align=dword\n"
3535
"mov (M1, 8) %0(0, 0)<1> 0x0:d\n"
3636
"cmp.le (M1, 8) P1 %1(0,0)<1;1,0> 0x0:d\n"
37-
"(P1) goto (M1, 8) label0\n"
37+
"(P1) goto (M1, 8) label0%=\n"
3838
"mov (M1, 8) temp(0,0)<1> 0x0:d\n"
39-
"label1:\n"
39+
"label1%=:\n"
4040
"add (M1, 8) temp(0,0)<1> temp(0,0)<1;1,0> 0x1:w\n"
4141
"add (M1, 8) %0(0,0)<1> %0(0,0)<1;1,0> %2(0,0)<1;1,0>\n"
4242
"cmp.lt (M1, 8) P2 temp(0,0)<0;8,1> %1(0,0)<0;8,1>\n"
43-
"(P2) goto (M1, 8) label1\n"
44-
"label0:"
43+
"(P2) goto (M1, 8) label1%=\n"
44+
"label0%=:"
4545
"}\n"
4646
: "+rw"(C[wiID])
4747
: "rw"(A[wiID]), "rw"(B[wiID]));

SYCL/InlineAsm/asm_switch.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ template <typename T = DataType> struct KernelFunctor : WithOutputBuffer<T> {
2525
".decl P2 v_type=P num_elts=1\n"
2626
".decl P3 v_type=P num_elts=1\n"
2727
"cmp.ne (M1_NM, 8) P1 %1(0,0)<0;1,0> 0x0:d\n"
28-
"(P1) goto (M1, 1) label0\n"
28+
"(P1) goto (M1, 1) label0%=\n"
2929
"mov (M1, 8) %0(0,0)<1> 0x9:d\n"
30-
"(P1) goto (M1, 1) label0\n"
31-
"label0:\n"
30+
"(P1) goto (M1, 1) label0%=\n"
31+
"label0%=:\n"
3232
"cmp.ne (M1_NM, 8) P2 %1(0,0)<0;1,0> 0x1:d\n"
33-
"(P2) goto (M1, 1) label1\n"
33+
"(P2) goto (M1, 1) label1%=\n"
3434
"mov (M1, 8) %0(0,0)<1> 0x8:d\n"
35-
"label1:\n"
35+
"label1%=:\n"
3636
"cmp.ne (M1_NM, 8) P3 %1(0,0)<0;1,0> 0x2:d\n"
37-
"(P3) goto (M1, 1) label2\n"
37+
"(P3) goto (M1, 1) label2%=\n"
3838
"mov (M1, 8) %0(0,0)<1> 0x7:d\n"
39-
"label2:"
39+
"label2%=:"
4040
"}\n"
4141
: "=rw"(Output)
4242
: "rw"(switchField));

0 commit comments

Comments
 (0)