Conversation
Keep Qwen4Exp decoder layers, input embedding, final HyperConnection mixer, and PLE offload synchronization behind stable custom-op boundaries so the dynamic compile graph preserves the eager CUDA custom-op execution order. Warm a non-specializing size for dynamic ranges first observed at one token. Validated on TP4 V100 with PLE CPU offload and W4A16 NVFP4/Marlin: eager-exact token IDs, dynamic compile range 1-256, and full decode CUDA Graph capture. Assisted-by: OpenAI Codex Signed-off-by: Leonccaa <166551845+Leonccaa@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.
Purpose
Preserve the validated Qwen3.8 Flash Next full-compile path as a fork-internal
research checkpoint. This PR is intentionally based on
feat/qwen38-flash-next-sm70-core, so its diff contains only the compile-graphwork and does not expand the upstream model-support PR.
This is a correctness/fallback checkpoint, not a throughput claim and not an
upstream merge candidate as a single patch.
Validated behavior
CPU offload.
(1, 256)compiled successfully.three repeats:
261ac6d4ac7500646010f2ae56882b3d0d020ce71f5279de2db1747c54f7cee3.Performance result
FULL_DECODE_ONLYThe full-compile route was 2.38% slower by mean throughput. The whole-decoder
opaque boundary restores correctness but prevents Inductor from optimizing
inside the layer, so this patch should remain a reference/fallback while the
opaque scope is reduced incrementally.
Patch structure
for a multi-size range.
kept behind one compile-safe custom op.
caller-owned-output custom-op boundaries for exact compiled execution.
caller-owned operations.
Checks
Upstream boundary
Potential upstream changes should be split and justified independently:
The whole-layer opaque wrappers and their functionalization rules stay in this
fork-only research PR until they are narrowed and demonstrate a performance or
maintainability benefit.