Skip to content

Standardize softmax.py to avoid numpy dependency#16

Merged
hannahli-nv merged 4 commits intoNVIDIA:mainfrom
lessw2020:lessw2020/standardize_softmax
Dec 23, 2025
Merged

Standardize softmax.py to avoid numpy dependency#16
hannahli-nv merged 4 commits intoNVIDIA:mainfrom
lessw2020:lessw2020/standardize_softmax

Conversation

@lessw2020
Copy link
Copy Markdown
Contributor

@lessw2020 lessw2020 commented Dec 21, 2025

Description

Updates softmax.py to be internally consistent with other tilegym kernels ala attention.py by removing the numpy import dependency and use -math.inf and ct.float32. (vs -np.inf and np.float32).
This also updates to use the ct dtypes (ct.float32 and ct.int32) to replace torch.int32 and torch.float32 to further standardize dtypes.

CI Configuration

config:
  build: true
  # valid options are "ops" and "benchmark"
  test: ["ops"]

Checklist

  • [ X ] Code formatted and imports sorted via repo specifications (./format.sh)
  • Documentation updated (if needed)
  • CI configuration reviewed

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Dec 21, 2025

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.

Comment thread src/tilegym/ops/cutile/softmax.py Outdated
@hannahli-nv
Copy link
Copy Markdown
Collaborator

/ok to test fb27207

@NVIDIA NVIDIA deleted a comment from hannahli-nv Dec 22, 2025
@xjmxyt
Copy link
Copy Markdown
Collaborator

xjmxyt commented Dec 22, 2025

/ok to test fb27207

Copy link
Copy Markdown
Collaborator

@hannahli-nv hannahli-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx!

@hannahli-nv hannahli-nv merged commit 10e615a into NVIDIA:main Dec 23, 2025
25 checks passed
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