Skip to content

Commit

Permalink
Improve equ format on very sparse matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
Xewar313 committed Nov 5, 2024
1 parent 2beec18 commit 5edd0ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions benchmarks/gbench/mp/gemv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,21 @@ mp::distributed_sparse_matrix<

namespace {
std::size_t getWidth() {
// return 8;
return default_vector_size / 100000;
return 8;//default_vector_size / 100000;
}
}
static auto getMatrix() {
// std::size_t n = std::sqrt(default_vector_size / 100000) * 50000;
// // std::size_t n = default_vector_size / 2;
// std::size_t up = n / 10;
// std::size_t down = n / 10;
// // assert(dr::mp::use_sycl());
// // assert(dr::mp::sycl_mem_kind() == sycl::usm::alloc::device);
// return dr::generate_band_csr<double,long>(n, up, down);

return dr::read_csr<double, long>("/home/komarmik/examples/mawi_201512020030.mtx");
std::size_t n = std::sqrt(default_vector_size / 100000) * 50000;
// std::size_t n = default_vector_size / 2;
std::size_t up = n / 50;
std::size_t down = n / 50;
// assert(dr::mp::use_sycl());
// assert(dr::mp::sycl_mem_kind() == sycl::usm::alloc::device);
return dr::generate_band_csr<double,long>(n, up, down);

// return dr::read_csr<double, long>("/home/komarmik/examples/soc-LiveJournal1.mtx");
// return dr::read_csr<double, long>("/home/komarmik/examples/mycielskian18.mtx");
// return dr::read_csr<double, long>("/home/komarmik/examples/mawi_201512020030.mtx");
}

static void GemvEq_DR(benchmark::State &state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class csr_eq_distribution {
auto real_segment_size =
std::min(nnz_ - rank * segment_size_, segment_size_);
auto local_data = rows_data_;
auto division = std::max(real_segment_size / 100, row_sizes_[default_comm().rank()] * 10);
auto division = real_segment_size / 50;
auto one_computation_size =
(real_segment_size + division - 1) / division;
auto row_size = row_size_;
Expand Down

0 comments on commit 5edd0ba

Please sign in to comment.