Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
Co-authored-by: Terry Cojean <[email protected]>
  • Loading branch information
pratikvn and tcojean committed Oct 11, 2023
1 parent 899a674 commit e1e8ac4
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 26 deletions.
1 change: 0 additions & 1 deletion core/matrix/batch_dense_kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <ginkgo/core/base/batch_multi_vector.hpp>
#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/base/types.hpp>


Expand Down
3 changes: 0 additions & 3 deletions cuda/matrix/batch_dense_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <thrust/functional.h>
#include <thrust/transform.h>


#include <ginkgo/core/base/math.hpp>
Expand All @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions cuda/matrix/batch_struct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/matrix/batch_struct.hpp"


#include <ginkgo/core/base/batch_multi_vector.hpp>
#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/matrix/batch_dense.hpp>


#include "core/base/batch_struct.hpp"
#include "cuda/base/config.hpp"
#include "cuda/base/types.hpp"


Expand Down
2 changes: 0 additions & 2 deletions dpcpp/matrix/batch_struct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/matrix/batch_struct.hpp"


#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/matrix/batch_dense.hpp>


#include "core/base/batch_struct.hpp"
#include "dpcpp/base/config.hpp"


namespace gko {
Expand Down
3 changes: 0 additions & 3 deletions hip/matrix/batch_dense_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <hip/hip_runtime.h>
#include <thrust/functional.h>
#include <thrust/transform.h>


#include <ginkgo/core/base/math.hpp>
Expand All @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions hip/matrix/batch_struct.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/matrix/batch_struct.hpp"


#include <ginkgo/core/base/batch_multi_vector.hpp>
#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/matrix/batch_dense.hpp>


#include "core/base/batch_struct.hpp"
#include "hip/base/config.hip.hpp"
#include "hip/base/types.hip.hpp"


Expand Down
2 changes: 0 additions & 2 deletions reference/matrix/batch_struct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/matrix/batch_struct.hpp"


#include <ginkgo/core/base/batch_multi_vector.hpp>
#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/base/types.hpp>
#include <ginkgo/core/matrix/batch_dense.hpp>

Expand Down
16 changes: 8 additions & 8 deletions test/matrix/batch_dense_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class Dense : public CommonTestFixture {
{
const int num_rows = 252;
const int num_cols = 32;
x = gen_mtx<BMtx>(batch_size, num_rows, num_cols);
mat = gen_mtx<BMtx>(batch_size, num_rows, num_cols);
y = gen_mtx<BMVec>(batch_size, num_cols, num_vecs);
alpha = gen_mtx<BMVec>(batch_size, 1, 1);
beta = gen_mtx<BMVec>(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);
Expand All @@ -93,13 +93,13 @@ class Dense : public CommonTestFixture {
std::default_random_engine rand_engine;

const size_t batch_size = 11;
std::unique_ptr<BMtx> x;
std::unique_ptr<BMtx> mat;
std::unique_ptr<BMVec> y;
std::unique_ptr<BMVec> alpha;
std::unique_ptr<BMVec> beta;
std::unique_ptr<BMVec> expected;
std::unique_ptr<BMVec> dresult;
std::unique_ptr<BMtx> dx;
std::unique_ptr<BMtx> dmat;
std::unique_ptr<BMVec> dy;
std::unique_ptr<BMVec> dalpha;
std::unique_ptr<BMVec> dbeta;
Expand All @@ -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_type>::value);
}
Expand All @@ -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_type>::value);
}
2 changes: 1 addition & 1 deletion test/test_install/test_install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ int main()
// core/base/batch_dense.hpp
{
using type1 = float;
using batch_dense_type = gko::batch::Dense<type1>;
using batch_dense_type = gko::batch::matrix::Dense<type1>;
auto test = batch_dense_type::create(exec);
}

Expand Down

0 comments on commit e1e8ac4

Please sign in to comment.