Skip to content

Fill CUDA opset gap for Softplus and Softsign to opset 22 - #28982

Merged
tianleiwu merged 1 commit into
microsoft:mainfrom
elwhyjay:feature/cuda-softplus-softsign-opset22
Jun 12, 2026
Merged

Fill CUDA opset gap for Softplus and Softsign to opset 22#28982
tianleiwu merged 1 commit into
microsoft:mainfrom
elwhyjay:feature/cuda-softplus-softsign-opset22

Conversation

@elwhyjay

Copy link
Copy Markdown
Contributor

Closes part of #27729.

The CUDA EP registered Softplus and Softsign only for opset 1 (HFD). Opset 22 extended the type constraint to include BFloat16, but the CUDA EP was never updated. The BFloat16 compute kernels were already instantiated via UNARY_ACTIVATION_OP_HFD_WITH_BF16; only the EP registration was missing.

Changes:

  • Cap opset-1 kernels as versioned [1, 21] (Softplus, Softsign)
  • Register opset-22 kernels with BFloat16 support (HFDX)
  • Add opset-22 tests: float (CPU+CUDA) and BFloat16 (CUDA, sm≥530)
  • Update docs/OperatorKernels.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates ONNX Runtime’s CUDA Execution Provider to correctly register Softplus and Softsign kernels through opset 22+, matching the ONNX schema change that extends type constraints to include BFloat16 (while keeping existing kernels valid for opsets 1–21). It also adds regression tests and updates the generated operator-kernel documentation accordingly.

Changes:

  • Version-cap CUDA Softplus/Softsign kernel registrations to [1, 21] and add 22+ registrations including BFloat16.
  • Add opset-22 unit tests for Softplus/Softsign (float) and CUDA-only BF16 coverage.
  • Update generated docs/OperatorKernels.md entries to reflect the new registration ranges/types.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
onnxruntime/test/providers/cpu/activation/activation_op_test.cc Adds opset-22 tests for Softplus/Softsign including CUDA BF16 cases.
onnxruntime/core/providers/cuda/cuda_execution_provider.cc Updates CUDA kernel registration ranges and adds opset-22 typed registrations with BF16.
onnxruntime/core/providers/cuda/activation/activations.cc Adjusts CUDA activation kernel instantiations to split opset 1–21 vs 22+ (BF16).
docs/OperatorKernels.md Updates the generated CUDA EP kernel table entries for Softplus/Softsign opset ranges and supported types.

Comment thread onnxruntime/test/providers/cpu/activation/activation_op_test.cc
@tianleiwu
tianleiwu merged commit 7db7893 into microsoft:main Jun 12, 2026
85 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