Windows/ROCm: Qwen3.6-35B-A3B NVFP4 serving on gfx1101 (RDNA3) - #4
Open
rba wants to merge 5 commits into
Open
Conversation
install: run pip through the venv interpreter and add numba. run: clear stale serve logs with a Remove-Item/Clear-Content fallback, require vcvarsall.bat from both Program Files with a clear error, export the full ROCm/HIP environment, and pass the correct serve flags. stop: terminate the engine, its multiprocessing workers, and the web UI by resolving the full process tree. Signed-off-by: Roman Baumer <roman@baumer.org>
download_hf_weight() now also downloads model.safetensors.index.json so sharded checkpoints resolve every shard; drop_page_cache() is a no-op when os.posix_fadvise is unavailable (Windows). Adds regression tests for both. Signed-off-by: Roman Baumer <roman@baumer.org>
e4m3_native() now returns False on ROCm HIP, whose reported capability is not an NVIDIA SM level. Add _scaled_mm_supported() to restrict torch._scaled_mm to gfx94/gfx95 on ROCm (else sm_89+), so RDNA uses the dequant/emulation path. Skip the native and foreign-arch kernel tests on HIP. Signed-off-by: Roman Baumer <roman@baumer.org>
Pass host-known max_seq_len and batch into causal_conv1d_varlen() and on to the Triton kernel instead of deriving them on device, removing a host sync from the prefill path. Signed-off-by: Roman Baumer <roman@baumer.org>
On RDNA3 (gfx11) the grouped NVFP4 prefill Triton kernel hits a HIP launch failure. Route fused_experts_nvfp4() to fused_experts_decode_nvfp4_marlin, which has equivalent semantics and bounded memory. Adds a dispatch regression test. Signed-off-by: Roman Baumer <roman@baumer.org>
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.
Get
nvidia/Qwen3.6-35B-A3B-NVFP4running end to end on Windows 11 + ROCm on an AMD RX 7800 XT (gfx1101/ RDNA3), with MoE offload and MoE prefill overlap.Environment
gfx1101nvidia/Qwen3.6-35B-A3B-NVFP4(MoE offload)What changes
fused_experts_nvfp4()now routes tofused_experts_decode_nvfp4_marlinongfx11, which has equivalent semantics and bounded memory use.e4m3_native()now returnsFalseon ROCm HIP (the reported capability is not an NVIDIA SM level), and a new_scaled_mm_supported()restrictstorch._scaled_mmtogfx94/gfx95on ROCm (elsesm_89+), so RDNA takes the dequant/emulation path.max_seq_len/batchintocausal_conv1d_varlen()to avoid a host sync on the prefill path.download_hf_weight()also fetchesmodel.safetensors.index.json(sharded checkpoints), anddrop_page_cache()is a no-op whereos.posix_fadviseis unavailable (Windows).pip, a requiredvcvarsall.batcheck with a clear error, full ROCm/HIP environment, robust log cleanup, and process-tree shutdown).Run
-RocmPathis auto-detected; pass it explicitly if auto-detection cannot find the ROCm install.Validation
pytest tests/models/test_models_loader.py tests/kernels/test_fp8_pertensor_linear.py tests/kernels/test_e4m3_compat.py→ 36 passed, 16 skippedpytest tests/moe/test_nvfp4_backends.py tests/moe/test_safe_offload_copy.py→ 17 passed, 6 skipped/v1/modelsreturns the model and/v1/chat/completionsstreams a stable reply.Notes
--disable-moe-prefill-overlapis no longer required.gfx11.