From e1e8ac421fea8436e1d96581a5d4b84d8a899adb Mon Sep 17 00:00:00 2001 From: Pratik Nayak Date: Tue, 10 Oct 2023 22:53:30 +0200 Subject: [PATCH] Review updates Co-authored-by: Terry Cojean --- core/matrix/batch_dense_kernels.hpp | 1 - cuda/matrix/batch_dense_kernels.cu | 3 --- cuda/matrix/batch_struct.hpp | 3 --- dpcpp/matrix/batch_struct.hpp | 2 -- hip/matrix/batch_dense_kernels.hip.cpp | 3 --- hip/matrix/batch_struct.hip.hpp | 3 --- reference/matrix/batch_struct.hpp | 2 -- test/matrix/batch_dense_kernels.cpp | 16 ++++++++-------- test/test_install/test_install.cpp | 2 +- 9 files changed, 9 insertions(+), 26 deletions(-) diff --git a/core/matrix/batch_dense_kernels.hpp b/core/matrix/batch_dense_kernels.hpp index cb46b7291b8..ef59ff3e9cc 100644 --- a/core/matrix/batch_dense_kernels.hpp +++ b/core/matrix/batch_dense_kernels.hpp @@ -38,7 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include #include diff --git a/cuda/matrix/batch_dense_kernels.cu b/cuda/matrix/batch_dense_kernels.cu index 47c478864cf..dd82e15b8cc 100644 --- a/cuda/matrix/batch_dense_kernels.cu +++ b/cuda/matrix/batch_dense_kernels.cu @@ -34,7 +34,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include #include @@ -44,8 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" #include "cuda/base/batch_struct.hpp" #include "cuda/base/config.hpp" -#include "cuda/base/cublas_bindings.hpp" -#include "cuda/base/pointer_mode_guard.hpp" #include "cuda/base/thrust.cuh" #include "cuda/components/cooperative_groups.cuh" #include "cuda/components/reduction.cuh" diff --git a/cuda/matrix/batch_struct.hpp b/cuda/matrix/batch_struct.hpp index 2ae453b6e61..73712a7b81b 100644 --- a/cuda/matrix/batch_struct.hpp +++ b/cuda/matrix/batch_struct.hpp @@ -37,13 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" -#include -#include #include #include "core/base/batch_struct.hpp" -#include "cuda/base/config.hpp" #include "cuda/base/types.hpp" diff --git a/dpcpp/matrix/batch_struct.hpp b/dpcpp/matrix/batch_struct.hpp index d452f78644f..b0393daf55d 100644 --- a/dpcpp/matrix/batch_struct.hpp +++ b/dpcpp/matrix/batch_struct.hpp @@ -37,12 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" -#include #include #include "core/base/batch_struct.hpp" -#include "dpcpp/base/config.hpp" namespace gko { diff --git a/hip/matrix/batch_dense_kernels.hip.cpp b/hip/matrix/batch_dense_kernels.hip.cpp index a0fdea446be..eb3da83760a 100644 --- a/hip/matrix/batch_dense_kernels.hip.cpp +++ b/hip/matrix/batch_dense_kernels.hip.cpp @@ -35,7 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include #include @@ -46,8 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" #include "hip/base/batch_struct.hip.hpp" #include "hip/base/config.hip.hpp" -#include "hip/base/hipblas_bindings.hip.hpp" -#include "hip/base/pointer_mode_guard.hip.hpp" #include "hip/base/thrust.hip.hpp" #include "hip/components/cooperative_groups.hip.hpp" #include "hip/components/reduction.hip.hpp" diff --git a/hip/matrix/batch_struct.hip.hpp b/hip/matrix/batch_struct.hip.hpp index c1bd6441367..4670cf0988b 100644 --- a/hip/matrix/batch_struct.hip.hpp +++ b/hip/matrix/batch_struct.hip.hpp @@ -37,13 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" -#include -#include #include #include "core/base/batch_struct.hpp" -#include "hip/base/config.hip.hpp" #include "hip/base/types.hip.hpp" diff --git a/reference/matrix/batch_struct.hpp b/reference/matrix/batch_struct.hpp index dcd4ce3e71e..483d7717718 100644 --- a/reference/matrix/batch_struct.hpp +++ b/reference/matrix/batch_struct.hpp @@ -37,8 +37,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "core/matrix/batch_struct.hpp" -#include -#include #include #include diff --git a/test/matrix/batch_dense_kernels.cpp b/test/matrix/batch_dense_kernels.cpp index 119a868be09..a243d51f3c1 100644 --- a/test/matrix/batch_dense_kernels.cpp +++ b/test/matrix/batch_dense_kernels.cpp @@ -75,11 +75,11 @@ class Dense : public CommonTestFixture { { const int num_rows = 252; const int num_cols = 32; - x = gen_mtx(batch_size, num_rows, num_cols); + mat = gen_mtx(batch_size, num_rows, num_cols); y = gen_mtx(batch_size, num_cols, num_vecs); alpha = gen_mtx(batch_size, 1, 1); beta = gen_mtx(batch_size, 1, 1); - dx = gko::clone(exec, x); + dmat = gko::clone(exec, mat); dy = gko::clone(exec, y); dalpha = gko::clone(exec, alpha); dbeta = gko::clone(exec, beta); @@ -93,13 +93,13 @@ class Dense : public CommonTestFixture { std::default_random_engine rand_engine; const size_t batch_size = 11; - std::unique_ptr x; + std::unique_ptr mat; std::unique_ptr y; std::unique_ptr alpha; std::unique_ptr beta; std::unique_ptr expected; std::unique_ptr dresult; - std::unique_ptr dx; + std::unique_ptr dmat; std::unique_ptr dy; std::unique_ptr dalpha; std::unique_ptr dbeta; @@ -110,8 +110,8 @@ TEST_F(Dense, SingleVectorApplyIsEquivalentToRef) { set_up_apply_data(1); - x->apply(y.get(), expected.get()); - dx->apply(dy.get(), dresult.get()); + mat->apply(y.get(), expected.get()); + dmat->apply(dy.get(), dresult.get()); GKO_ASSERT_BATCH_MTX_NEAR(dresult, expected, r::value); } @@ -121,8 +121,8 @@ TEST_F(Dense, SingleVectorAdvancedApplyIsEquivalentToRef) { set_up_apply_data(1); - x->apply(alpha.get(), y.get(), beta.get(), expected.get()); - dx->apply(dalpha.get(), dy.get(), dbeta.get(), dresult.get()); + mat->apply(alpha.get(), y.get(), beta.get(), expected.get()); + dmat->apply(dalpha.get(), dy.get(), dbeta.get(), dresult.get()); GKO_ASSERT_BATCH_MTX_NEAR(dresult, expected, r::value); } diff --git a/test/test_install/test_install.cpp b/test/test_install/test_install.cpp index 325773f0b75..7e53ea8f165 100644 --- a/test/test_install/test_install.cpp +++ b/test/test_install/test_install.cpp @@ -222,7 +222,7 @@ int main() // core/base/batch_dense.hpp { using type1 = float; - using batch_dense_type = gko::batch::Dense; + using batch_dense_type = gko::batch::matrix::Dense; auto test = batch_dense_type::create(exec); }