Skip to content

Replace Thomas-algorithm with a GPU-parallel CR-PCR implementation - #320

Open
julianlitz wants to merge 47 commits into
mainfrom
litz_vibe_code
Open

Replace Thomas-algorithm with a GPU-parallel CR-PCR implementation#320
julianlitz wants to merge 47 commits into
mainfrom
litz_vibe_code

Conversation

@julianlitz

@julianlitz julianlitz commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Merge Request - GuideLine Checklist

Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.

Checks by code author:

Always to be checked:

  • There is at least one issue associated with the pull request.
  • New code adheres with the coding guidelines
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

If functions were changed or functionality was added:

  • Tests for new functionality has been added
  • A local test was succesful

If new functionality was added:

  • There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

  • Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

  • Are new methods referenced? Did you provide further documentation?

Checks by code reviewer(s):

  • Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
  • The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
  • There are appropriate unit tests and they pass.
  • The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
  • Coverage report for new code is acceptable.
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

Updated team size handling to use Kokkos::AUTO for better backend compatibility and removed hardcoded limits on team size. Adjusted comments for clarity and correctness regarding parallel execution across different backends.
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.34423% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.47%. Comparing base (70eb7c7) to head (ec0a7d9).

Files with missing lines Patch % Lines
...e/LinearAlgebra/Solvers/tridiagonal_solver_crpcr.h 97.02% 12 Missing ⚠️
...lude/LinearAlgebra/Solvers/tridiagonal_solver_cr.h 96.68% 8 Missing ⚠️
include/LinearAlgebra/Solvers/tridiagonal_solver.h 85.71% 2 Missing ⚠️
...ude/LinearAlgebra/Solvers/tridiagonal_solver_pcr.h 99.04% 2 Missing ⚠️
.../LinearAlgebra/Solvers/tridiagonal_solver_thomas.h 98.19% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
- Coverage   97.50%   97.47%   -0.03%     
==========================================
  Files          79       83       +4     
  Lines        8643     9507     +864     
==========================================
+ Hits         8427     9267     +840     
- Misses        216      240      +24     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julianlitz julianlitz changed the title (Draft) Use AI to Refactor BatchedTridiagonalSolver Replace Thomas-algorithm with a GPU-parallel PCR implementation Aug 29, 2026
@julianlitz
julianlitz requested a review from EmilyBourne August 29, 2026 20:20
@julianlitz

julianlitz commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

@EmilyBourne This Pull Request replaces the serial tridiagonal solver with a Cyclic Reduction - Parallel Cyclic Reduction (CR-PCR) algorithm when running on the GPU.

If you have the opportunity, it would be great if you could also verify the performance on the GPU and check whether the parallel implementation provides the expected speedup.

@julianlitz julianlitz changed the title Replace Thomas-algorithm with a GPU-parallel PCR implementation Replace Thomas-algorithm with a GPU-parallel CR-PCR implementation Aug 30, 2026
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.

1 participant