mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
applying EIGEN_DECLARE_TEST to *gpu* tests
Also, a few minor fixes for GPU tests running in HIP mode. 1. Adding an include for hip/hip_runtime.h in the Macros.h file For HIP __host__ and __device__ are macros which are defined in hip headers. Their definitions need to be included before their use in the file. 2. Fixing the compile failure in TensorContractionGpu introduced by the commit to "Fuse computations into the Tensor contractions using output kernel" 3. Fixing a HIP/clang specific compile error by making the struct-member assignment explicit
This commit is contained in:
@@ -242,7 +242,7 @@ void test_gpu_argmin_dim()
|
||||
}
|
||||
}
|
||||
|
||||
void test_cxx11_tensor_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_argmax_gpu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_gpu_simple_argmax<RowMajor>());
|
||||
CALL_SUBTEST_1(test_gpu_simple_argmax<ColMajor>());
|
||||
|
||||
@@ -72,7 +72,7 @@ void test_fallback_conversion() {
|
||||
}
|
||||
|
||||
|
||||
void test_cxx11_tensor_cast_float16_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_cast_float16_gpu)
|
||||
{
|
||||
CALL_SUBTEST(test_gpu_conversion());
|
||||
CALL_SUBTEST(test_fallback_conversion());
|
||||
|
||||
@@ -193,7 +193,7 @@ void test_gpu_contraction_sizes() {
|
||||
}
|
||||
}
|
||||
|
||||
void test_cxx11_tensor_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_contract_gpu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_gpu_contraction<ColMajor>(128, 128, 128));
|
||||
CALL_SUBTEST_1(test_gpu_contraction<RowMajor>(128, 128, 128));
|
||||
|
||||
@@ -389,7 +389,7 @@ void test_gpu() {
|
||||
}
|
||||
|
||||
|
||||
void test_cxx11_tensor_device()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_device)
|
||||
{
|
||||
CALL_SUBTEST_1(test_cpu());
|
||||
CALL_SUBTEST_2(test_gpu());
|
||||
|
||||
@@ -1472,7 +1472,7 @@ void test_gpu_gamma_sample_der_alpha()
|
||||
gpuFree(d_out);
|
||||
}
|
||||
|
||||
void test_cxx11_tensor_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_gpu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_gpu_nullary());
|
||||
CALL_SUBTEST_1(test_gpu_elementwise_small());
|
||||
|
||||
@@ -479,7 +479,7 @@ void test_gpu_forced_evals() {
|
||||
#endif
|
||||
|
||||
|
||||
void test_cxx11_tensor_of_float16_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_of_float16_gpu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_gpu_numext<void>());
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static void test_complex()
|
||||
}
|
||||
|
||||
|
||||
void test_cxx11_tensor_random_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_random_gpu)
|
||||
{
|
||||
CALL_SUBTEST(test_gpu_random_uniform());
|
||||
CALL_SUBTEST(test_gpu_random_normal());
|
||||
|
||||
@@ -134,7 +134,7 @@ static void test_last_dim_reductions() {
|
||||
}
|
||||
|
||||
|
||||
void test_cxx11_tensor_reduction_gpu() {
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_reduction_gpu) {
|
||||
CALL_SUBTEST_1((test_full_reductions<float, ColMajor>()));
|
||||
CALL_SUBTEST_1((test_full_reductions<double, ColMajor>()));
|
||||
CALL_SUBTEST_2((test_full_reductions<float, RowMajor>()));
|
||||
|
||||
@@ -71,7 +71,7 @@ void test_gpu_cumsum(int m_size, int k_size, int n_size)
|
||||
}
|
||||
|
||||
|
||||
void test_cxx11_tensor_scan_gpu()
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_scan_gpu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_gpu_cumsum<ColMajor>(128, 128, 128));
|
||||
CALL_SUBTEST_2(test_gpu_cumsum<RowMajor>(128, 128, 128));
|
||||
|
||||
Reference in New Issue
Block a user