feat(build): select operator implementations from ops.json - #931
Draft
voltjia wants to merge 1 commit into
Draft
Conversation
This was referenced Aug 13, 2026
voltjia
force-pushed
the
feat/operator-implementation-selection
branch
from
August 13, 2026 16:43
4ba65ce to
87a242b
Compare
This was referenced Aug 13, 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.
Summary
INFINI_OPS_OPSso it accepts a user-ownedops.jsonthat selects exact implementation slots per operator.INFINI_OPS_LINKED_OPSconfiguration surface.Example:
{ "add": {"implementations": [0]}, "argmax": {"implementations": [8]}, "top_k_top_p_sampling_from_logits": {"implementations": [16]} }Motivation
Operator names alone cannot express builds that need one implementation while excluding another provider of the same operator. Selecting by the existing implementation slot keeps native, generated Torch, and linked providers under the same configuration model and avoids resolving or linking unselected external dependencies.
Compatibility
-DINFINI_OPS_OPS=add,gemmretains its current operator-level behavior.-DINFINI_OPS_OPS=/absolute/path/ops.jsonenables slot selection.ops.jsonremains supported when the CMake option is unset.ops.json; the file is a consumer-owned build input.Validation
torchgen, which is covered by the hosted NVIDIA build.masterand does not contain feat(nvidia): add top-k top-p sampling provider #922.Notes
This replaces #923, which GitHub automatically closed when its head branch was renamed to align the branch type with the
feat(build)title.The FlashInfer sampling provider remains a separate stacked change in #930.