Skip to content

fix(build): separate linked operator allowlist - #923

Draft
voltjia wants to merge 1 commit into
feat/nvidia-top-k-top-p-samplingfrom
fix/linked-operator-allowlist
Draft

fix(build): separate linked operator allowlist#923
voltjia wants to merge 1 commit into
feat/nvidia-top-k-top-p-samplingfrom
fix/linked-operator-allowlist

Conversation

@voltjia

@voltjia voltjia commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds INFINI_OPS_LINKED_OPS so linked provider selection can be narrower than the generated operator surface.
  • Applies the same linked subset to library resolution and wrapper generation while preserving native and ATen implementations for the same operator.
  • Documents the configuration and adds regression coverage for default compatibility and mixed native/linked implementations.

Motivation

WITH_LINKED=ON currently reuses INFINI_OPS_OPS for every linked provider. A build that needs native topk_softmax and linked FlashAttention therefore tries to resolve the optional vLLM provider for topk_softmax, even though the native NVIDIA implementation is selected. The separate allowlist keeps the public operator surface intact while resolving only providers the build actually uses.

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

Smoke Test Result

python3 -m pytest tests/test_generate_wrappers.py tests/test_resolve_linked_ops.py -q
51 passed in 1.28s

cmake ... -DINFINI_OPS_OPS=<23 operators> -DINFINI_OPS_LINKED_OPS=flash_attn_varlen_func,flash_attn_with_kvcache
-- Wrapper op allowlist: <23 operators>
-- Linked op allowlist: flash_attn_varlen_func;flash_attn_with_kvcache
-- Resolved 2 linked operator source(s).
-- Configuring done

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA Yes Configure passed 51 focused wrapper/resolver tests passed; downstream full build pending
Iluvatar No N/A - not affected N/A
MetaX No N/A - not affected N/A
Cambricon No N/A - not affected N/A
Moore No N/A - not affected N/A
Ascend No N/A - not affected N/A

Benchmark / Performance Impact

N/A - build-time provider selection only.

Notes for Reviewers

This PR is stacked on #922 because the downstream integration requires both changes. The commit is independent and can be rebased onto master after #922 merges. With no explicit INFINI_OPS_LINKED_OPS, existing builds keep using INFINI_OPS_OPS for linked providers.

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