Skip to content

refactor(ops): migrate GELU and sigmoid to canonical InfiniOps APIs - #1473

Closed
voltjia wants to merge 1 commit into
refactor/migrate-paged-caching-infiniopsfrom
refactor/migrate-gelu-sigmoid-infiniops
Closed

refactor(ops): migrate GELU and sigmoid to canonical InfiniOps APIs#1473
voltjia wants to merge 1 commit into
refactor/migrate-paged-caching-infiniopsfrom
refactor/migrate-gelu-sigmoid-infiniops

Conversation

@voltjia

@voltjia voltjia commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate the InfiniCore GELU adapters from deprecated GeluInfinilm and GelutanhInfinilm to canonical Gelu
  • select the PyTorch-compatible none and tanh approximation modes explicitly
  • migrate the sigmoid adapter from deprecated SigmoidInfinilm to canonical Sigmoid
  • keep the InfiniCore public APIs and graph behavior unchanged

API alignment

InfiniCore adapter Previous InfiniOps API Canonical InfiniOps API Alignment target and evidence
GELU GeluInfinilm::Call(handle, config, input, approximate, out) Gelu::Call(handle, config, input, approximate, out) PyTorch Python API: torch.nn.functional.gelu(input, approximate='none'). The ordinary adapter passes none; the tanh adapter passes tanh. InfiniOps adds an explicit trailing output tensor.
Sigmoid SigmoidInfinilm::Call(handle, config, input, out) Sigmoid::Call(handle, config, input, out) PyTorch Python API: torch.sigmoid(input, *, out=None). InfiniOps represents the optional Python output as its required trailing C++ output tensor.

Dependency

This PR is based on refactor/migrate-paged-caching-infiniops / #1467 and advances the InfiniOps gitlink from e733e325 to 498c9aaa, the head of InfiniOps #889, which adds canonical CUDA-compatible GELU and sigmoid providers.

Against #1467, this PR changes three adapter files and the InfiniOps gitlink.

Validation

Validated commit 37b8fb8b remotely on ssh nvidia with accelerator-dev/nvidia:latest, using the exact InfiniOps #889 head 498c9aaa in a temporary integration merge:

  • built and installed _infinicore with the canonical gelu and sigmoid providers in the wrapper allowlist
  • ran python3 test/infinicore/ops/sigmoid.py --nvidia: 45/45 passed
  • compiled and ran a temporary C++ NVIDIA smoke test through infinicore::op::gelu and infinicore::op::gelu_tanh; both outputs matched host references
  • clang-format 16.0.6 --dry-run --Werror passed for all three changed C++ files
  • git diff --check passed

@voltjia

voltjia commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #1480, which consolidates the canonical InfiniOps adapter migrations while preserving each logical change as a separate commit.

@voltjia voltjia closed this Aug 8, 2026
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