Skip to content

Allow parallelism scaling of layernorm below N/SIMD = 12.#1534

Merged
auphelia merged 5 commits intodevfrom
feature/layernorm_parallelism
Mar 31, 2026
Merged

Allow parallelism scaling of layernorm below N/SIMD = 12.#1534
auphelia merged 5 commits intodevfrom
feature/layernorm_parallelism

Conversation

@preusser-amd
Copy link
Copy Markdown
Collaborator

The layernorm implementation was not able to scale to a SIMD parallelism so large that it would push the N/SIMD ratio below 12 due to a corresponding II limitation in the rsqrt implementation. This PR removes this constraint with a significant overhaul of the sqrt implementation introducing compute interleaving and DSP unrolling, which are leveraged as needed to meet the requested II requirement.

@preusser-amd preusser-amd requested a review from STFleming March 4, 2026 08:08
Copy link
Copy Markdown
Collaborator

@STFleming STFleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I removed the assertions from the compiler catching this and added some additional test coverage for the new capabilities, all tests are passing on my end.

@auphelia auphelia merged commit 20436af into dev Mar 31, 2026
2 checks passed
@auphelia auphelia deleted the feature/layernorm_parallelism branch March 31, 2026 08:08
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.

4 participants