Skip to content

[overlap] Overlap simulation on 1d, 2d variants of llama3, DSv3#319

Open
IvanKobzarev wants to merge 1 commit intomainfrom
overlap_simulator
Open

[overlap] Overlap simulation on 1d, 2d variants of llama3, DSv3#319
IvanKobzarev wants to merge 1 commit intomainfrom
overlap_simulator

Conversation

@IvanKobzarev
Copy link
Contributor

@IvanKobzarev IvanKobzarev commented Feb 18, 2026

 cd autoparallel/tools/overlap_simulator
 python run.py --variant <variant_name>

Add --save-traces to generate perfetto trace files

┌────────────────────────┬─────────────┬────────────┬─────────────┬────────────────┬───────────────┬─────────┬─────────┬───────┐
│        Variant         │ Before (ms) │ After (ms) │ Improvement │ PeakMem Before │ PeakMem After │   AG    │   RS    │  AR   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_bw_256_2d_32 │ 941.37      │ 473.35     │ 49.72%      │ 8.91 GB        │ 8.91 GB       │ 419→280 │ 356→255 │ 65→65 │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_bw_256_1d_32 │ —           │ —          │ FAIL*       │ —              │ —             │ —       │ —       │ —     │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_bw_64_2d_32  │ 361.05      │ 263.00     │ 27.16%      │ 7.24 GB        │ 7.24 GB       │ 211→101 │ 180→180 │ 33→33 │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_bw_64_1d_32  │ 5442.09     │ 3566.40    │ 34.47%      │ 36.30 GB       │ 48.05 GB      │ 290→189 │ 291→221 │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_fw_256_2d_32 │ 527.89      │ 239.42     │ 54.65%      │ 4.76 GB        │ 4.76 GB       │ 356→168 │ 65→65   │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_fw_256_1d_32 │ 1962.99     │ 1320.08    │ 32.75%      │ 32.33 GB       │ 32.33 GB      │ 291→229 │ 0→0     │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_fw_64_2d_32  │ 337.42      │ 274.20     │ 18.74%      │ 5.11 GB        │ 5.11 GB       │ 356→131 │ 65→65   │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ llama3_8b_fw_64_1d_32  │ 1895.20     │ 1266.55    │ 33.17%      │ 32.68 GB       │ 32.68 GB      │ 291→229 │ 0→0     │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ dsv3_fw_64             │ 496019.33   │ 495847.31  │ 0.03%       │ 51.93 GB       │ 51.95 GB      │ 377→105 │ 0→0     │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ dsv3_fw_128            │ 5991562.51  │ 5991297.07 │ 0.00%       │ 54.82 GB       │ 54.85 GB      │ 377→106 │ 0→0     │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ dsv3_bw_64             │ 702.30      │ 267.70     │ 61.88%      │ 28.90 GB       │ 32.27 GB      │ 376→219 │ 377→353 │ 0→0   │
├────────────────────────┼─────────────┼────────────┼─────────────┼────────────────┼───────────────┼─────────┼─────────┼───────┤
│ dsv3_bw_128            │ 1659.95     │ 1045.78    │ 37.00%      │ 31.34 GB       │ 34.71 GB      │ 298→157 │ 377→351 │ 0→0   │
└────────────────────────┴─────────────┴────────────┴─────────────┴────────────────┴───────────────┴─────────┴─────────┴───────┘

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 18, 2026
…4, 256 gpus

stack-info: PR: #289, branch: IvanKobzarev/stack/12
ghstack-source-id: d69455c
Pull-Request: #318
Comment on lines +285 to +286
while is_wait_tensor(comm_node):
comm_node = comm_node.args[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain a bit more what is going on here? Can there be multiple redundant wait_tensor calls in the graph>

"inputs": [get_repr(arg) for arg in node.args],
}

if dur > 0.0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When can this happen, is it to remove wait_tensor and getitem operators?

I have found it nice to have a 1:1 mapping between the graph and the trace, is the added launch_overhead biasing the visualization?

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Let's remove the dur == 0 condition, otherwise good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants