From 0909cfb7bf61531e13fc78202972885d62660a0c Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Wed, 29 Jul 2020 19:57:08 +0300 Subject: [PATCH 1/3] [SYCL] Enable standard optimization pipeline for device code by default Add new compiler flag to disable optimizations at compile time: -fno-sycl-std-optimizations Temporally disable optimizations in some LIT tests. --- clang/include/clang/Driver/Options.td | 3 +-- clang/lib/Driver/ToolChains/Clang.cpp | 5 +++++ clang/lib/Frontend/CompilerInvocation.cpp | 2 +- clang/test/CodeGenSYCL/inline_asm.cpp | 2 +- clang/test/CodeGenSYCL/remove-ur-inst.cpp | 2 +- sycl/test/basic_tests/accessor/accessor.cpp | 2 +- sycl/test/basic_tests/boolean.cpp | 2 +- sycl/test/basic_tests/stream/stream.cpp | 2 +- sycl/test/check_device_code/fpga_ihs_float.cpp | 2 +- sycl/test/fpga_tests/fpga_lsu.cpp | 2 +- sycl/test/hier_par/hier_par_wgscope.cpp | 2 +- sycl/test/regression/group.cpp | 2 +- sycl/test/spec_const/spec_const_hw.cpp | 2 +- sycl/test/sub_group/generic_reduce.cpp | 4 ++-- sycl/test/sub_group/load_store.cpp | 2 +- sycl/test/sub_group/scan_fp16.cpp | 2 +- sycl/test/sub_group/shuffle.cpp | 2 +- sycl/test/sub_group/shuffle_fp16.cpp | 2 +- sycl/test/sub_group/shuffle_fp64.cpp | 2 +- 19 files changed, 24 insertions(+), 20 deletions(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 96a5968175c37..496d12abbbcd7 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -3530,6 +3530,7 @@ def fsycl_esimd : Flag<["-"], "fsycl-explicit-simd">, Group, Flags<[ HelpText<"Enable SYCL explicit SIMD extension">; def fno_sycl_esimd : Flag<["-"], "fno-sycl-explicit-simd">, Group, HelpText<"Disable SYCL explicit SIMD extension">, Flags<[NoArgumentUnused, CoreOption]>; +defm sycl_std_optimizations : OptOutFFlag<"sycl-std-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler">; //===----------------------------------------------------------------------===// // CC1 Options @@ -4454,8 +4455,6 @@ def fsycl_std_layout_kernel_params: Flag<["-"], "fsycl-std-layout-kernel-params" def fsycl_allow_func_ptr : Flag<["-"], "fsycl-allow-func-ptr">, HelpText<"Allow function pointers in SYCL device.">; def fno_sycl_allow_func_ptr : Flag<["-"], "fno-sycl-allow-func-ptr">; -def fsycl_enable_optimizations: Flag<["-"], "fsycl-enable-optimizations">, - HelpText<"Experimental flag enabling standard optimization in the front-end.">; } // let Flags = [CC1Option] diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 64a03682bb748..c47bf377f0ad5 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4102,6 +4102,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasFlag(options::OPT_fsycl_esimd, options::OPT_fno_sycl_esimd, false)) CmdArgs.push_back("-fsycl-explicit-simd"); + + if (!Args.hasFlag(options::OPT_fsycl_std_optimizations, + options::OPT_fno_sycl_std_optimizations, true)) + CmdArgs.push_back("-fno-sycl-std-optimizations"); + // Pass the triple of host when doing SYCL auto AuxT = llvm::Triple(llvm::sys::getProcessTriple()); std::string NormalizedTriple = AuxT.normalize(); diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index b64c7105a142f..8d4ebebb7da24 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -823,7 +823,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.DisableLLVMPasses = Args.hasArg(OPT_disable_llvm_passes) || (Args.hasArg(OPT_fsycl_is_device) && Triple.isSPIR() && - !Args.hasArg(OPT_fsycl_enable_optimizations) && !IsSyclESIMD); + Args.hasArg(OPT_fno_sycl_std_optimizations) && !IsSyclESIMD); Opts.DisableLifetimeMarkers = Args.hasArg(OPT_disable_lifetimemarkers); const llvm::Triple::ArchType DebugEntryValueArchs[] = { diff --git a/clang/test/CodeGenSYCL/inline_asm.cpp b/clang/test/CodeGenSYCL/inline_asm.cpp index 60015f8ca6a82..db1956673a15a 100644 --- a/clang/test/CodeGenSYCL/inline_asm.cpp +++ b/clang/test/CodeGenSYCL/inline_asm.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-enable-optimizations -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s class kernel; diff --git a/clang/test/CodeGenSYCL/remove-ur-inst.cpp b/clang/test/CodeGenSYCL/remove-ur-inst.cpp index 7866aff7f07a3..cf70f7c61f435 100644 --- a/clang/test/CodeGenSYCL/remove-ur-inst.cpp +++ b/clang/test/CodeGenSYCL/remove-ur-inst.cpp @@ -1,5 +1,5 @@ +// RUN: %clang_cc1 -fsycl -fsycl-is-device -fno-sycl-std-optimizations -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-enable-optimizations -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s SYCL_EXTERNAL void doesNotReturn() throw() __attribute__((__noreturn__)); diff --git a/sycl/test/basic_tests/accessor/accessor.cpp b/sycl/test/basic_tests/accessor/accessor.cpp index 413ed9ddd0c13..d029ec247e79f 100644 --- a/sycl/test/basic_tests/accessor/accessor.cpp +++ b/sycl/test/basic_tests/accessor/accessor.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/boolean.cpp b/sycl/test/basic_tests/boolean.cpp index cac65ddaa80bd..c022a74f165d0 100644 --- a/sycl/test/basic_tests/boolean.cpp +++ b/sycl/test/basic_tests/boolean.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/stream/stream.cpp b/sycl/test/basic_tests/stream/stream.cpp index 6b5e6925298d1..4ef7d838a11ef 100644 --- a/sycl/test/basic_tests/stream/stream.cpp +++ b/sycl/test/basic_tests/stream/stream.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s // RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER // RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER diff --git a/sycl/test/check_device_code/fpga_ihs_float.cpp b/sycl/test/check_device_code/fpga_ihs_float.cpp index f452fc2517c35..d12f48b168ae6 100644 --- a/sycl/test/check_device_code/fpga_ihs_float.cpp +++ b/sycl/test/check_device_code/fpga_ihs_float.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // RUN: %clangxx -I %sycl_include -S -emit-llvm -fsycl -fsycl-device-only %s -o - | FileCheck %s -// RUN: %clangxx -I %sycl_include -S -emit-llvm -fsycl -fsycl-device-only %s -Xclang -fsycl-enable-optimizations -o - | FileCheck %s +// RUN: %clangxx -I %sycl_include -S -emit-llvm -fsycl -fno-sycl-std-optimizations -fsycl-device-only %s -o - | FileCheck %s #include "CL/__spirv/spirv_ops.hpp" diff --git a/sycl/test/fpga_tests/fpga_lsu.cpp b/sycl/test/fpga_tests/fpga_lsu.cpp index 65b35e09dbd69..ad7091850c2d4 100644 --- a/sycl/test/fpga_tests/fpga_lsu.cpp +++ b/sycl/test/fpga_tests/fpga_lsu.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations %s -o %t.out // RUNx: %ACC_RUN_PLACEHOLDER %t.out //==----------------- fpga_lsu.cpp - SYCL FPGA LSU test --------------------==// // diff --git a/sycl/test/hier_par/hier_par_wgscope.cpp b/sycl/test/hier_par/hier_par_wgscope.cpp index 6c608b35ab142..50c37849cbf70 100644 --- a/sycl/test/hier_par/hier_par_wgscope.cpp +++ b/sycl/test/hier_par/hier_par_wgscope.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/regression/group.cpp b/sycl/test/regression/group.cpp index c53dc3cc64360..de9aad2f70bb8 100644 --- a/sycl/test/regression/group.cpp +++ b/sycl/test/regression/group.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/spec_const/spec_const_hw.cpp b/sycl/test/spec_const/spec_const_hw.cpp index b8d161cbac204..9add174a1a66d 100644 --- a/sycl/test/spec_const/spec_const_hw.cpp +++ b/sycl/test/spec_const/spec_const_hw.cpp @@ -1,6 +1,6 @@ // UNSUPPORTED: cuda || level_zero // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/sub_group/generic_reduce.cpp b/sycl/test/sub_group/generic_reduce.cpp index cfeea7f459b69..31c4e7b17c022 100644 --- a/sycl/test/sub_group/generic_reduce.cpp +++ b/sycl/test/sub_group/generic_reduce.cpp @@ -1,8 +1,8 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -std=c++14 %s -o %t.out -// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-unnamed-lambda -std=c++14 %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out diff --git a/sycl/test/sub_group/load_store.cpp b/sycl/test/sub_group/load_store.cpp index 8366e8baca7d9..b494faebb68a2 100644 --- a/sycl/test/sub_group/load_store.cpp +++ b/sycl/test/sub_group/load_store.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/sub_group/scan_fp16.cpp b/sycl/test/sub_group/scan_fp16.cpp index bfdb09f8f7f31..61ee3221e2c45 100644 --- a/sycl/test/sub_group/scan_fp16.cpp +++ b/sycl/test/sub_group/scan_fp16.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out //==--------------- scan_fp16.cpp - SYCL sub_group scan test --------*- C++ -*---==// diff --git a/sycl/test/sub_group/shuffle.cpp b/sycl/test/sub_group/shuffle.cpp index 5207716148ef6..1f65d30278a86 100644 --- a/sycl/test/sub_group/shuffle.cpp +++ b/sycl/test/sub_group/shuffle.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/sub_group/shuffle_fp16.cpp b/sycl/test/sub_group/shuffle_fp16.cpp index 62f07fc612de8..63b4d1d41f3bf 100644 --- a/sycl/test/sub_group/shuffle_fp16.cpp +++ b/sycl/test/sub_group/shuffle_fp16.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // //==------------ shuffle_fp16.cpp - SYCL sub_group shuffle test -----*- C++ -*---==// diff --git a/sycl/test/sub_group/shuffle_fp64.cpp b/sycl/test/sub_group/shuffle_fp64.cpp index 3b1ed56907601..6399e25d3d09b 100644 --- a/sycl/test/sub_group/shuffle_fp64.cpp +++ b/sycl/test/sub_group/shuffle_fp64.cpp @@ -1,7 +1,7 @@ // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out From 5b94b377452176cceff7ce6822fb2ba8bd1da789 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Tue, 4 Aug 2020 22:46:03 +0300 Subject: [PATCH 2/3] Add clang driver test and update one more SYCL runtime test. --- clang/test/Driver/sycl-device-optimizations.cpp | 14 ++++++++++++++ sycl/test/sub_group/generic-shuffle.cpp | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 clang/test/Driver/sycl-device-optimizations.cpp diff --git a/clang/test/Driver/sycl-device-optimizations.cpp b/clang/test/Driver/sycl-device-optimizations.cpp new file mode 100644 index 0000000000000..d945bfa09f0d8 --- /dev/null +++ b/clang/test/Driver/sycl-device-optimizations.cpp @@ -0,0 +1,14 @@ +/// Check that optimizations for sycl device are enabled by default: +// RUN: %clang -### -fsycl %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s +// RUN: %clang -### -fsycl -fsycl-device-only %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s +// CHECK-DEFAULT-NOT: "-fno-sycl-std-optimizations" +// CHECK-DEFAULT-NOT: "-disable-llvm-passes" + +/// Check "-fno-sycl-std-optimizations" is passed to the front-end: +// RUN: %clang -### -fsycl -fno-sycl-std-optimizations %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-STD-OPTS %s +// RUN: %clang -### -fsycl -fsycl-device-only -fno-sycl-std-optimizations %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-STD-OPTS %s +// CHECK-NO-SYCL-STD-OPTS: "-fno-sycl-std-optimizations" \ No newline at end of file diff --git a/sycl/test/sub_group/generic-shuffle.cpp b/sycl/test/sub_group/generic-shuffle.cpp index 8bd30578fdd61..fd89157bab0ef 100644 --- a/sycl/test/sub_group/generic-shuffle.cpp +++ b/sycl/test/sub_group/generic-shuffle.cpp @@ -2,7 +2,7 @@ // CUDA compilation and runtime do not yet support sub-groups. // #2245 failed on OpenCL CPU (2020.10.7.0.15) with avx2 instruction set // -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out From d5ff9786cabd1eb4b65c0aa677990f3ce7c13927 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Wed, 5 Aug 2020 13:48:35 +0300 Subject: [PATCH 3/3] Add TODO comment --- sycl/test/basic_tests/accessor/accessor.cpp | 3 +++ sycl/test/basic_tests/boolean.cpp | 3 +++ sycl/test/basic_tests/stream/stream.cpp | 3 +++ sycl/test/fpga_tests/fpga_lsu.cpp | 3 +++ sycl/test/hier_par/hier_par_wgscope.cpp | 15 +++++++++------ sycl/test/regression/group.cpp | 3 +++ sycl/test/spec_const/spec_const_hw.cpp | 3 +++ sycl/test/sub_group/generic-shuffle.cpp | 3 +++ sycl/test/sub_group/generic_reduce.cpp | 3 +++ sycl/test/sub_group/load_store.cpp | 3 +++ sycl/test/sub_group/scan_fp16.cpp | 3 +++ sycl/test/sub_group/shuffle.cpp | 3 +++ sycl/test/sub_group/shuffle_fp16.cpp | 3 +++ sycl/test/sub_group/shuffle_fp64.cpp | 3 +++ 14 files changed, 48 insertions(+), 6 deletions(-) diff --git a/sycl/test/basic_tests/accessor/accessor.cpp b/sycl/test/basic_tests/accessor/accessor.cpp index d029ec247e79f..08b647b15f210 100644 --- a/sycl/test/basic_tests/accessor/accessor.cpp +++ b/sycl/test/basic_tests/accessor/accessor.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/boolean.cpp b/sycl/test/basic_tests/boolean.cpp index c022a74f165d0..d8adee7652666 100644 --- a/sycl/test/basic_tests/boolean.cpp +++ b/sycl/test/basic_tests/boolean.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/stream/stream.cpp b/sycl/test/basic_tests/stream/stream.cpp index 4ef7d838a11ef..7d9f8889c38d0 100644 --- a/sycl/test/basic_tests/stream/stream.cpp +++ b/sycl/test/basic_tests/stream/stream.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s // RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER diff --git a/sycl/test/fpga_tests/fpga_lsu.cpp b/sycl/test/fpga_tests/fpga_lsu.cpp index ad7091850c2d4..fda4ac5e3b60a 100644 --- a/sycl/test/fpga_tests/fpga_lsu.cpp +++ b/sycl/test/fpga_tests/fpga_lsu.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // RUN: %clangxx -fsycl -fno-sycl-std-optimizations %s -o %t.out // RUNx: %ACC_RUN_PLACEHOLDER %t.out //==----------------- fpga_lsu.cpp - SYCL FPGA LSU test --------------------==// diff --git a/sycl/test/hier_par/hier_par_wgscope.cpp b/sycl/test/hier_par/hier_par_wgscope.cpp index 50c37849cbf70..f2146241e911b 100644 --- a/sycl/test/hier_par/hier_par_wgscope.cpp +++ b/sycl/test/hier_par/hier_par_wgscope.cpp @@ -1,3 +1,12 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + +// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: env SYCL_DEVICE_TYPE=HOST %t.out +// RUN: %CPU_RUN_PLACEHOLDER %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out +// RUN: %ACC_RUN_PLACEHOLDER %t.out + //==- hier_par_wgscope.cpp --- hierarchical parallelism test for WG scope---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -6,12 +15,6 @@ // //===----------------------------------------------------------------------===// -// RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out -// RUN: env SYCL_DEVICE_TYPE=HOST %t.out -// RUN: %CPU_RUN_PLACEHOLDER %t.out -// RUN: %GPU_RUN_PLACEHOLDER %t.out -// RUN: %ACC_RUN_PLACEHOLDER %t.out - // This test checks correctness of hierarchical kernel execution when there is // code and data in the work group scope. diff --git a/sycl/test/regression/group.cpp b/sycl/test/regression/group.cpp index de9aad2f70bb8..0ecd8c569df9f 100644 --- a/sycl/test/regression/group.cpp +++ b/sycl/test/regression/group.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/spec_const/spec_const_hw.cpp b/sycl/test/spec_const/spec_const_hw.cpp index 9add174a1a66d..c2a0bf168a5cc 100644 --- a/sycl/test/spec_const/spec_const_hw.cpp +++ b/sycl/test/spec_const/spec_const_hw.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda || level_zero // // RUN: %clangxx -fsycl -fno-sycl-std-optimizations -fsycl-targets=%sycl_triple %s -o %t.out diff --git a/sycl/test/sub_group/generic-shuffle.cpp b/sycl/test/sub_group/generic-shuffle.cpp index fd89157bab0ef..08cc1359f23f4 100644 --- a/sycl/test/sub_group/generic-shuffle.cpp +++ b/sycl/test/sub_group/generic-shuffle.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda || cpu // CUDA compilation and runtime do not yet support sub-groups. // #2245 failed on OpenCL CPU (2020.10.7.0.15) with avx2 instruction set diff --git a/sycl/test/sub_group/generic_reduce.cpp b/sycl/test/sub_group/generic_reduce.cpp index 31c4e7b17c022..1c7df6a9f7619 100644 --- a/sycl/test/sub_group/generic_reduce.cpp +++ b/sycl/test/sub_group/generic_reduce.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // diff --git a/sycl/test/sub_group/load_store.cpp b/sycl/test/sub_group/load_store.cpp index b494faebb68a2..361af612e2acc 100644 --- a/sycl/test/sub_group/load_store.cpp +++ b/sycl/test/sub_group/load_store.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // diff --git a/sycl/test/sub_group/scan_fp16.cpp b/sycl/test/sub_group/scan_fp16.cpp index 61ee3221e2c45..a837055a3aae7 100644 --- a/sycl/test/sub_group/scan_fp16.cpp +++ b/sycl/test/sub_group/scan_fp16.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // diff --git a/sycl/test/sub_group/shuffle.cpp b/sycl/test/sub_group/shuffle.cpp index 1f65d30278a86..6a93dfb83a003 100644 --- a/sycl/test/sub_group/shuffle.cpp +++ b/sycl/test/sub_group/shuffle.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // diff --git a/sycl/test/sub_group/shuffle_fp16.cpp b/sycl/test/sub_group/shuffle_fp16.cpp index 63b4d1d41f3bf..c48795702308f 100644 --- a/sycl/test/sub_group/shuffle_fp16.cpp +++ b/sycl/test/sub_group/shuffle_fp16.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. // diff --git a/sycl/test/sub_group/shuffle_fp64.cpp b/sycl/test/sub_group/shuffle_fp64.cpp index 6399e25d3d09b..c6465f1ec7917 100644 --- a/sycl/test/sub_group/shuffle_fp64.cpp +++ b/sycl/test/sub_group/shuffle_fp64.cpp @@ -1,3 +1,6 @@ +// TODO: Enable compilation w/o -fno-sycl-std-optimizations option. +// See https://github.com/intel/llvm/issues/2264 for more details. + // UNSUPPORTED: cuda // CUDA compilation and runtime do not yet support sub-groups. //