Skip to content

Commit

Permalink
Remove unused macro TEST_RUN_CT_SELECT
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbiessy committed Jul 15, 2024
1 parent d04452a commit e8eac87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
30 changes: 9 additions & 21 deletions tests/unit_tests/include/test_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
TEST_RUN_PORTFFT_SELECT_NO_ARGS(q, func); \
} while (0);

#define TEST_RUN_CT_SELECT(q, func, ...) \
#define TEST_RUN_BLAS_CT_SELECT(q, func, ...) \
do { \
if (CHECK_HOST_OR_CPU(q)) \
TEST_RUN_INTELCPU_SELECT(q, func, __VA_ARGS__); \
Expand All @@ -214,21 +214,15 @@
TEST_RUN_INTELGPU_SELECT(q, func, __VA_ARGS__); \
else if (vendor_id == NVIDIA_ID) { \
TEST_RUN_NVIDIAGPU_CUBLAS_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_NVIDIAGPU_CUSOLVER_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_NVIDIAGPU_CURAND_SELECT(q, func, __VA_ARGS__); \
} \
else if (vendor_id == AMD_ID) { \
TEST_RUN_AMDGPU_ROCBLAS_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_AMDGPU_ROCRAND_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_AMDGPU_ROCSOLVER_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_AMDGPU_ROCFFT_SELECT(q, func, __VA_ARGS__); \
} \
} \
TEST_RUN_PORTBLAS_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_PORTFFT_SELECT(q, func, __VA_ARGS__); \
} while (0);

#define TEST_RUN_BLAS_CT_SELECT(q, func, ...) \
#define TEST_RUN_RNG_CT_SELECT(q, func, ...) \
do { \
if (CHECK_HOST_OR_CPU(q)) \
TEST_RUN_INTELCPU_SELECT(q, func, __VA_ARGS__); \
Expand All @@ -238,16 +232,15 @@
if (vendor_id == INTEL_ID) \
TEST_RUN_INTELGPU_SELECT(q, func, __VA_ARGS__); \
else if (vendor_id == NVIDIA_ID) { \
TEST_RUN_NVIDIAGPU_CUBLAS_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_NVIDIAGPU_CURAND_SELECT(q, func, __VA_ARGS__); \
} \
else if (vendor_id == AMD_ID) { \
TEST_RUN_AMDGPU_ROCBLAS_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_AMDGPU_ROCRAND_SELECT(q, func, __VA_ARGS__); \
} \
} \
TEST_RUN_PORTBLAS_SELECT(q, func, __VA_ARGS__); \
} while (0);

#define TEST_RUN_RNG_CT_SELECT(q, func, ...) \
#define TEST_RUN_LAPACK_CT_SELECT(q, func, ...) \
do { \
if (CHECK_HOST_OR_CPU(q)) \
TEST_RUN_INTELCPU_SELECT(q, func, __VA_ARGS__); \
Expand All @@ -257,28 +250,23 @@
if (vendor_id == INTEL_ID) \
TEST_RUN_INTELGPU_SELECT(q, func, __VA_ARGS__); \
else if (vendor_id == NVIDIA_ID) { \
TEST_RUN_NVIDIAGPU_CURAND_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_NVIDIAGPU_CUSOLVER_SELECT(q, func, __VA_ARGS__); \
} \
else if (vendor_id == AMD_ID) { \
TEST_RUN_AMDGPU_ROCRAND_SELECT(q, func, __VA_ARGS__); \
TEST_RUN_AMDGPU_ROCSOLVER_SELECT(q, func, __VA_ARGS__); \
} \
} \
} while (0);

#define TEST_RUN_LAPACK_CT_SELECT(q, func, ...) \
#define TEST_RUN_SPARSE_CT_SELECT(q, func, ...) \
do { \
if (CHECK_HOST_OR_CPU(q)) \
TEST_RUN_INTELCPU_SELECT(q, func, __VA_ARGS__); \
else if (q.get_device().is_gpu()) { \
unsigned int vendor_id = static_cast<unsigned int>( \
q.get_device().get_info<sycl::info::device::vendor_id>()); \
if (vendor_id == INTEL_ID) \
if (vendor_id == INTEL_ID) { \
TEST_RUN_INTELGPU_SELECT(q, func, __VA_ARGS__); \
else if (vendor_id == NVIDIA_ID) { \
TEST_RUN_NVIDIAGPU_CUSOLVER_SELECT(q, func, __VA_ARGS__); \
} \
else if (vendor_id == AMD_ID) { \
TEST_RUN_AMDGPU_ROCSOLVER_SELECT(q, func, __VA_ARGS__); \
} \
} \
} while (0);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/sparse_blas/include/test_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#ifdef CALL_RT_API
#define CALL_RT_OR_CT(FUNC, QUEUE, ...) FUNC(QUEUE, __VA_ARGS__)
#else
#define CALL_RT_OR_CT(FUNC, QUEUE, ...) TEST_RUN_CT_SELECT(QUEUE, FUNC, __VA_ARGS__);
#define CALL_RT_OR_CT(FUNC, QUEUE, ...) TEST_RUN_SPARSE_CT_SELECT(QUEUE, FUNC, __VA_ARGS__);
#endif

template <typename T>
Expand Down

0 comments on commit e8eac87

Please sign in to comment.