[Mini-VLLM] Remove the ROCm device path, debug routes and arch-gated tests

- Delete csrc/rocm, hipify, the _rocm_C extension and the setup.py rocm
  target path; drop the rocm requirement files
- Delete the aiter, rdna3, skinny-gemm and ROCm fused-MoE kernel modules
  and retarget the linear kernel registries away from them
- Reduce platforms/rocm.py to the GCN architecture predicates that live
  code still imports, and delete the RocmPlatform class and plugin
- Drop the VLLM_SERVER_DEV_MODE debug surface: reset, collective_rpc,
  server_info and sleep routes plus the log_error_stack flag
- Delete lm-format-enforcer, lark and otel-semantic-conventions-ai pins;
  the live server process maps none of them
- Delete tests that only build architectures this fork no longer
  registers, and test directories left without any test file
- Restore the tests/v1/kv_connector mock helpers that scheduler tests
  import at module level

Co-authored-by: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-19 19:31:07 +07:00
co-authored by Hinata
parent 2066d3143f
commit 5f3c7bd8ab
162 changed files with 599 additions and 27490 deletions
-157
View File
@@ -101,54 +101,6 @@ if hasattr(torch.ops, "_C") and hasattr(torch.ops._C, "scaled_fp4_quant"):
# page attention ops
def paged_attention_rocm(
out: torch.Tensor,
exp_sum: torch.Tensor,
max_logits: torch.Tensor,
tmp_out: torch.Tensor,
query: torch.Tensor,
key_cache: torch.Tensor,
value_cache: torch.Tensor,
num_kv_heads: int,
scale: float,
block_tables: torch.Tensor,
seq_lens: torch.Tensor,
query_start_loc: torch.Tensor | None,
block_size: int,
max_seq_len: int,
alibi_slopes: torch.Tensor | None,
kv_cache_dtype: str,
k_scale: torch.Tensor,
v_scale: torch.Tensor,
fp8_out_scale: torch.Tensor | None = None,
mfma_type: str = "fp8" if envs.VLLM_ROCM_FP8_MFMA_PAGE_ATTN else "f16",
use_interleaved_v_cache: bool = False,
) -> None:
torch.ops._rocm_C.paged_attention(
out,
exp_sum,
max_logits,
tmp_out,
query,
key_cache,
value_cache,
num_kv_heads,
scale,
block_tables,
seq_lens,
query_start_loc,
block_size,
max_seq_len,
alibi_slopes,
kv_cache_dtype,
k_scale,
v_scale,
fp8_out_scale,
mfma_type,
use_interleaved_v_cache,
)
def mla_decode_kvcache_cpu(
out: torch.Tensor,
query: torch.Tensor,
@@ -660,48 +612,6 @@ def gptq_shuffle(q_weight: torch.Tensor, bit: int) -> None:
torch.ops._C.gptq_shuffle(q_weight, bit)
def gptq_gemm_rdna3(
a: torch.Tensor,
b_q_weight: torch.Tensor,
b_qzeros: torch.Tensor,
b_scales: torch.Tensor,
use_v2_format: bool,
) -> torch.Tensor:
return torch.ops._rocm_C.gptq_gemm_rdna3(
a, b_q_weight, b_qzeros, b_scales, use_v2_format
)
if hasattr(torch.ops, "_rocm_C") and hasattr(torch.ops._rocm_C, "gptq_gemm_rdna3"):
@register_fake("_rocm_C::gptq_gemm_rdna3")
def _gptq_gemm_rdna3_fake(
a: torch.Tensor,
b_q_weight: torch.Tensor,
b_qzeros: torch.Tensor,
b_scales: torch.Tensor,
use_v2_format: bool,
) -> torch.Tensor:
return torch.empty(
(a.size(0), b_q_weight.size(1)), dtype=a.dtype, device=a.device
)
if hasattr(torch.ops, "_rocm_C") and hasattr(torch.ops._rocm_C, "gptq_gemm_rdna3_wmma"):
@register_fake("_rocm_C::gptq_gemm_rdna3_wmma")
def _gptq_gemm_rdna3_wmma_fake(
a: torch.Tensor,
b_q_weight: torch.Tensor,
b_qzeros: torch.Tensor,
b_scales: torch.Tensor,
use_v2_format: bool,
) -> torch.Tensor:
return torch.empty(
(a.size(0), b_q_weight.size(1)), dtype=a.dtype, device=a.device
)
def moe_gptq_gemm_rdna3(
a: torch.Tensor,
c: torch.Tensor,
@@ -2085,73 +1995,6 @@ def mamba_chunk_scan_fwd_cpu(
)
# ROCm skinny gemms
def LLMM1(a: torch.Tensor, b: torch.Tensor, rows_per_block: int) -> torch.Tensor:
return torch.ops._rocm_C.LLMM1(a, b, rows_per_block)
def wvSplitK(
a: torch.Tensor, b: torch.Tensor, cu_count: int, bias: torch.Tensor = None
) -> torch.Tensor:
return torch.ops._rocm_C.wvSplitK(a, b, bias, cu_count)
def wvSplitK_int4_g(
weight: torch.Tensor,
activation: torch.Tensor,
scale: torch.Tensor,
cu_count: int,
group_size: int,
zero_points: torch.Tensor | None = None,
bias: torch.Tensor | None = None,
) -> torch.Tensor:
# NOTE: the kernel is weight-major; `weight` is the packed int4 operand
# (in_a, [out_features, K/2]) and `activation` is in_b ([num_tokens, K]).
return torch.ops._rocm_C.wvSplitK_int4_g(
weight, activation, scale, zero_points, bias, cu_count, group_size
)
if hasattr(torch.ops, "_rocm_C") and hasattr(torch.ops._rocm_C, "wvSplitK_int4_g"):
@register_fake("_rocm_C::wvSplitK_int4_g")
def _wvSplitK_int4_g_fake(
in_a: torch.Tensor, # packed int4 weight [out_features, K/2]
in_b: torch.Tensor, # activation [num_tokens, K]
in_scale: torch.Tensor,
in_zero_points: torch.Tensor | None,
in_bias: torch.Tensor | None,
CuCount: int,
group_size: int,
) -> torch.Tensor:
# Kernel returns {in_b.size(0), in_a.size(0)} = [num_tokens, out_features].
num_tokens = in_b.size(0)
out_features = in_a.size(0)
return torch.empty(
(num_tokens, out_features), dtype=in_b.dtype, device=in_b.device
)
def wvSplitKrc(
a: torch.Tensor, b: torch.Tensor, cu_count: int, bias: torch.Tensor = None
) -> torch.Tensor:
return torch.ops._rocm_C.wvSplitKrc(a, b, bias, cu_count)
def wvSplitKQ(
a: torch.Tensor,
b: torch.Tensor,
out_dtype: torch.dtype,
scale_a: torch.Tensor,
scale_b: torch.Tensor,
cu_count: int,
bias: torch.Tensor = None,
) -> torch.Tensor:
out = torch.empty((b.shape[0], a.shape[0]), dtype=out_dtype, device=b.device)
torch.ops._rocm_C.wvSplitKQ(a, b, bias, out, scale_a, scale_b, cu_count)
return out
# moe
def moe_sum(
input: torch.Tensor,