Skip to content

Further improve TLSPH deformation gradient performance on GPUs in 2D#1149

Merged
efaulhaber merged 7 commits intotrixi-framework:mainfrom
efaulhaber:tlsph-deformation-grad
Apr 24, 2026
Merged

Further improve TLSPH deformation gradient performance on GPUs in 2D#1149
efaulhaber merged 7 commits intotrixi-framework:mainfrom
efaulhaber:tlsph-deformation-grad

Conversation

@efaulhaber
Copy link
Copy Markdown
Member

main new 2D main new 3D this PR 2D this PR 3D
PK1 FP32 0.872 ms 3.155 ms 0.632 ms (1.38x) 3.128 ms (1.01x)
PK1 FP64 1.397 ms 6.042 ms 1.048 ms (1.33x) 5.904 ms (1.02x)

@efaulhaber efaulhaber self-assigned this Apr 21, 2026
@efaulhaber efaulhaber mentioned this pull request Apr 21, 2026
9 tasks
@efaulhaber efaulhaber requested a review from Copilot April 21, 2026 10:34
@efaulhaber efaulhaber changed the title Further improve TLSPH deformation performance on GPUs in 2D Further improve TLSPH deformation gradient performance on GPUs in 2D Apr 21, 2026
Copy link
Copy Markdown

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 targets GPU performance improvements for Total Lagrangian SPH (TLSPH) deformation-related computations, primarily in 2D, by reducing unnecessary memory operations and using faster division in a hot loop.

Changes:

  • Avoids resetting the deformation gradient buffer by overwriting per-particle values directly.
  • Uses div_fast for per-neighbor volume computation to reduce division cost in the deformation gradient loop.
  • Minor comment wording update regarding Float64→Float32 conversion on GPUs.

Reviewed changes

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

File Description
src/schemes/structure/total_lagrangian_sph/system.jl Removes full-buffer zeroing and switches to per-particle overwrite; uses div_fast for neighbor volume computation in deformation gradient calculation.
src/schemes/structure/total_lagrangian_sph/rhs.jl Comment-only tweak clarifying Float64→Float32 conversion wording.

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

@efaulhaber efaulhaber marked this pull request as ready for review April 21, 2026 10:36
@efaulhaber efaulhaber requested review from LasNikas and svchb April 21, 2026 10:37
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.97%. Comparing base (ae1b887) to head (7b8a7d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1149      +/-   ##
==========================================
- Coverage   88.97%   88.97%   -0.01%     
==========================================
  Files         129      129              
  Lines        9981     9980       -1     
==========================================
- Hits         8881     8880       -1     
  Misses       1100     1100              
Flag Coverage Δ
total 88.97% <100.00%> (-0.01%) ⬇️
unit 67.65% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

LasNikas
LasNikas previously approved these changes Apr 22, 2026
@efaulhaber
Copy link
Copy Markdown
Member Author

/run-gpu-tests

Comment thread src/schemes/structure/total_lagrangian_sph/system.jl
Comment thread src/schemes/structure/total_lagrangian_sph/system.jl Outdated
@efaulhaber
Copy link
Copy Markdown
Member Author

/run-gpu-tests

@efaulhaber efaulhaber enabled auto-merge (squash) April 23, 2026 11:02
@efaulhaber efaulhaber merged commit a98e178 into trixi-framework:main Apr 24, 2026
24 of 26 checks passed
@efaulhaber efaulhaber deleted the tlsph-deformation-grad branch April 27, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants