Skip to content

refactor(cuda): adapt InfiniLM softmax provider - #902

Merged
voltjia merged 1 commit into
feat/add-canonical-softmax-providerfrom
refactor/adapt-infinilm-softmax-provider
Aug 7, 2026
Merged

refactor(cuda): adapt InfiniLM softmax provider#902
voltjia merged 1 commit into
feat/add-canonical-softmax-providerfrom
refactor/adapt-infinilm-softmax-provider

Conversation

@voltjia

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the standalone CUDA implementation behind SoftmaxInfinilm with a thin adapter to the canonical Softmax provider introduced by feat(cuda): add canonical softmax providers #890.
  • Preserve the deprecated InfiniLM schema and its existing tests; this PR changes provider ownership only.

Motivation

The deprecated compatibility operator should not retain a separate CUDA kernel after the canonical, PyTorch-aligned operator exists. Sharing the provider keeps legacy callers working while removing a duplicate implementation path.

Depends on #890.

Type of Change

  • feat - new feature / new operator / new platform
  • fix - bug fix
  • perf - performance improvement (no behavioral change)
  • refactor - code restructuring without behavior change
  • test - adding or fixing tests only
  • docs - documentation only
  • build / ci - build system or CI configuration
  • chore - tooling, formatting, or other non-code changes
  • Breaking change

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

cmake -S . -B build-adapters -DINFINI_OPS_OPS=softmax,softmax_infinilm
cmake --build build-adapters --parallel 8
# NVIDIA build passed

Test Results on Supported Platforms

PlatformAffectedBuild / Smoke ResultFull Result / Notes
NVIDIAYesfocused build passed48 passed, 36 skipped
IluvatarNoN/A - not affectedN/A
MetaXNoN/A - not affectedN/A
CambriconNoN/A - not affectedN/A
MooreNoN/A - not affectedN/A
AscendNoN/A - not affectedN/A
Focused pytest output
python3 -m pytest tests/test_softmax.py tests/test_softmax_infinilm.py -q
48 passed, 36 skipped in 3.60s

Benchmark / Performance Impact

N/A. This is provider reuse with no intended behavior or performance change.

Notes for Reviewers

Deprecated compatibility APICanonical targetAlignment basis
SoftmaxInfinilm(input, dim, dtype, out)Softmax(input, dim, dtype, out)PyTorch torch.nn.functional.softmax(input, dim=None, ..., dtype=None)

The canonical interface preserves the Python-level argument order (input, dim, dtype), followed by InfiniOps' explicit output tensor per CONTRIBUTING.md.

@voltjia
voltjia merged commit 3bc91db into feat/add-canonical-softmax-providerAug 7, 2026
6 checks passed
@voltjia
voltjia deleted the refactor/adapt-infinilm-softmax-provider branch August 7, 2026 11:17
voltjia added a commit that referenced this pull request Aug 7, 2026
* feat(ops): add canonical softmax providers
* refactor(cuda): adapt InfiniLM softmax provider (#902)
Sign up for freeto 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

@voltjia