NVIDIA / NVIDIA/Megatron-LM

torch.compile is incompatible with tensor parallelism

Open
#2,598 4 comments 0 reactions 1 assignee Claimed by @gautham-kollu View on GitHub
bug community-request waiting-on-customer
Dominant language
Python
Stars
17.9k
Forks
4.5k
Avg merge
4d 6h
Merged PRs (30d)
271

Description

**Describe the bug**

Finetune QwenVL with tensor parallel size = 4, using torch.compile for kernels optimization

**Steps/Code to reproduce bug**

Please list *minimal* steps or code snippet for us to be able to reproduce the bug.

`
model = model_provider_func()
model = torch.compile(model)
`

**Expected behavior**

performance acceleration w/ torch.compile on Megatron

**Additional context**

Error occur:
File "/tmp/torchinductor_root/ab/cab27rpc5syxsj7fvzyur3lov3xqznlnvvqq553eqxnzco5hq4rr.py", line 37, in call [rank3]: assert_size_stride(arg0_1, (2005, 1, 5120), (5120, 10265600, 1)) [rank3]: AssertionError: wrong number of dimensions

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.