From 622805a0c5d216141eca3090e80d58c159e175ee Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Fri, 18 Nov 2016 16:20:42 +0000 Subject: 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}. --- unsupported/test/cxx11_tensor_builtins_sycl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'unsupported/test/cxx11_tensor_builtins_sycl.cpp') 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 T inverse(T x) { return 1 / x; } #define TEST_IS_THAT_RETURNS_BOOL(SCALAR, FUNC) \ { \ - /* out OPERATOR in.FUNC() */ \ + /* out = in.FUNC() */ \ Tensor in(tensorRange); \ Tensor out(tensorRange); \ in = in.random() + static_cast(0.01); \ @@ -136,11 +136,13 @@ static void test_builtin_unary_sycl(const Eigen::SyclDevice &sycl_device) { array 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)); } -- cgit v1.2.3