mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
Code cleanup
This commit is contained in:
parent
1c6eafb46b
commit
a357fe1fb9
@ -47,10 +47,13 @@ void test_device_exceptions(const Eigen::SyclDevice &sycl_device) {
|
||||
int sizeDim1 = 100;
|
||||
array<int, 1> tensorDims = {{sizeDim1}};
|
||||
DataType* gpu_data = static_cast<DataType*>(sycl_device.allocate(sizeDim1*sizeof(DataType)));
|
||||
sycl_device.memset(gpu_data, 1, sizeDim1*sizeof(DataType));
|
||||
|
||||
TensorMap<Tensor<DataType, 1, DataLayout>> in(gpu_data, tensorDims);
|
||||
TensorMap<Tensor<DataType, 1, DataLayout>> out(gpu_data, tensorDims);
|
||||
|
||||
out.device(sycl_device) = in / in.constant(0);
|
||||
|
||||
sycl_device.synchronize();
|
||||
VERIFY(!sycl_device.ok());
|
||||
sycl_device.deallocate(gpu_data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user