Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sparse matrix to mp #860

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open

Add sparse matrix to mp #860

wants to merge 68 commits into from

Conversation

Xewar313
Copy link
Contributor

@Xewar313 Xewar313 commented Nov 5, 2024

No description provided.

@Xewar313 Xewar313 marked this pull request as ready for review November 19, 2024 13:06
Copy link
Contributor

@lslusarczyk lslusarczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first few comments, next are comming


namespace mp = dr::mp;

#ifdef STANDALONE_BENCHMARK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see in any of CMakeLists.txt building gemv.cpp with STANDALONE_BENCHMARK option. Code under this ifdef is never compiled. Please remove if you don't need it or add a target to cmakelists to make it being compiled and take care it is compiled during CI (to catch compile time errors in CI)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, I removed it, since it is not strictly necessary for benchmarking

}
} // namespace
static auto getMatrix() {
std::size_t n = std::max(1., std::sqrt(default_vector_size / 100000)) * 50000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_vector_size is to be more-less equal to size of data being allocated. However when I run all benchamrks on dnp02 host the only tests which fail with bad_alloc are Gemv_DR.

Please add explanation to the code what are 100000 and 50000 constants for.

Please make the benchamrk allocating more less the same ammount of data like other benchmars so command:\

ONEAPI_DEVICE_SELECTOR='level_zero:gpu' I_MPI_OFFLOAD=1 \
I_MPI_OFFLOAD_CELL_LIST=0-11 I_MPI_HYDRA_BOOTSTRAP=ssh \
mpiexec -n 2 -ppn 2  build/benchmarks/gbench/mp/mp-bench --vector-size 1000000000 \
--reps 50 --v=3 --benchmark_filter=GemvEq_DR/ --sycl

will not fail on kdse-pre-dnp-02

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I corrected sizes of the matrix, so that data size is actually similar (not exactly the same, but very close).

The line with 100000 and 50000 was commented out, and added comment that that matrix size is suitable for weak testing with dr-bench.

The command should also be working on kdse-pre-dnp-02

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's important, it may sometimes freeze - it is due to gtest deciding on some hosts to stop iterating state, and not on others. I am not sure why it decides that, but in that case the test needs to be re-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants