refactor(ops): migrate InfiniLM adapters to canonical InfiniOps APIs - #1480
Merged
Conversation
This was referenced Aug 8, 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.
What
1b9c3765to the common validated pin21b07ebc.Alignment
geluGelu(input, approximate="none", out)torch.nn.functional.gelu, InfiniOps APIgelutanhGelu(input, approximate="tanh", out)torch.nn.functional.gelu, InfiniOps #889reluRelu(input, out)torch.nn.functional.relu, InfiniOps APIsigmoidSigmoid(input, out)torch.sigmoid, InfiniOps APIsilu_and_mulSiluAndMul(input, out)SiluAndMul, InfiniOps APIpaged_cachingReshapeAndCacheFlash(key, value, slot_mapping, k_scale, v_scale, "auto", key_cache, value_cache)reshape_and_cache_flash, InfiniOps #883topksoftmaxTopkSoftmax(gating_output, bias, is_padding, renormalize, topk_weights, topk_indices, token_expert_indices)topk_softmax, InfiniOps APIsoftmaxSoftmax(input, dim, dtype=nullopt, out)torch.nn.functional.softmax, InfiniOps #890rearrangeCopy(input, non_blocking=false, out)Tensor.copy_, InfiniOps #872, provider adaptation #897conv2dConvolution(input, weight, bias, stride, padding, dilation, false, output_padding=0, groups=1, out)torch.nn.functional.conv2d, ATenconvolutionschema, InfiniOps #882InfiniOps uses its C++ input/attribute/output ordering. Optional top-k softmax inputs are null because the current InfiniCore API does not expose them; the required auxiliary output is plan-owned internal storage. Paged caching uses metadata-only HND-to-NHD cache views and a persistent scalar scale tensor ignored by the current
autopath.Scope
No public InfiniCore Python or C++ API changes are introduced. This consolidates the unique work from #1467, #1472, and #1476-#1479, and supersedes the earlier duplicate PRs #1468-#1471 and #1473.
The existing DeepSeek MLA paged-caching case with unequal key/value head sizes (576/512) remains unsupported by both the deprecated and canonical APIs. Extending that capability is outside this adapter-only migration.
Screenshots: N/A (backend adapter migration only).
Validation
Run on
ssh nvidiainaccelerator-dev/nvidia:lateston NVIDIA A100 GPUs:git diff --check origin/main..HEADpassed.xmake install _infinicorepassed with legacy and canonical wrappers enabled together.