Skip to content

Add softmax_last_dim backward pass#3591

Open
HueCodes wants to merge 1 commit into
huggingface:mainfrom
HueCodes:softmax-last-dim-bwd
Open

Add softmax_last_dim backward pass#3591
HueCodes wants to merge 1 commit into
huggingface:mainfrom
HueCodes:softmax-last-dim-bwd

Conversation

@HueCodes

@HueCodes HueCodes commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #3569.

Adds backward support for softmax_last_dim so gradients propagate through the optimized op.

Adds a regression test that checks the gradient against explicit expected values and the generic softmax(..., D::Minus1) path.

Signed-off-by: Hugh Ryan <197298026+HueCodes@users.noreply.github.com>
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.

candle-nn: ops::softmax_last_dim is apply_op1_no_bwd; severs autograd (same pattern as #2168 / PR #3526)

1 participant