nemo_automodel.components.models.minimax_m3_vl.msa_bindings
nemo_automodel.components.models.minimax_m3_vl.msa_bindings
Bindings to official MiniMax-AI/MSA (the revision the msa extra pins) and to the local SM100 backward.
kernels() is the one place MSA reaches outside this package. It binds the four official entry
points and the local backward launcher on first use, applies the two compatibility patches the pin
needs, and caches the bundle for the process. Nothing is imported while this module loads, so it
imports on any host; a host without the msa extra learns so from UnavailableError at the first
call and never earlier, which is the contract the CI import walker checks.
Two unrelated kinds of patch live here, and they must not be confused:
_patch_fmaxchanges numerical behaviour — it rebinds a scalar helper so the CuTe DSL 4.6.2 binding is used instead of one that only exists under an older CUDA flavour._patch_jit_gencodechanges build behaviour only — it drops a device target the local nvcc cannot parse. It never touches what the compiled kernels compute.
Both are removed once the pinned MSA revision carries the fix upstream.
Module Contents
Classes
Functions
Data
API
The launchers MSA calls: the official CSR builder, flat forward, scorer and planner, and the local backward.
Return the (major, minor) release of the nvcc that MSA’s JIT will invoke.
Patch only the loaded MSA-owned utils before JIT; preserve fp32, third operand and loc/ip.
Drop the sm_103a target from MSA’s own JIT flags when the local nvcc cannot parse it.
Parameters:
The loaded fmha_sm100.jit module whose _get_nvcc_flags is wrapped.
Raises:
ImportError: If the module is not MSA’s ownjit, so a name collision cannot silently patch someone else’s compiler flags.
Bind the MSA launchers once per process, patching the official package on the way.
The official package and the CuTe DSL are imported here and nowhere earlier; the backward module
raises UnavailableError from require_cute_dsl itself when the DSL is missing. A failed bind
is not cached, so a later call retries.
Returns: MSAKernels
The five launchers.
Raises:
UnavailableError: If the msa extra (official MSA, nvidia-cutlass-dsl and cuda-bindings) is not installed, naminguv sync --extra msa.ImportError: If a conflictingsrcpackage or a foreignfmha_sm100.jitshadows the module a patch must own.