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

Fix batch norm vectorize path accuracy issue by enforcing shape alignment #1238

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

xytintel
Copy link
Contributor

@xytintel xytintel commented Dec 31, 2024

When to implement a kernel for all shapes with vectorized LD/ST, we have to handle non-aligned head (base address) and short tail (tail < vector size). Before the commit, there was lack of head handling which leaded to non-vector-size-aligned vectorized ST.
The fixing enforces shapes for vectorize path. The vectorized kernel could be called only in the case in which feature dim could be divided by vector size. There will always be aligned head and exact tail.

@xytintel xytintel changed the title Fix batch norm vectorize path accuracy issue Fix batch norm vectorize path accuracy issue by enforcing shape alignment Dec 31, 2024
@mengfei25 mengfei25 closed this Dec 31, 2024
@mengfei25 mengfei25 reopened this Dec 31, 2024
@xytintel xytintel added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit f634c3c Jan 3, 2025
2 of 3 checks passed
@xytintel xytintel deleted the xyt/batch_norm_vec_fix branch January 3, 2025 01:57
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