Conversation
Adaptive verification writes query_start_loc on device. DeepseekV41IndexerBackend inherits supports_device_cpu_query_lens_mismatch() from the V3.2 indexer, and that helper was CUDA plus DeepGEMM only, so the published DSpark JSON dies during determine_available_memory on ROCm. Reuse the Triton decode-metadata kernel from vllm-project#56562 on the ROCm flatten path when the flag is on. NVIDIA is unchanged.
Adaptive verification writes query_start_loc on device. DeepseekV41IndexerBackend inherits supports_device_cpu_query_lens_mismatch() from the V3.2 indexer, and that helper was CUDA plus DeepGEMM only, so the published DSpark JSON dies in maybe_create_adaptive_verification_manager during initialize_kv_cache. ROCm DSpark already flattens through _prepare_decode_tensors. Returning True from _supports_flattened_device_query_lens() is the Hopper analogue. Do not route ROCm through the SM100 Triton metadata kernel.
|
This patch is not enough for
That is The working AMD command is |
Summary
The published DeepSeek-V4.1-Flash DSpark JSON sets
enable_adaptive_verification:true. On ROCm that dies inmaybe_create_adaptive_verification_managerduringinitialize_kv_cache, after the weights load:DeepseekV41IndexerBackendhard-wires the V3.2 indexer (get_attn_backendinvllm/models/deepseek_v4_1/attention.pyreturns that class).supports_device_cpu_query_lens_mismatch()was True only for CUDA DeepGEMM SM100 varlen or SM90 flatten. The attention selector never runs for this model.What this PR does
_supports_flattened_device_query_lens()on ROCm. That is the Hopper analogue. ROCm DSpark already flattens (_supports_native_decodeis onlynext_nin{1, 2}), andbuild()already diffs devicequery_start_locthen expands with_prepare_decode_tensors._indexer_decode_metadata_kernelfrom [Perf] Fuse DSV4.1 input metadata preparation with Triton #56562. That kernel is the SM100 varlen path. Hopper flatten does not use it. HIProcm_aiter_sparse_attn_indexeralready readsdecode_metadata.decode_lens/seq_lens/block_tablefrom the flatten (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py).The recipe workaround (AMD
enable_adaptive_verification:false) is vllm-project/recipes#963. This PR is the engine-side fix so that flag can stay true.Validation
ValueErroron MI355X TP4 with Hub nightlyeed1f3d0c(sha256:960228cfcb5de9f4cd22d28998d1125be62b546c3d220a884f570343e99ffcee) and the published DSpark JSON. The failing helpers are in that tree.enable_adaptive_verification:true.Test plan
enable_adaptive_verification:true) and this patchValueErroris gone and DSpark decode runs17*19curl returns323