chore: cleanup garbage code (#29770)
This commit is contained in:
@@ -79,9 +79,6 @@ def bench_es(
|
||||
b_tensors = []
|
||||
a_scales_tensors = []
|
||||
b_scales_tensors = []
|
||||
if False:
|
||||
print("Token Distributtion: ", group_ms[0:num_groups])
|
||||
print("Token Count: ", sum(group_ms[0:num_groups]))
|
||||
for g in range(num_groups):
|
||||
m_g = group_ms[g]
|
||||
expert_offsets[g + 1] = expert_offsets[g] + m_g
|
||||
|
||||
@@ -32,19 +32,19 @@ else:
|
||||
|
||||
|
||||
def rope_pool_fused(
|
||||
q: "mx.array",
|
||||
k: "mx.array",
|
||||
v: "mx.array",
|
||||
positions: "mx.array",
|
||||
slots: "mx.array",
|
||||
k_pool: "mx.array",
|
||||
v_pool: "mx.array",
|
||||
q: mx.array,
|
||||
k: mx.array,
|
||||
v: mx.array,
|
||||
positions: mx.array,
|
||||
slots: mx.array,
|
||||
k_pool: mx.array,
|
||||
v_pool: mx.array,
|
||||
*,
|
||||
head_dim: int,
|
||||
num_qo_heads: int,
|
||||
num_kv_heads: int,
|
||||
rope_base: float,
|
||||
) -> tuple["mx.array", "mx.array", "mx.array", "mx.array"]:
|
||||
) -> tuple[mx.array, mx.array, mx.array, mx.array]:
|
||||
"""Apply NeoX RoPE to Q/K and scatter K/V into the MLX KV pool.
|
||||
|
||||
Args:
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Tests for DeepSeek-V4 fused norm + RoPE kernels."""
|
||||
|
||||
import math
|
||||
|
||||
import pytest
|
||||
import sgl_kernel
|
||||
import torch
|
||||
@@ -93,7 +91,7 @@ def test_fused_q_norm_rope_preallocated_output():
|
||||
|
||||
@pytest.mark.parametrize("batch_size", [1, 8])
|
||||
def test_fused_q_indexer_rope_hadamard_quant_runs(batch_size):
|
||||
"""Smoke test: kernel runs without errors and produces finite results."""
|
||||
"""Basic launch coverage with finite output checks."""
|
||||
torch.manual_seed(42)
|
||||
num_heads = 4
|
||||
head_dim = 128
|
||||
|
||||
Reference in New Issue
Block a user