Skip to content

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

Open
preusser-amd wants to merge 4 commits intodevfrom
feature/layernorm_parallelism
Open

Allow parallelism scaling of layernorm below N/SIMD = 12.#1534
preusser-amd wants to merge 4 commits intodevfrom
feature/layernorm_parallelism

Conversation

@preusser-amd
Copy link
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
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.

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