Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions benchmark/solver/solver_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ struct SolverBenchmark : Benchmark<solver_benchmark_state<Generator>> {
for (auto _ : ic.warmup_run()) {
auto x_clone = clone(state.x);
auto precond = precond_factory.at(precond_name)(exec);
solver = generate_solver(exec, give(precond), solver_name,
FLAGS_warmup_max_iters)
->generate(state.system_matrix);
auto solver = generate_solver(exec, give(precond), solver_name,
FLAGS_warmup_max_iters)
->generate(state.system_matrix);
solver->apply(state.b, x_clone);
exec->synchronize();
}
Expand Down Expand Up @@ -580,10 +580,10 @@ struct SolverBenchmark : Benchmark<solver_benchmark_state<Generator>> {
auto generate_timer = get_timer(exec, FLAGS_gpu_timer);
auto apply_timer = ic.get_timer();
auto x_clone = clone(state.x);
// if we benchmark from scratch, we generate it here and do operations
// once. we can not rely on the warmup one because it use different
// iteration criterion.
if (FLAGS_benchmark_from_scratch) {
// if we do not benchmark from scratch, we generate it here and do
// operations once. we can not rely on the warmup one because it uses
// different iteration criterion.
if (!FLAGS_benchmark_from_scratch) {
auto precond = precond_factory.at(precond_name)(exec);
solver = gko::share(generate_solver(exec, give(precond),
solver_name, FLAGS_max_iters)
Expand All @@ -603,7 +603,9 @@ struct SolverBenchmark : Benchmark<solver_benchmark_state<Generator>> {
FLAGS_max_iters)
->generate(state.system_matrix));
generate_timer->toc();
if (FLAGS_benchmark_from_scratch || !solver) {
// when it is not from scratch, we always generate it explicitly
// before for-loop
if (FLAGS_benchmark_from_scratch) {
solver = generated_solver;
}
}
Expand Down
332 changes: 327 additions & 5 deletions benchmark/test/reference/distributed_solver.profile.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: begin repetition
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: begin generate(<typename>)
DEBUG: begin generate(<typename>)
DEBUG: end generate(<typename>)
Expand Down Expand Up @@ -455,6 +450,333 @@ DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: end apply(<typename>)
DEBUG: begin repetition
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: begin generate(<typename>)
DEBUG: begin generate(<typename>)
DEBUG: end generate(<typename>)
DEBUG: end generate(<typename>)
DEBUG: begin apply(<typename>)
DEBUG: begin iteration
DEBUG: begin cg::initialize
DEBUG: end cg::initialize
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end advanced_apply(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: begin iteration
DEBUG: begin cg::step_1
DEBUG: end cg::step_1
DEBUG: begin apply(<typename>)
DEBUG: begin dense::row_gather
DEBUG: end dense::row_gather
DEBUG: begin apply(<typename>)
DEBUG: begin csr::spmv
DEBUG: end csr::spmv
DEBUG: end apply(<typename>)
DEBUG: begin advanced_apply(<typename>)
DEBUG: begin csr::advanced_spmv
DEBUG: end csr::advanced_spmv
DEBUG: end advanced_apply(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin cg::step_2
DEBUG: end cg::step_2
DEBUG: begin apply(<typename>)
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
DEBUG: end dense::copy
DEBUG: end copy(<typename>)
DEBUG: end apply(<typename>)
DEBUG: begin dense::compute_conj_dot_dispatch
DEBUG: end dense::compute_conj_dot_dispatch
DEBUG: begin check(<typename>)
DEBUG: begin check(<typename>)
DEBUG: begin dense::compute_squared_norm2
DEBUG: end dense::compute_squared_norm2
DEBUG: begin dense::compute_sqrt
DEBUG: end dense::compute_sqrt
DEBUG: begin residual_norm::residual_norm
DEBUG: end residual_norm::residual_norm
DEBUG: end check(<typename>)
DEBUG: end check(<typename>)
DEBUG: end iteration
DEBUG: end apply(<typename>)
DEBUG: end repetition
DEBUG: begin copy(<typename>)
DEBUG: begin dense::copy
Expand Down
Loading