Skip to content

Commit 1d2d58c

Browse files
ethcheEthan Che
andauthored
Support Helion RoPE override for ComplexRoPE (#3767)
This PR adds a HelionComplexRoPE override targeting exact ComplexRoPE.Config, enabling DeepSeek V3 through the existing `--override.imports torchtitan.overrides.helion_rope` path. While Helion doesn't support complex tensors, it instead produces the cos and sin output separately and puts them together as a complex tensor in torch. Similar to cos_sin rope, we also add an integration test for deepseek v3. We benchmark on 2xGB200: - DeepSeek V3 debugmodel, fwd_bwd only - DP shard=2, EP=2, TP=1, CP=1, PP=1, full_dtensor - local batch size 4, global batch size 8 - warmup=5, iters=20 - model compile off - FlexAttention compile on - fwd_bwd (in ms) - we compared loss and gradient l2 norms to confirm accuracy. | seq_len | baseline | with Helion ComplexRoPE | speedup | |---:|---:|---:|---:| | 2048 | 563.246 ms | 511.982 ms | 1.100x | | 4096 | 570.322 ms | 526.500 ms | 1.083x | | 8192 | 572.380 ms | 542.133 ms | 1.056x | | 16384 | 568.548 ms | 539.765 ms | 1.053x | | 32768 | 636.378 ms | 625.146 ms | 1.018x | | 65536 |1107.151 ms | 1090.194 ms | 1.016x | Co-authored-by: Ethan Che <eche@meta.com>
1 parent 7cdf0aa commit 1d2d58c

3 files changed

Lines changed: 852 additions & 99 deletions

File tree

tests/integration_tests/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,15 @@ def build_model_tests_list() -> list[OverrideDefinitions]:
5959
"--parallelism.data_parallel_shard_degree 4",
6060
"--parallelism.expert_parallel_degree 2",
6161
"--compile.enable",
62+
"--override.imports torchtitan.overrides.helion_rope",
6263
],
6364
],
64-
"DeepSeek V3 FSDP+EP+compile",
65+
"DeepSeek V3 FSDP+EP+compile (+ Helion RoPE override)",
6566
"deepseek_v3_fsdp+ep+compile",
6667
ngpu=4,
68+
# The Helion fused RoPE kernels are CUDA-only and tuned for NVIDIA
69+
# H100/GB200; skip on ROCm where they are unvalidated.
70+
skip_rocm_test=True,
6771
),
6872
OverrideDefinitions(
6973
[

0 commit comments

Comments
 (0)