Add additional benchmarks#427
Draft
dheerajraghunathan wants to merge 19 commits into
Draft
Conversation
|
Thank you for your PR, here are some useful tips:
|
2ec0594 to
1dc63e4
Compare
greole
reviewed
Jan 9, 2026
Contributor
greole
left a comment
There was a problem hiding this comment.
quick comment make sure that fill and reset are not part of the benchmark section.
03d70ba to
109717a
Compare
109717a to
3ae3e1c
Compare
53be349 to
1339890
Compare
6bcb92a to
6f53157
Compare
584968c to
daf2910
Compare
Contributor
There was a problem hiding this comment.
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, interpolationlinear/upwind, andfields/field) to use the shared benchmark main and consistent executor generation. - Added a new DSL benchmark (
transportOperator) but did not yet wire thebenchmarks/dslsubdirectory 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 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 on lines
+51
to
+55
| DYNAMIC_SECTION("" << size) | ||
| { | ||
| NeoN::fill(x, NeoN::zero<TestType>()); | ||
| BENCHMARK(std::string(execName) + "_diagonal") { solver.solve(ls, x); }; | ||
| } |
greole
reviewed
May 12, 2026
3b2e3c9 to
df19ade
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)