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 a simple batched solver example #1553

Merged
merged 4 commits into from
Mar 28, 2024
Merged

Add a simple batched solver example #1553

merged 4 commits into from
Mar 28, 2024

Conversation

pratikvn
Copy link
Member

This example shows how to wrap existing user data and solve the systems with a batched solver. It also enables recording some timings, which is very useful.

@pratikvn pratikvn added reg:example This is related to the examples. 1:ST:ready-for-review This PR is ready for review type:batched-functionality This is related to the batched functionality in Ginkgo labels Feb 21, 2024
@pratikvn pratikvn requested a review from a team February 21, 2024 21:08
@pratikvn pratikvn self-assigned this Feb 21, 2024
@ginkgo-bot ginkgo-bot added the reg:build This is related to the build system. label Feb 21, 2024
Copy link
Collaborator

@fritzgoebel fritzgoebel left a comment

Choose a reason for hiding this comment

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

Mostly lgtm, just a few things

examples/batched-solver/doc/builds-on Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
allb.begin() + (isys + 1) * nrows, bval);
}

index_type* const row_ptrs = exec->alloc<index_type>(nrows + 1);
Copy link
Member

Choose a reason for hiding this comment

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

I think we will operate on the application memory not our own (as they can give us the non-const memory with current const limitation)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this function is meant to emulate the application.

Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

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

some memory/doc/name need to fix. Others LGTM

examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Show resolved Hide resolved
examples/batched-solver/batched-solver.cpp Outdated Show resolved Hide resolved
examples/batched-solver/run-batch.sh Outdated Show resolved Hide resolved
examples/batched-solver/run-batch.sh Outdated Show resolved Hide resolved
Copy link
Collaborator

@fritzgoebel fritzgoebel left a comment

Choose a reason for hiding this comment

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

LGTM

@pratikvn pratikvn added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Mar 26, 2024
pratikvn and others added 4 commits March 26, 2024 20:38
Co-authored-by: Isha Aggarwal <[email protected]>
Co-authored-by: Aditya Kashi <[email protected]>

Signed-off-by: Pratik Nayak <[email protected]>
Co-authored-by: Yu-Hsiang-Tsai <[email protected]>
@pratikvn pratikvn merged commit 8a8f1ff into develop Mar 28, 2024
10 of 15 checks passed
@pratikvn pratikvn deleted the batched-example branch March 28, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. reg:build This is related to the build system. reg:example This is related to the examples. type:batched-functionality This is related to the batched functionality in Ginkgo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants