Repository navigation
build(nvidia): expose public NZ matmul APIs - #1056
Merged
Merged
Conversation
baominghelly
approved these changes
Nov 25, 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
matmul_weight_nzandtrans_matmul_weight_nzto the NVIDIA dense sampling torch-free no-Marlin profile aspublic_api_only.Motivation
The InfiniLM dense pre-transpose/NZ path references:
infini::ops::MatmulWeightNzinfini::ops::TransMatmulWeightNzThe standard NVIDIA no-Marlin profile previously omitted both APIs. As a result, downstream C++ compilation failed even when the NZ path was not executed on NVIDIA:
Marking the two operators as
public_api_onlypreserves the operator-pruning boundary: the public API and required factory instantiation are generated, but no NVIDIA provider implementation is built or activated. This keeps the standard NVIDIA workflow self-contained and unblocks the downstream InfiniLM build.Related downstream branch:
InfiniLM/merge/fm9g70-serving-performance.Type of Change
feat— new feature / new operator / new platformfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configuration!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Build and targeted operator tests were run on NVIDIA CUDA 13.1 with the modified standard profile,
WITH_NVIDIA=ON, and Python bindings enabled.The four
flash_attn_varlen_funcfailures are the pre-existing paged + causal + ALiBi provider-support failures observed before this profile change. They are unrelated to the two public-only API entries and do not change with this PR.Test Results on Supported Platforms
Full `pytest` output (optional)
Not run. This is a build-profile-only change; targeted NVIDIA validation covers the changed profile and public API generation.
Benchmark / Performance Impact
N/A. This PR does not add or modify an active operator implementation and does not change runtime dispatch. It only ensures that public API/factory symbols required by downstream C++ code are generated in the standard NVIDIA no-Marlin profile.
Notes for Reviewers
public_api_onlyis intentionally used instead of enabling a provider. The NVIDIA build remains pruned and does not compile an NZ kernel implementation.