fix: say why Int4GroupwiseGemmPluginV2 cannot execute when its kernels are absent - #209
Open
filipemartinsubrobotics wants to merge 1 commit into
Conversation
…s are absent
ENABLE_CUTE_DSL defaults to "fmha", which omits int4_fp16_gemm. An INT4 model built that
way compiles the plugin with CUTE_DSL_INT4_FP16_GEMM_ENABLED undefined, so enqueue()
returns -1 from the #else branch with no message.
Nothing upstream of that point fails: the CuTe DSL archive builds, the plugin compiles and
registers, the ONNX graph parses, the engine builds and serialises, and the runtime loads
it. The first and only symptom appears at inference as
[E] Error Code: 2: int4_groupwise_gemm_v2_4: Failed to enqueue status -1
[E] IExecutionContext::enqueueV3: Error Code 1: Myelin ... Custom layer callback failed
which names a tactic and a Myelin callback, and points at the kernel rather than at the
build configuration that omitted it. Working back to a cmake default took a while;
instrumenting the module loader and getting no output at all was what finally showed the
whole block had been compiled out.
Log once, naming the flag that fixes it. std::call_once keeps it off the per-enqueue path,
<mutex> is already included, and LOG_ERROR is already used in this file, so no new
includes. Behaviour is unchanged: the branch still returns -1.
A configure-time check would catch this earlier still -- cmake knows both whether the INT4
plugin is being built and whether the group is in ENABLE_CUTE_DSL -- but that touches the
build system, so this is the smaller change. Happy to add it if you would prefer it there.
Found while bringing up an INT4-AWQ Cosmos3-Edge checkpoint on a DGX B300 during the
NVIDIA / OpenHackathons / Oracle Open Models Codefest 2026.
Signed-off-by: Filipe Martins <293984334+filipemartinsubrobotics@users.noreply.github.com>
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.
Fixes #210.
ENABLE_CUTE_DSLdefaults tofmha, which omitsint4_fp16_gemm. An INT4 model builtthat way compiles
Int4GroupwiseGemmPluginV2withCUTE_DSL_INT4_FP16_GEMM_ENABLEDundefined, so
enqueue()returns-1from the#elsebranch with no message.Why this is hard to work back from
Nothing before inference fails. The CuTe DSL archive builds, the plugin compiles and
registers, the ONNX graph parses, the engine builds and serialises, and the runtime loads
it and allocates. The first symptom is at generation:
That names a tactic id and a Myelin callback, so it reads as a kernel problem. It is a
cmake default. I chased the kernel first — checked the archive metadata (both groups
present, 95 variants), the weights (byte-identical to a known-good export), the plugin
attributes, the graph, the runtime config — before instrumenting
cuteDslInt4GemmLoadModules()and getting no output at all, which was what finallyshowed the whole block had been compiled out rather than failing inside.
The change
Log once from that branch, naming the flag:
std::call_oncekeeps it off the per-enqueue path.<mutex>is already included andLOG_ERRORis already used in this file, so no new includes. Behaviour is unchanged —the branch still returns
-1.Syntax-checked both ways, with the macro defined and undefined.
An alternative, if you would rather have it earlier
cmake knows both whether the INT4 plugin is being built and whether
int4_fp16_gemmis inENABLE_CUTE_DSL, so a configure-time warning would catch this before a single kernelcompiles. That touches the build system rather than one plugin, so I have kept this to the
smaller change — happy to move it if you prefer.
Found while bringing up an INT4-AWQ Cosmos3-Edge checkpoint on a DGX B300 during the
NVIDIA / OpenHackathons / Oracle Open Models Codefest 2026, for an offline-first
search-and-rescue robotics entry (Team UBR Stack). The production target is a Jetson Orin
Nano; the B300 is a bench machine used for evaluation.