From 34cc29efc2383f1976e98d6ca06d25ba634060bd Mon Sep 17 00:00:00 2001 From: Denis Bakhvalov Date: Wed, 14 Apr 2021 17:43:23 -0700 Subject: [PATCH] [ESIMD] Check preserving -vc-codegen option for ESIMD kernels --- SYCL/ESIMD/sycl_esimd_mix.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/SYCL/ESIMD/sycl_esimd_mix.cpp b/SYCL/ESIMD/sycl_esimd_mix.cpp index 1633b1c1a9..7bafdd3e38 100644 --- a/SYCL/ESIMD/sycl_esimd_mix.cpp +++ b/SYCL/ESIMD/sycl_esimd_mix.cpp @@ -11,7 +11,8 @@ // REQUIRES: gpu // UNSUPPORTED: cuda // RUN: %clangxx -fsycl %s -o %t.out -// RUN: %GPU_RUN_PLACEHOLDER %t.out +// RUN: env SYCL_PI_TRACE=-1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER --check-prefixes=CHECK,CHECK-NO-VAR +// 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 #include "esimd_test_utils.hpp" @@ -120,3 +121,25 @@ int main(void) { } return 0; } + +// Regular SYCL kernel is compiled without -vc-codegen option + +// CHECK-LABEL: ---> piProgramBuild( +// CHECK-NOT: -vc-codegen +// CHECK-WITH-VAR: -g +// CHECK-NOT: -vc-codegen +// CHECK: ) ---> pi_result : PI_SUCCESS +// CHECK-LABEL: ---> piKernelCreate( +// CHECK: : {{.*}}SyclKernel +// CHECK: ) ---> pi_result : PI_SUCCESS + +// For ESIMD kernels, -vc-codegen option is always preserved, +// regardless of SYCL_PROGRAM_COMPILE_OPTIONS value. + +// CHECK-LABEL: ---> piProgramBuild( +// CHECK-NO-VAR: -vc-codegen +// CHECK-WITH-VAR: -g -vc-codegen +// CHECK: ) ---> pi_result : PI_SUCCESS +// CHECK-LABEL: ---> piKernelCreate( +// CHECK: : {{.*}}EsimdKernel +// CHECK: ) ---> pi_result : PI_SUCCESS