Skip to content

Add CSR segment_softmax functional#1759

Draft
mnabian wants to merge 2 commits into
mainfrom
mnabian/fn_segment_softmax
Draft

Add CSR segment_softmax functional#1759
mnabian wants to merge 2 commits into
mainfrom
mnabian/fn_segment_softmax

Conversation

@mnabian

@mnabian mnabian commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

PhysicsNeMo Pull Request

Description

Adds segment_softmax, a backend-dispatched functional for numerically stable softmax over CSR/ragged segments.

This is intended as a low-level primitive for sparse/local attention over variable-size neighborhoods, such as anchor-to-point aggregation, graph attention, and ragged neighborhood attention without padding or PyG/torch_scatter.

weights = segment_softmax(logits, offsets)

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@copy-pr-bot

copy-pr-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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