mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
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:
parent
8e1df5b082
commit
8719b9c5bc
@ -77,6 +77,8 @@ void test_cuda_complex_cwise_ops() {
|
|||||||
gpu_out.device(gpu_device) = -gpu_in1;
|
gpu_out.device(gpu_device) = -gpu_in1;
|
||||||
expected = -a;
|
expected = -a;
|
||||||
break;
|
break;
|
||||||
|
case NbOps:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
assert(cudaMemcpyAsync(actual.data(), d_out, complex_bytes, cudaMemcpyDeviceToHost,
|
assert(cudaMemcpyAsync(actual.data(), d_out, complex_bytes, cudaMemcpyDeviceToHost,
|
||||||
gpu_device.stream()) == cudaSuccess);
|
gpu_device.stream()) == cudaSuccess);
|
||||||
|
@ -228,10 +228,10 @@ template <typename RealScalar>
|
|||||||
static void test_fft_non_power_of_2_round_trip(int exponent) {
|
static void test_fft_non_power_of_2_round_trip(int exponent) {
|
||||||
int n = (1 << exponent) + 1;
|
int n = (1 << exponent) + 1;
|
||||||
|
|
||||||
Eigen::DSizes<std::int64_t, 1> dimensions;
|
Eigen::DSizes<ptrdiff_t, 1> dimensions;
|
||||||
dimensions[0] = n;
|
dimensions[0] = n;
|
||||||
const DSizes<std::int64_t, 1> arr = dimensions;
|
const DSizes<ptrdiff_t, 1> arr = dimensions;
|
||||||
Tensor<RealScalar, 1, ColMajor, std::int64_t> input;
|
Tensor<RealScalar, 1, ColMajor, ptrdiff_t> input;
|
||||||
|
|
||||||
input.resize(arr);
|
input.resize(arr);
|
||||||
input.setRandom();
|
input.setRandom();
|
||||||
@ -242,7 +242,7 @@ static void test_fft_non_power_of_2_round_trip(int exponent) {
|
|||||||
Tensor<std::complex<RealScalar>, 1, ColMajor> forward =
|
Tensor<std::complex<RealScalar>, 1, ColMajor> forward =
|
||||||
input.template fft<BothParts, FFT_FORWARD>(fft);
|
input.template fft<BothParts, FFT_FORWARD>(fft);
|
||||||
|
|
||||||
Tensor<RealScalar, 1, ColMajor, std::int64_t> output =
|
Tensor<RealScalar, 1, ColMajor, ptrdiff_t> output =
|
||||||
forward.template fft<RealPart, FFT_REVERSE>(fft);
|
forward.template fft<RealPart, FFT_REVERSE>(fft);
|
||||||
|
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
|
@ -51,7 +51,7 @@ static void test_static_reshape() {
|
|||||||
|
|
||||||
// New dimensions: [2, 3, 7]
|
// New dimensions: [2, 3, 7]
|
||||||
Eigen::IndexList<type2index<2>, type2index<3>, type2index<7>> dim;
|
Eigen::IndexList<type2index<2>, type2index<3>, type2index<7>> dim;
|
||||||
Tensor<float, 3> reshaped = tensor.reshape(static_cast<Eigen::DSizes<long,3>>(dim));
|
Tensor<float, 3> reshaped = tensor.reshape(static_cast<Eigen::DSizes<ptrdiff_t,3>>(dim));
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
@ -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_float1.device(gpu_device) = gpu_float1.random() * 2.0f;
|
||||||
gpu_float2.device(gpu_device) = gpu_float2.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_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);
|
gpu_res_half.device(gpu_device) = gpu_float1.cast<Eigen::half>().sum(redux_dim);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <Eigen/CXX11/Tensor>
|
#include <Eigen/CXX11/Tensor>
|
||||||
|
|
||||||
|
|
||||||
#if EIGEN_COMP_MSVC
|
#if EIGEN_COMP_MSVC || !defined(__SIZEOF_INT128__)
|
||||||
#define EIGEN_NO_INT128
|
#define EIGEN_NO_INT128
|
||||||
#else
|
#else
|
||||||
typedef __uint128_t uint128_t;
|
typedef __uint128_t uint128_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user