dylan
e18ece8f3a
feat: port NaiveBatchedExperts from ds_vllm — view transpose + cublas transB
Source: upstream_ref/ds_vllm/vllm/model_executor/layers/fused_moe/experts/fused_batched_moe.py
upstream_ref/ds_vllm/vllm/model_executor/layers/fused_moe/activation.py
New files (ported from ds_vllm, adapted for BI-V100):
ex_engine/moe/__init__.py
ex_engine/moe/activation.py
- MoEActivation enum + apply_moe_activation
- torch.ops._C.silu_and_mul replaced with F.silu(gate)*up fallback
ex_engine/moe/naive_batched_experts.py
- naive_batched_moe_forward()
- Decode: per-expert loop, w13[eid].transpose(0,1) is VIEW (zero copy)
- @ operator → cublas passes transB=CUBLAS_OP_T internally
- Prefill: group tokens by expert, batch @ per expert
Modified:
qwen3_6_scripts/qwen3_5.py
- Import naive_batched_moe_forward
- Tier 0.5: after ix_fused_moe, before corex point-optimized loop
- Uses existing topk routing (xllm/corex/pytorch)
Key difference from previous approach:
- NO physical transpose (was 22ms overhead)
- NO weight gather into contiguous buffer
- View transpose is O(0), cublas handles transB
2026-08-15 13:05:45 +00:00
..
2026-08-14 03:51:43 +00:00
2026-08-14 11:34:23 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-13 11:37:10 +00:00
2026-08-12 03:31:05 +00:00
2026-08-15 12:03:12 +00:00
2026-08-14 06:56:00 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-13 04:01:59 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-13 03:48:12 +00:00
2026-08-12 11:14:01 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 07:32:31 +00:00
2026-08-14 07:00:30 +00:00
2026-08-14 07:32:31 +00:00
2026-08-14 11:47:37 +00:00
2026-08-15 05:41:03 +00:00
2026-08-15 05:31:33 +00:00
2026-08-13 11:35:43 +00:00
2026-08-13 11:35:43 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 02:05:30 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-13 03:48:12 +00:00
2026-08-12 11:14:01 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 06:56:00 +00:00
2026-08-12 11:14:01 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 07:14:46 +00:00
2026-08-14 07:32:31 +00:00
2026-08-14 07:00:30 +00:00
2026-08-14 07:32:31 +00:00
2026-08-14 07:32:31 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 11:14:01 +00:00
2026-08-12 11:14:01 +00:00
2026-08-13 07:09:50 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 02:28:48 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-15 06:15:17 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 05:40:05 +00:00
2026-08-14 10:11:10 +00:00
2026-08-14 11:59:51 +00:00
2026-08-15 05:27:43 +00:00
2026-08-14 12:03:52 +00:00
2026-08-14 11:40:13 +00:00
2026-08-14 12:07:00 +00:00
2026-08-15 05:08:11 +00:00
2026-08-14 17:23:41 +00:00
2026-08-15 12:46:37 +00:00
2026-08-15 05:17:13 +00:00
2026-08-14 17:02:55 +00:00
2026-08-14 01:06:49 +00:00
2026-08-15 13:05:45 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-14 01:06:49 +00:00
2026-08-12 03:31:05 +00:00
2026-08-14 10:11:10 +00:00
2026-08-14 08:21:48 +00:00
2026-08-14 08:01:23 +00:00
2026-08-14 11:23:49 +00:00
2026-08-14 06:56:00 +00:00