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

Make Simulation mutable and loc(T=Float32) #149

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Make Simulation mutable and loc(T=Float32) #149

merged 2 commits into from
Jul 22, 2024

Conversation

weymouth
Copy link
Collaborator

@weymouth weymouth commented Jul 22, 2024

Made the Simulation type mutable and made loc return a Float32 by default. These change help ParametricBodies run on GPUs.

I think the difference is in the noise, but maybe @b-fg should double check...

@weymouth weymouth changed the title Make Simulation mutable and loc(T=Float64) Make Simulation mutable and loc(T=Float32) Jul 22, 2024
@weymouth
Copy link
Collaborator Author

Benchmarks vs f38bea4 (master)

TGV

▶ log2p = 6
┌─────────┬───────────┬────────┬───────────┬─────────────┬────────┬──────────┬──────────┐
│ Backend │ WaterLily │ Julia  │ Precision │ Allocations │ GC [%] │ Time [s] │ Speed-up │
├─────────┼───────────┼────────┼───────────┼─────────────┼────────┼──────────┼──────────┤
│     GPU │   f38bea4 │ 1.10.0 │   Float32 │     2799117 │   0.66 │     2.37 │     1.00 │
│     GPU │   73475d2 │ 1.10.0 │   Float32 │     2802899 │   0.64 │     2.26 │     1.04 │
└─────────┴───────────┴────────┴───────────┴─────────────┴────────┴──────────┴──────────┘
▶ log2p = 7
┌─────────┬───────────┬────────┬───────────┬─────────────┬────────┬──────────┬──────────┐
│ Backend │ WaterLily │ Julia  │ Precision │ Allocations │ GC [%] │ Time [s] │ Speed-up │
├─────────┼───────────┼────────┼───────────┼─────────────┼────────┼──────────┼──────────┤
│     GPU │   f38bea4 │ 1.10.0 │   Float32 │     2442026 │   0.15 │     7.80 │     1.00 │
│     GPU │   73475d2 │ 1.10.0 │   Float32 │     2444749 │   0.15 │     7.71 │     1.01 │
└─────────┴───────────┴────────┴───────────┴─────────────┴────────┴──────────┴──────────┘

Jelly

▶ log2p = 5
┌─────────┬───────────┬────────┬───────────┬─────────────┬────────┬──────────┬──────────┐
│ Backend │ WaterLily │ Julia  │ Precision │ Allocations │ GC [%] │ Time [s] │ Speed-up │
├─────────┼───────────┼────────┼───────────┼─────────────┼────────┼──────────┼──────────┤
│     GPU │   f38bea4 │ 1.10.0 │   Float32 │     2652446 │   0.47 │     1.97 │     1.00 │
│     GPU │   73475d2 │ 1.10.0 │   Float32 │     2652241 │   0.44 │     1.88 │     1.05 │
└─────────┴───────────┴────────┴───────────┴─────────────┴────────┴──────────┴──────────┘
▶ log2p = 6
┌─────────┬───────────┬────────┬───────────┬─────────────┬────────┬──────────┬──────────┐
│ Backend │ WaterLily │ Julia  │ Precision │ Allocations │ GC [%] │ Time [s] │ Speed-up │
├─────────┼───────────┼────────┼───────────┼─────────────┼────────┼──────────┼──────────┤
│     GPU │   f38bea4 │ 1.10.0 │   Float32 │     2801011 │   0.15 │     5.75 │     1.00 │
│     GPU │   73475d2 │ 1.10.0 │   Float32 │     2800807 │   0.25 │     5.66 │     1.02 │
└─────────┴───────────┴────────┴───────────┴─────────────┴────────┴──────────┴──────────┘

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
src/WaterLily.jl 96.55% <ø> (ø)
src/util.jl 86.02% <100.00%> (ø)

@weymouth weymouth merged commit d23ac35 into master Jul 22, 2024
42 checks passed
@b-fg
Copy link
Member

b-fg commented Jul 22, 2024

I will check!

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.

3 participants