From 7335c492043db9eb51efd5fe6cb5bdc32f3a618f Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 18 Nov 2016 12:37:13 -0800 Subject: Fixed the cxx11_tensor_device_sycl test --- unsupported/test/cxx11_tensor_device_sycl.cpp | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'unsupported/test/cxx11_tensor_device_sycl.cpp') diff --git a/unsupported/test/cxx11_tensor_device_sycl.cpp b/unsupported/test/cxx11_tensor_device_sycl.cpp index 2f8cfa081..95da83c6f 100644 --- a/unsupported/test/cxx11_tensor_device_sycl.cpp +++ b/unsupported/test/cxx11_tensor_device_sycl.cpp @@ -19,12 +19,14 @@ #include "main.h" #include -#include +#include +#include template -void test_device_sycl(const Eigen::SyclDevice &sycl_device) { - std::cout <<"Hello from ComputeCpp: the requested device exists and the device name is : " - << sycl_device.sycl_queue().get_device(). template get_info() <() + < tensorRange = {{sizeDim1}}; Tensor in(tensorRange); @@ -34,7 +36,7 @@ void test_device_sycl(const Eigen::SyclDevice &sycl_device) { sycl_device.memset(gpu_in_data, 1,in.size()*sizeof(DataType) ); sycl_device.memcpyDeviceToHost(in.data(), gpu_in_data, in.size()*sizeof(DataType) ); for (int i=0; i void sycl_device_test_per_device(dev_Selector s){ QueueInterface queueInterface(s); auto sycl_device = Eigen::SyclDevice(&queueInterface); - test_device_sycl(sycl_device); - test_device_sycl(sycl_device); - /// this test throw an exeption. enable it if you want to see the exception - // test_device_exceptions(sycl_device); - /// this test throw an exeption. enable it if you want to see the exception - // test_device_exceptions(sycl_device); - + test_device_memory(sycl_device); + test_device_memory(sycl_device); + /// this test throw an exception. enable it if you want to see the exception + //test_device_exceptions(sycl_device); + /// this test throw an exception. enable it if you want to see the exception + //test_device_exceptions(sycl_device); } void test_cxx11_tensor_device_sycl() { printf("Test on GPU: OpenCL\n"); CALL_SUBTEST(sycl_device_test_per_device((cl::sycl::gpu_selector()))); - printf("repeating the test on CPU: OpenCL\n"); - CALL_SUBTEST(sycl_device_test_per_device((cl::sycl::cpu_selector()))); + // printf("repeating the test on CPU: OpenCL\n"); + // CALL_SUBTEST(sycl_device_test_per_device((cl::sycl::cpu_selector()))); printf("repeating the test on CPU: HOST\n"); CALL_SUBTEST(sycl_device_test_per_device((cl::sycl::host_selector()))); printf("Test Passed******************\n" ); -- cgit v1.2.3