diff --git a/src/interface/blas1/backend/amd_gpu.hpp b/src/interface/blas1/backend/amd_gpu.hpp index 553b4e1d9..37a671c9a 100644 --- a/src/interface/blas1/backend/amd_gpu.hpp +++ b/src/interface/blas1/backend/amd_gpu.hpp @@ -35,13 +35,13 @@ typename sb_handle_t::event_t _asum(sb_handle_t &sb_handle, index_t _N, container_0_t _vx, increment_t _incx, container_1_t _rs) { if (_N < (1 << 18)) { - constexpr auto localSize = 1024ul; + constexpr auto localSize = 1024; const auto blocks = (_N + localSize - 1) / localSize; return blas::internal::_asum_impl(sb_handle, _N, _vx, _incx, _rs, blocks); } else { - constexpr auto localSize = 512ul; - constexpr auto blocks = 256ul; + constexpr auto localSize = 512; + constexpr auto blocks = 256; return blas::internal::_asum_impl(sb_handle, _N, _vx, _incx, _rs, blocks); } diff --git a/src/operations/blas1/asum.hpp b/src/operations/blas1/asum.hpp index e9f83db8f..4a09a4049 100644 --- a/src/operations/blas1/asum.hpp +++ b/src/operations/blas1/asum.hpp @@ -31,10 +31,6 @@ namespace blas { -/*! Asum. - * @brief Implements the reduction operation for assignments - * (in the form y = x) with y a scalar and x a subexpression tree. - */ template Asum::Asum(lhs_t &_l, rhs_t &_r) : lhs_(_l), rhs_(_r){}; diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt index 9022d141b..f0a6def8a 100644 --- a/test/unittest/CMakeLists.txt +++ b/test/unittest/CMakeLists.txt @@ -30,6 +30,7 @@ include_directories(${PORTBLAS_TEST} ${BLAS_INCLUDE_DIRS}) # compiling tests set(SYCL_UNITTEST_SRCS # Blas 1 tests + ${PORTBLAS_UNITTEST}/blas1/blas1_asum_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_axpy_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_copy_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_scal_test.cpp @@ -81,7 +82,6 @@ if(is_computecpp) set(SYCL_UNITTEST_SRCS ${SYCL_UNITTEST_SRCS} # Blas 1 tests ${PORTBLAS_UNITTEST}/blas1/blas1_swap_test.cpp - ${PORTBLAS_UNITTEST}/blas1/blas1_asum_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_dot_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_nrm2_test.cpp ${PORTBLAS_UNITTEST}/blas1/blas1_iamax_test.cpp diff --git a/test/unittest/blas1/blas1_asum_test.cpp b/test/unittest/blas1/blas1_asum_test.cpp index 5fc3d74ac..088126002 100644 --- a/test/unittest/blas1/blas1_asum_test.cpp +++ b/test/unittest/blas1/blas1_asum_test.cpp @@ -26,14 +26,15 @@ #include "blas_test.hpp" template -using combination_t = std::tuple; +using combination_t = std::tuple; template void run_test(const combination_t combi) { api_type api; index_t size; index_t incX; - std::tie(api, size, incX) = combi; + scalar_t unused; + std::tie(api, size, incX, unused) = combi; // Input vector std::vector x_v(size * incX); @@ -77,15 +78,17 @@ const auto combi = ::testing::Combine(::testing::Values(api_type::async, api_type::sync), // Api ::testing::Values(11, 65, 10000, 1002400), // size - ::testing::Values(1, 4) // incX -); + ::testing::Values(1, 4), // incX + ::testing::Values(1.0)); + template static std::string generate_name( const ::testing::TestParamInfo>& info) { api_type api; int size, incX; - BLAS_GENERATE_NAME(info.param, api, size, incX); + T unused; + BLAS_GENERATE_NAME(info.param, api, size, incX, unused); } BLAS_REGISTER_TEST_ALL(Asum, combination_t, combi, generate_name);