---
id: pr-sglang-6771
repo: sgl-project/sglang
pr: 6771
title: '[CPU] support the case where num_attention_heads or intermediate_size is not divisible by the TP size'
author: chunyuan-w
date: '2025-07-03'
url: https://github.com/sgl-project/sglang/pull/6771
source_category: upstream-code
architectures:
- sm100
tags:
- attention
- kernel-fusion
- moe
techniques:
- kernel-fusion
hardware_features: []
kernel_types:
- attention
- moe
languages:
- python
- triton
captured_at: '2026-04-27'
status: merged
merge_sha: 1dce6c480fac4aa20d40f133d220c5be4605e093
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/srt/configs/update_config.py
- python/sglang/srt/layers/linear.py
- python/sglang/srt/layers/moe/fused_moe_triton/layer.py
- python/sglang/srt/layers/parameter.py
- python/sglang/srt/layers/vocab_parallel_embedding.py
- python/sglang/srt/managers/scheduler.py
- python/sglang/srt/model_executor/model_runner.py
- python/sglang/srt/model_loader/weight_utils.py
- python/sglang/srt/models/mllama4.py
- python/sglang/srt/models/qwen2.py
- python/sglang/srt/utils.py
head_ref_oid: 4129599dc0fdf7273d680c8218592bd6a3ec268a
artifact_dir: evidence/pull-bundles/sglang/gh-6771
---
# [CPU] support the case where num_attention_heads or intermediate_size is not divisible by the TP size

- Repository: `sgl-project/sglang`
- PR: [6771](https://github.com/sgl-project/sglang/pull/6771)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/srt/configs/update_config.py`
- `python/sglang/srt/layers/linear.py`
- `python/sglang/srt/layers/moe/fused_moe_triton/layer.py`
- `python/sglang/srt/layers/parameter.py`
- `python/sglang/srt/layers/vocab_parallel_embedding.py`
- `python/sglang/srt/managers/scheduler.py`
- `python/sglang/srt/model_executor/model_runner.py`
- `python/sglang/srt/model_loader/weight_utils.py`
- `python/sglang/srt/models/mllama4.py`
- `python/sglang/srt/models/qwen2.py`
- `python/sglang/srt/utils.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-6771`
