Add field-last benchmark script#1950
Merged
Merged
Conversation
charleskawczynski
requested review from
Sbozzolo,
dennisYatunin and
sriharshakandala
August 22, 2024 00:59
charleskawczynski
force-pushed
the
ck/field_last_bm
branch
2 times, most recently
from
August 27, 2024 12:26
7a72fa6 to
4638fe2
Compare
4 tasks
charleskawczynski
force-pushed
the
ck/field_last_bm
branch
from
October 14, 2024 13:41
4638fe2 to
5e6b4c2
Compare
charleskawczynski
enabled auto-merge
October 14, 2024 13:42
charleskawczynski
force-pushed
the
ck/field_last_bm
branch
3 times, most recently
from
October 15, 2024 00:17
48a2946 to
9a6fbfe
Compare
charleskawczynski
force-pushed
the
ck/field_last_bm
branch
from
October 15, 2024 12:36
9a6fbfe to
179e4e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a benchmark to compare a dropped field dimension against moving the field dimension to the last index. This benchmark turned out to be a pretty simple modification of the offset benchmark.
cc @dennisYatunin (who was interested in this benchmark).
Let's look at the
Float32results for two kernels:Note that
soa_linear_index!is what #1929 implements.aos_lin_offset!would be the best we can get by moving the field index to the last index. So, if we move the field dimension to the end, and avoid converting to cartesian indices altogether, we can reach maximum performance, even in "low-utilization" expressions (where not all field variables are used). I'm happy to merge this as a way to document our performance analysis.This supports that moving the field dimension to the end of the datalayout (in addition to leveraging linear indexing) will fix #1910.
cc @cmbengue, @tapios