Skip to content

refactor(ops): name Infinilm replacements - #915

Closed
voltjia wants to merge 1 commit into
masterfrom
refactor/name-infinilm-replacements
Closed

refactor(ops): name Infinilm replacements#915
voltjia wants to merge 1 commit into
masterfrom
refactor/name-infinilm-replacements

Conversation

@voltjia

Copy link
Copy Markdown
Collaborator

Summary

  • Replace generic deprecation diagnostics on seven Infinilm compatibility operators with their concrete canonical replacements.
  • Keep the legacy classes, signatures, providers, and tests unchanged.
  • Leave the four interfaces without a complete single-operator replacement on the generic migration diagnostic.

Motivation

The canonical destinations for convolution, paged cache writes, decode/prefill attention, copies, batched top-k/top-p sampling, and zero filling are now present on master. Their deprecated compatibility APIs should name those destinations directly so compiler diagnostics provide actionable migration guidance.

No issue is linked. PR #893 was closed separately after the post-#911 audit because it targeted the retired vLLM v0.6.3 paged_attention_v1 wrapper and duplicated the maintained FlashAttention replacement path.

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 (requires a ! in the Conventional Commits prefix or a BREAKING CHANGE: footer)

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

Only compile-time deprecation text changes. Runtime behavior is unchanged on every platform.

Smoke Test Result

Remote environment: ssh nvidia, image accelerator-dev/nvidia:latest, with the existing InfiniRT prefix and /tmp CUTLASS source.

$ CMAKE_BUILD_PARALLEL_LEVEL=8 python3 -m pip install . \
--no-build-isolation --no-deps \
-C cmake.define.INFINI_RT_ROOT=/opt/infinirt \
-C cmake.define.AUTO_DETECT_DEVICES=OFF \
-C cmake.define.AUTO_DETECT_BACKENDS=OFF \
-C cmake.define.WITH_CPU=ON \
-C cmake.define.WITH_NVIDIA=ON \
-C cmake.define.WITH_LINKED=OFF \
-C cmake.define.WITH_TORCH=OFF \
-C cmake.define.FETCHCONTENT_SOURCE_DIR_CUTLASS=/opt/cutlass \
-C cmake.define.INFINI_OPS_OPS=conv_infinilm,paged_attention_infinilm,paged_attention_prefill_infinilm,paged_caching_infinilm,rearrange_infinilm,top_k_top_p_sample_infinilm,zeros_infinilm
Successfully built InfiniOps
$ python3 -m pytest \
tests/test_conv_infinilm.py \
tests/test_paged_attention_infinilm.py \
tests/test_paged_attention_prefill_infinilm.py \
tests/test_paged_caching_infinilm.py \
tests/test_rearrange_infinilm.py \
tests/test_top_k_top_p_sample_infinilm.py \
tests/test_zeros_infinilm.py \
--devices cpu cuda -q
236 passed, 192 skipped in 16.68s

The skips are the existing unsupported device/operator combinations in the legacy test matrix.

Test Results on Supported Platforms

PlatformAffectedBuild / Smoke ResultFull Result / Notes
NVIDIAYesfocused build and tests passedIncluded in 236 passed; no runtime change
IluvatarYesstrict wrapper generation passedHeader-only diagnostic change; hardware not run
MetaXYesstrict wrapper generation passedHeader-only diagnostic change; hardware not run
CambriconNoN/A - not affectedN/A - no provider for these compatibility APIs
MooreYesstrict wrapper generation passedHeader-only diagnostic change; hardware not run
AscendYesstrict wrapper generation passedHeader-only diagnostic change; hardware not run

Additional checks:

clang-format 21.1.8 --dry-run --Werror <seven changed headers>
passed
python3 scripts/generate_wrappers.py \
--devices nvidia iluvatar metax moore \
--ops conv_infinilm paged_attention_infinilm \
paged_attention_prefill_infinilm paged_caching_infinilm \
rearrange_infinilm zeros_infinilm \
--strict-ops
passed
python3 scripts/generate_wrappers.py \
--devices cpu ascend \
--ops top_k_top_p_sample_infinilm \
--strict-ops
passed
python3 -m pytest tests/test_generate_wrappers.py -q
25 passed in 1.08s

Benchmark / Performance Impact

N/A. No executable implementation changes.

Notes for Reviewers

Replacement alignment

Deprecated APICanonical replacementOpen-source alignment evidenceMigration note
ConvInfinilmConvolutionPyTorch torch.convolution and fixed ATen schemaExisting adapter supplies transposed=false, zero output_padding, and reorders stride/padding.
PagedCachingInfinilmReshapeAndCacheFlashvLLM reshape_and_cache_flashConsumers must adopt the canonical FlashAttention cache layout.
PagedAttentionInfinilmFlashAttnWithKvcacheFlashAttention flash_attn_with_kvcacheConsumers use the matching canonical cache layout; the NVIDIA provider is linked from the installed DSO.
PagedAttentionPrefillInfinilmFlashAttnVarlenFuncFlashAttention flash_attn_varlen_funcPaged KV, block tables, and ALiBi are supported by the linked provider merged in #911.
RearrangeInfinilmCopyPyTorch Tensor.copy_The old contract is the non_blocking=false subset.
TopKTopPSampleInfinilmTopKTopPSamplingFromLogitsFlashInfer top_k_top_p_sampling_from_logitsCallers materialize per-batch top_k / top_p tensors and pass the canonical explicit attributes.
ZerosInfinilmFill with value 0PyTorch Tensor.fill_InfiniOps retains the caller-provided trailing output convention.

CausalSoftmaxInfinilm, ScaledSoftmaxInfinilm, KvCachingInfinilm, and RandomSampleInfinilm retain the generic diagnostic because no single stable public operator completely represents their existing contracts. This PR does not invent an approximate replacement or add an overload.

@voltjia
voltjia requested a review from a teamAugust 9, 2026 01:03
@voltjia

Copy link
Copy Markdown
CollaboratorAuthor

Closing per scope prioritization: this PR only improves deprecation diagnostics and is not required for the functional InfiniLM migration. Continuing with the remaining executable migration work first.

@voltjiavoltjia closed this Aug 9, 2026
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