Skip to content

[Bug fix] use padding_mode inside the kernel to process elements out of boundary for softmax#1

Merged
xjmxyt merged 2 commits intomainfrom
jinmanx/quick_fix
Dec 7, 2025
Merged

[Bug fix] use padding_mode inside the kernel to process elements out of boundary for softmax#1
xjmxyt merged 2 commits intomainfrom
jinmanx/quick_fix

Conversation

@xjmxyt
Copy link
Copy Markdown
Collaborator

@xjmxyt xjmxyt commented Dec 7, 2025

Since cutile supports that shape cannot be divisible by tile size and user-defined padding strategy, we do not need to pad the tensor.
Instead, we need to specify padding_mode.
For softmax kernel particularly, we need to pad the elements out of boundary to NEG_INF, then exp(x) is 0.

@xjmxyt xjmxyt changed the title [Bug fix] remove padding for softmax [Bug fix] use padding_mode inside the kernel to process elements out of boundary for softmax Dec 7, 2025
@xjmxyt xjmxyt merged commit 9039f58 into main Dec 7, 2025
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.

1 participant