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

Commit 34cc29e

Browse files
[ESIMD] Check preserving -vc-codegen option for ESIMD kernels
1 parent 9c4dba0 commit 34cc29e

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

SYCL/ESIMD/sycl_esimd_mix.cpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
// REQUIRES: gpu
1212
// UNSUPPORTED: cuda
1313
// RUN: %clangxx -fsycl %s -o %t.out
14-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
14+
// RUN: env SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK,CHECK-NO-VAR
15+
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK,CHECK-WITH-VAR
1516

1617
#include "esimd_test_utils.hpp"
1718

@@ -120,3 +121,25 @@ int main(void) {
120121
}
121122
return 0;
122123
}
124+
125+
// Regular SYCL kernel is compiled without -vc-codegen option
126+
127+
// CHECK-LABEL: ---> piProgramBuild(
128+
// CHECK-NOT: -vc-codegen
129+
// CHECK-WITH-VAR: -g
130+
// CHECK-NOT: -vc-codegen
131+
// CHECK: ) ---> pi_result : PI_SUCCESS
132+
// CHECK-LABEL: ---> piKernelCreate(
133+
// CHECK: <const char *>: {{.*}}SyclKernel
134+
// CHECK: ) ---> pi_result : PI_SUCCESS
135+
136+
// For ESIMD kernels, -vc-codegen option is always preserved,
137+
// regardless of SYCL_PROGRAM_COMPILE_OPTIONS value.
138+
139+
// CHECK-LABEL: ---> piProgramBuild(
140+
// CHECK-NO-VAR: -vc-codegen
141+
// CHECK-WITH-VAR: -g -vc-codegen
142+
// CHECK: ) ---> pi_result : PI_SUCCESS
143+
// CHECK-LABEL: ---> piKernelCreate(
144+
// CHECK: <const char *>: {{.*}}EsimdKernel
145+
// CHECK: ) ---> pi_result : PI_SUCCESS

0 commit comments

Comments
 (0)