Skip to content

refactor(ops): migrate activation adapters to canonical InfiniOps APIs - #1468

Closed
voltjia wants to merge 1 commit into
mainfrom
refactor/migrate-activation-infiniops
Closed

refactor(ops): migrate activation adapters to canonical InfiniOps APIs#1468
voltjia wants to merge 1 commit into
mainfrom
refactor/migrate-activation-infiniops

Conversation

@voltjia

@voltjia voltjia commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate the InfiniCore ReLU adapter from deprecated ReluInfinilm to canonical Relu
  • migrate the InfiniCore SiLU-and-multiply adapter from deprecated SiluAndMulInfinilm to canonical SiluAndMul
  • keep the InfiniCore public API, dispatch behavior, and pinned InfiniOps submodule unchanged

API alignment

InfiniCore adapter Previous InfiniOps API Canonical InfiniOps API Alignment target and evidence
ReLU ReluInfinilm::Call(handle, config, input, out) Relu::Call(handle, config, input, out) PyTorch Python API: torch.nn.functional.relu(input, inplace=False). InfiniOps retains its C++ input/output convention while using the canonical operator name and unary input contract.
SiLU and multiply SiluAndMulInfinilm::Call(handle, config, input, out) SiluAndMul::Call(handle, config, input, out) vLLM Python API: SiluAndMul.forward(x) -> Tensor, with x[..., :d] gated by SiLU and multiplied by x[..., d:]. InfiniOps exposes the same single-input contract with an explicit output tensor.

The currently pinned InfiniOps commit (1b9c37659211eeaeedb48b9691f79e4c9e4412f9) already provides both canonical operators, so this PR does not update the submodule.

Validation

Validated commit 0dbf6e0d remotely on ssh nvidia with accelerator-dev/nvidia:latest:

  • built and installed _infinicore from a clean checkout with the exact pinned submodules
  • confirmed libinfinicore_cpp_api.so resolves libinfiniops.so from the exact installed package
  • ran python3 test/infinicore/ops/silu_and_mul.py --nvidia: 36/36 passed across FP16, BF16, FP32, functional, and out-parameter cases
  • compiled and ran a temporary C++ smoke test through infinicore::op::relu on NVIDIA; device execution and host result comparison passed
  • clang-format-16 --dry-run --Werror passed for both changed 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