Skip to content

Commit 8280756

Browse files
alexeyvoronov-intelbader
authored andcommitted
[SYCL] Enable swizzle_op and kernel_functor tests on non host devices.
Signed-off-by: Alexey Voronov <[email protected]>
1 parent 396bc07 commit 8280756

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

sycl/test/basic_tests/swizzle_op.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clang -std=c++11 -fsycl %s -o %t.out -lstdc++ -lOpenCL -lsycl
1+
// RUN: %clang -std=c++11 -fsycl %s -o %t.out -lstdc++ -lOpenCL
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
3-
// RUNx: %CPU_RUN_PLACEHOLDER %t.out
4-
// RUNx: %GPU_RUN_PLACEHOLDER %t.out
5-
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
3+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
66
//==------------ swizzle_op.cpp - SYCL SwizzleOp basic test ----------------==//
77
//
88
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/functor/kernel_functor.cpp

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: %clang -fsycl -o %t.out %s -lstdc++ -lOpenCL -lsycl
1+
// RUN: %clang -fsycl -o %t.out %s -lstdc++ -lOpenCL
22
// RUN: cd %T
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.
3+
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
4+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
5+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
76

87
//==--- kernel_functor.cpp - Functors as SYCL kernel test ------------------==//
98
//
@@ -14,7 +13,8 @@
1413
//===----------------------------------------------------------------------===//
1514

1615
#include <CL/sycl.hpp>
17-
#include <iostream>
16+
17+
#include <cassert>
1818

1919
constexpr auto sycl_read_write = cl::sycl::access::mode::read_write;
2020
constexpr auto sycl_global_buffer = cl::sycl::access::target::global_buffer;
@@ -172,14 +172,8 @@ int main() {
172172
const int Gold1 = 40;
173173
const int Gold2 = 80;
174174

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";
175+
assert(Res1 == Gold1);
176+
assert(Res2 == Gold2);
177+
184178
return 0;
185179
}

0 commit comments

Comments
 (0)