Skip to content

Use aligned loads for tcq rate - #5546

Merged
urvangjoshi merged 1 commit into
AOMediaCodec:av2-encfrom
amd:15Oct2026_tcq_aligned_load
Oct 19, 2026
Merged

urvangjoshi merged 1 commit into
AOMediaCodec:av2-encfrom
amd:15Oct2026_tcq_aligned_load

Conversation

@amd-nithyavs

Copy link
Copy Markdown

tcq_rate_t struct is aligned to 64 bytes so that aligned loads can be used in the decide avx2 kernels.

On Zen5C, geomean speedup of 1.13x is seen.

@amd-nithyavs

Copy link
Copy Markdown
Author

gtest results on Turin-dense (compiler AOCC 5.2.0):

TX size Coeffs Pure C (us) AVX2 base (us) AVX2 aligned (us) vs AVX2 base vs Pure C
4x4 16 59846 31852 30173 1.06x (+5.3%) 1.98x
8x8 64 195399 77282 69844 1.11x (+9.6%) 2.80x
16x16 256 182247 62789 53812 1.17x (+14.3%) 3.39x
32x32 1024 147041 47200 40184 1.17x (+14.9%) 3.66x
4x8 32 102385 47416 44276 1.07x (+6.6%) 2.31x
8x4 32 107340 47549 42403 1.12x (+10.8%) 2.53x
8x16 128 90733 33271 29249 1.14x (+12.1%) 3.10x
16x8 128 92116 33043 29169 1.13x (+11.7%) 3.16x
16x32 512 72209 23960 20576 1.16x (+14.1%) 3.51x
32x16 512 74218 24051 20609 1.17x (+14.3%) 3.60x
4x16 64 190415 77262 70295 1.10x (+9.0%) 2.71x
16x4 64 204169 78510 71164 1.10x (+9.4%) 2.87x
8x32 256 180946 63138 54746 1.15x (+13.3%) 3.31x
32x8 256 187576 62567 54110 1.16x (+13.5%) 3.47x
Geomean 1.13x (+11.4%) 2.98x

CTC 33 frames on cpu-used 1 - a4: 1.76%, a5: 1.9% - baseline: b38429d

@amd-nithyavs

Copy link
Copy Markdown
Author

@yunqingwang1 Please review

tcq_rate_t struct is aligned to 64 bytes so that aligned loads can be
used in the decide avx2 kernels.

On Zen5C, geomean speedup of 1.13x is seen.
@amd-nithyavs
amd-nithyavs force-pushed the 15Oct2026_tcq_aligned_load branch from 5aa0aa3 to dcc90b2 Compare October 18, 2026 10:07
@urvangjoshi
urvangjoshi enabled auto-merge (rebase) October 19, 2026 15:27
@urvangjoshi
urvangjoshi disabled auto-merge October 19, 2026 16:45
@urvangjoshi
urvangjoshi merged commit a94910e into AOMediaCodec:av2-enc Oct 19, 2026
107 checks passed
@amd-nithyavs
amd-nithyavs deleted the 15Oct2026_tcq_aligned_load branch October 21, 2026 03:59
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