File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %clang -std=c++11 -fsycl %s -o %t.out -lstdc++ -lOpenCL
1
+ // RUN: %clang -std=c++11 -fsycl %s -o %t.out -lstdc++ -lOpenCL -lsycl
2
2
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
3
- // RUN : %CPU_RUN_PLACEHOLDER %t.out
4
- // RUN : %GPU_RUN_PLACEHOLDER %t.out
5
- // RUN : %ACC_RUN_PLACEHOLDER %t.out
3
+ // RUNx : %CPU_RUN_PLACEHOLDER %t.out
4
+ // RUNx : %GPU_RUN_PLACEHOLDER %t.out
5
+ // RUNx : %ACC_RUN_PLACEHOLDER %t.out
6
6
// ==------------ swizzle_op.cpp - SYCL SwizzleOp basic test ----------------==//
7
7
//
8
8
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Original file line number Diff line number Diff line change 1
- // RUN: %clang -fsycl -o %t.out %s -lstdc++ -lOpenCL
1
+ // RUN: %clang -fsycl -o %t.out %s -lstdc++ -lOpenCL -lsycl
2
2
// RUN: cd %T
3
- // RUN: env SYCL_DEVICE_TYPE=HOST %t.out
4
- // RUN: %CPU_RUN_PLACEHOLDER %t.out
5
- // RUN: %GPU_RUN_PLACEHOLDER %t.out
3
+ // RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s
4
+ // RUNx: %CPU_RUN_PLACEHOLDER %t.out
5
+ // RUNx: %GPU_RUN_PLACEHOLDER %t.out
6
+ // CHECK:Passed.
6
7
7
8
// ==--- kernel_functor.cpp - Functors as SYCL kernel test ------------------==//
8
9
//
13
14
// ===----------------------------------------------------------------------===//
14
15
15
16
#include < CL/sycl.hpp>
16
-
17
- #include < cassert>
17
+ #include < iostream>
18
18
19
19
constexpr auto sycl_read_write = cl::sycl::access::mode::read_write;
20
20
constexpr auto sycl_global_buffer = cl::sycl::access::target::global_buffer;
@@ -172,8 +172,14 @@ int main() {
172
172
const int Gold1 = 40 ;
173
173
const int Gold2 = 80 ;
174
174
175
- assert (Res1 == Gold1);
176
- assert (Res2 == Gold2);
177
-
175
+ if (Res1 != Gold1) {
176
+ std::cout << " FAILED. " << Res1 << " !=" << Gold1 << " \n " ;
177
+ return 1 ;
178
+ }
179
+ if (Res2 != Gold2) {
180
+ std::cout << " FAILED. " << Res2 << " !=" << Gold2 << " \n " ;
181
+ return 1 ;
182
+ }
183
+ std::cout << " Passed.\n " ;
178
184
return 0 ;
179
185
}
You can’t perform that action at this time.
0 commit comments