[Perf][DSv4.1] Shard the Engram wkv projection across TP ranks (#58678)

Signed-off-by: Shuolei Wang <shuoleiwang123@gmail.com>
This commit is contained in:
Shuolei Wang
2026-09-26 01:15:57 +00:00
committed by GitHub
parent 8a2364605c
commit 4bb804cc5b
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -827,7 +827,7 @@ def test_engram_constructor_honors_offload(monkeypatch, backend, cpu_offload):
monkeypatch.setattr(engram_ops, "get_tensor_model_parallel_world_size", lambda: 1)
monkeypatch.setattr(engram_ops, "get_tensor_model_parallel_rank", lambda: 0)
monkeypatch.setattr(
engram_ops, "ReplicatedLinear", lambda *a, **k: torch.nn.Identity()
engram_ops, "ColumnParallelLinear", lambda *a, **k: torch.nn.Identity()
)
stream = torch.cuda.Stream()
kwargs = {"prefetch_stream": stream} if backend == "nvidia" else {}