Disable test for 32-bit systems (e.g. ARM, i386)

Both i386 and 32-bit ARM do not define __uint128_t. On most systems, if
__uint128_t is defined, then so is the macro __SIZEOF_INT128__.

https://stackoverflow.com/questions/18531782/how-to-know-if-uint128-t-is-defined1
This commit is contained in:
Antonio Sánchez
2020-05-28 17:40:15 +00:00
committed by Rasmus Munk Larsen
parent 8e1df5b082
commit 8719b9c5bc
5 changed files with 12 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ void test_gpu_conversion() {
Eigen::GpuStreamDevice stream;
Eigen::GpuDevice gpu_device(&stream);
int num_elem = 101;
float* d_float = (float*)gpu_device.allocate(num_elem * sizeof(float));
Eigen::half* d_half = (Eigen::half*)gpu_device.allocate(num_elem * sizeof(Eigen::half));
float* d_conv = (float*)gpu_device.allocate(num_elem * sizeof(float));
@@ -322,7 +322,7 @@ template<typename>
void test_gpu_reductions(int size1, int size2, int redux) {
std::cout << "Reducing " << size1 << " by " << size2
<< " tensor along dim " << redux << std::endl;
<< " tensor along dim " << redux << std::endl;
Eigen::GpuStreamDevice stream;
Eigen::GpuDevice gpu_device(&stream);
@@ -346,7 +346,7 @@ void test_gpu_reductions(int size1, int size2, int redux) {
gpu_float1.device(gpu_device) = gpu_float1.random() * 2.0f;
gpu_float2.device(gpu_device) = gpu_float2.random() * 2.0f;
Eigen::array<int, 1> redux_dim = {{redux}};
Eigen::array<int, 1> redux_dim = {redux};
gpu_res_float.device(gpu_device) = gpu_float1.sum(redux_dim).cast<Eigen::half>();
gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().sum(redux_dim);