aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_builtins_sycl.cpp
diff options
context:
space:
mode:
authorGravatar Mehdi Goli <mehdi.goli@codeplay.com>2016-11-18 16:20:42 +0000
committerGravatar Mehdi Goli <mehdi.goli@codeplay.com>2016-11-18 16:20:42 +0000
commit622805a0c5d216141eca3090e80d58c159e175ee (patch)
tree536147ee41965ef1b9fbe7d5a11b7fd872804b22 /unsupported/test/cxx11_tensor_builtins_sycl.cpp
parent5159675c338ffef579fa7015fe5e05eb27bcbdb5 (diff)
Modifying TensorDeviceSycl.h to always create buffer of type uint8_t and convert them to the actual type at the execution on the device; adding the queue interface class to separate the lifespan of sycl queue and buffers,created for that queue, from Eigen::SyclDevice; modifying sycl tests to support the evaluation of the results for both row major and column major data layout on all different devices that are supported by Sycl{CPU; GPU; and Host}.
Diffstat (limited to 'unsupported/test/cxx11_tensor_builtins_sycl.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_builtins_sycl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/unsupported/test/cxx11_tensor_builtins_sycl.cpp b/unsupported/test/cxx11_tensor_builtins_sycl.cpp
index d57d502ca..26cea18a6 100644
--- a/unsupported/test/cxx11_tensor_builtins_sycl.cpp
+++ b/unsupported/test/cxx11_tensor_builtins_sycl.cpp
@@ -100,7 +100,7 @@ template <typename T> T inverse(T x) { return 1 / x; }
#define TEST_IS_THAT_RETURNS_BOOL(SCALAR, FUNC) \
{ \
- /* out OPERATOR in.FUNC() */ \
+ /* out = in.FUNC() */ \
Tensor<SCALAR, 3> in(tensorRange); \
Tensor<bool, 3> out(tensorRange); \
in = in.random() + static_cast<SCALAR>(0.01); \
@@ -136,11 +136,13 @@ static void test_builtin_unary_sycl(const Eigen::SyclDevice &sycl_device) {
array<int, 3> tensorRange = {{sizeDim1, sizeDim2, sizeDim3}};
TEST_UNARY_BUILTINS(float)
+ /// your GPU must support double. Otherwise, disable the double test.
TEST_UNARY_BUILTINS(double)
}
void test_cxx11_tensor_builtins_sycl() {
cl::sycl::gpu_selector s;
- Eigen::SyclDevice sycl_device(s);
+ QueueInterface queueInterface(s);
+ Eigen::SyclDevice sycl_device(&queueInterface);
CALL_SUBTEST(test_builtin_unary_sycl(sycl_device));
}