Fill CUDA opset gap for Softplus and Softsign to opset 22 - #28982
Merged
tianleiwu merged 1 commit intoJun 12, 2026
Conversation
Contributor
There was a problem hiding this comment.
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.mdentries 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. |
tianleiwu
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
docs/OperatorKernels.md