Skip to content

Add additional benchmarks#427

Draft
dheerajraghunathan wants to merge 19 commits into
developfrom
enh/benchmarks
Draft

Add additional benchmarks#427
dheerajraghunathan wants to merge 19 commits into
developfrom
enh/benchmarks

Conversation

@dheerajraghunathan
Copy link
Copy Markdown
Collaborator

@dheerajraghunathan dheerajraghunathan commented Jan 7, 2026

Currently, we have only four benchmarks: fields, divOperator, linear, and upwind. This PR adds more to the list.

List of benchmarks added/modified: (more todo)

  1. divOperator
  2. gradOperator
  3. laplacianOperator
  4. sourceTerm
  5. ddtOperator
  6. field
  7. transportOperator - (combined operator)
  8. sparsityPattern

@dheerajraghunathan dheerajraghunathan added skip-changelog skip-build Skip all the build-and-test jobs in CI benchmark Enable benchmark jobs on GPUs in CI and removed skip-build Skip all the build-and-test jobs in CI labels Jan 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2026

Thank you for your PR, here are some useful tips:

Copy link
Copy Markdown
Contributor

@greole greole left a comment

Choose a reason for hiding this comment

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

quick comment make sure that fill and reset are not part of the benchmark section.

Comment thread benchmarks/finiteVolume/cellCentred/operator/divOperator.cpp Outdated
Comment thread benchmarks/finiteVolume/cellCentred/operator/divOperator.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands NeoN’s benchmark suite beyond the existing set by adding new benchmark executables for finite-volume operators, linear-algebra components, and a combined DSL “transport operator” expression, plus wiring new benchmark subdirectories into the benchmarks build.

Changes:

  • Added new benchmark targets for linear-algebra (linearSystem, solver, sparsityPattern) and several FV cell-centred operators (gradOperator, laplacianOperator, sourceTerm, ddtOperator).
  • Updated existing benchmarks (e.g., divOperator, interpolation linear/upwind, and fields/field) to use the shared benchmark main and consistent executor generation.
  • Added a new DSL benchmark (transportOperator) but did not yet wire the benchmarks/dsl subdirectory into the top-level benchmarks CMake.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
benchmarks/CMakeLists.txt Adds linearAlgebra benchmarks subdir (but currently does not add dsl).
benchmarks/dsl/CMakeLists.txt Declares the transportOperator benchmark target.
benchmarks/dsl/transportOperator.cpp Adds combined explicit/implicit transport-expression benchmark.
benchmarks/fields/field.cpp Reworks field benchmarks to cover internal/boundary fills and copies.
benchmarks/finiteVolume/cellCentred/interpolation/linear.cpp Updates interpolation benchmark to shared benchmark main + executor generator.
benchmarks/finiteVolume/cellCentred/interpolation/upwind.cpp Updates interpolation benchmark to shared benchmark main + executor generator.
benchmarks/finiteVolume/cellCentred/operator/CMakeLists.txt Registers new FV operator benchmark targets.
benchmarks/finiteVolume/cellCentred/operator/ddtOperator.cpp Adds ddt operator benchmark (explicit + implicit schemes).
benchmarks/finiteVolume/cellCentred/operator/divOperator.cpp Extends div operator benchmark to template types + explicit/implicit sections.
benchmarks/finiteVolume/cellCentred/operator/gaussGreenGrad.cpp Removes old benchmark file.
benchmarks/finiteVolume/cellCentred/operator/gradOperator.cpp Fixes include path + renames/adds explicit grad benchmark.
benchmarks/finiteVolume/cellCentred/operator/laplacianOperator.cpp Adds laplacian operator benchmark (explicit + implicit).
benchmarks/finiteVolume/cellCentred/operator/sourceTerm.cpp Adds source term benchmark (explicit + implicit).
benchmarks/linearAlgebra/CMakeLists.txt Registers new linear-algebra benchmark targets.
benchmarks/linearAlgebra/linearSystem.cpp Adds linear system construction/reset benchmarks.
benchmarks/linearAlgebra/sparsityPattern.cpp Adds sparsity pattern construction benchmark.
benchmarks/linearAlgebra/solver.cpp Adds solver benchmarks (diagonal + optional Ginkgo CG).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmarks/finiteVolume/cellCentred/operator/sourceTerm.cpp Outdated
Comment thread benchmarks/finiteVolume/cellCentred/operator/sourceTerm.cpp
Comment thread benchmarks/finiteVolume/cellCentred/operator/sourceTerm.cpp
Comment thread benchmarks/finiteVolume/cellCentred/operator/ddtOperator.cpp Outdated
Comment thread benchmarks/finiteVolume/cellCentred/operator/ddtOperator.cpp
Comment on lines +112 to +127
NeoN::Vector<TestType> rhs(exec, phi.size(), NeoN::zero<TestType>());

// Build Explicit Expression
auto expr = NeoN::dsl::exp::ddt(phi) + NeoN::dsl::exp::div(faceFlux, phi)
+ NeoN::dsl::exp::laplacian(gamma, phi) + NeoN::dsl::exp::source(coeff, phi);

expr.read(fvSchemes);

BENCHMARK(std::string(execName) + "_explicit_combined")
{
// rhs += ddt(phi)
expr.explicitOperation(rhs, t, dt);

// rhs += div(faceFlux, phi) + laplacian(gamma, phi) + source(coeff, phi)
expr.explicitOperation(rhs);
};
Comment thread benchmarks/dsl/transportOperator.cpp
Comment thread benchmarks/dsl/transportOperator.cpp
Comment on lines +51 to +55
DYNAMIC_SECTION("" << size)
{
NeoN::fill(x, NeoN::zero<TestType>());
BENCHMARK(std::string(execName) + "_diagonal") { solver.solve(ls, x); };
}
Comment thread benchmarks/linearAlgebra/solver.cpp
Comment thread benchmarks/linearAlgebra/solver.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark Enable benchmark jobs on GPUs in CI skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants