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

Aligned single blob SoA #415

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

bernhardmgruber
Copy link
Member

@bernhardmgruber bernhardmgruber commented Nov 15, 2021

This PR adds a new flag to the single blob SoA mapping to allow aligning the sub arrays.

  • unit tests
  • performance test

@bernhardmgruber bernhardmgruber force-pushed the aligned_soa branch 2 times, most recently from 3a552a8 to 761f673 Compare June 15, 2022 15:57
@bernhardmgruber bernhardmgruber force-pushed the aligned_soa branch 3 times, most recently from 9414c86 to 73c40d0 Compare June 15, 2022 17:10
@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #415 (2e65925) into develop (e38df38) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #415      +/-   ##
===========================================
+ Coverage    99.26%   99.29%   +0.02%     
===========================================
  Files           63       63              
  Lines         5609     5782     +173     
===========================================
+ Hits          5568     5741     +173     
  Misses          41       41              

@bernhardmgruber
Copy link
Member Author

bernhardmgruber commented Jun 16, 2022

Running the n-body example with changing the Y field in Pos and Vel to a double, so alignment actually matters:

Packed Single Blob SoA
Blob size: 65536
update 0.19956 s	move 5.35e-06 s
update 0.199539 s	move 5.369e-06 s
update 0.199493 s	move 4.84e-06 s
update 0.199491 s	move 4.81e-06 s
update 0.199157 s	move 7.48e-06 s

Aligned Single Blob SoA
Blob size: 589824
update 0.193708 s	move 6.5e-06 s
update 0.193934 s	move 6.38e-06 s
update 0.19397 s	move 6.63e-06 s
update 0.193862 s	move 5.46e-06 s
update 0.193874 s	move 7.38e-06 s

While performance is great, the blob size is worrying.

@bernhardmgruber
Copy link
Member Author

Ok, looks good now:

Packed Single Blob SoA
Blob size: 590292
update 0.197272 s	move 4.66e-06 s
update 0.198951 s	move 4.73e-06 s
update 0.197934 s	move 4.69e-06 s
update 0.197823 s	move 4.67e-06 s
update 0.197902 s	move 4.65e-06 s

Aligned Single Blob SoA
Blob size: 590296
update 0.197533 s	move 4.62e-06 s
update 0.197976 s	move 4.54e-06 s
update 0.196911 s	move 4.59e-06 s
update 0.197672 s	move 1.45e-05 s
update 0.199223 s	move 5.39e-06 s

@bernhardmgruber bernhardmgruber marked this pull request as ready for review June 16, 2022 09:27
@bernhardmgruber bernhardmgruber merged commit 229457a into alpaka-group:develop Jun 16, 2022
@bernhardmgruber bernhardmgruber deleted the aligned_soa branch June 16, 2022 11:20
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