Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[torch.compile] register allreduce operations as custom ops #8526

Merged
merged 13 commits into from
Sep 17, 2024
Prev Previous commit
Next Next commit
add one more condition
  • Loading branch information
youkaichao committed Sep 17, 2024
commit 7da3dc87264bfbde6c9c9eabdd1aac9c12fb8046
2 changes: 2 additions & 0 deletions vllm/distributed/device_communicators/custom_all_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ def register_graph_buffers(self):
ops.register_graph_buffers(self._ptr, handles, offsets)

def should_custom_ar(self, inp: torch.Tensor):
if self.disabled:
return False
inp_size = inp.numel() * inp.element_size()
# custom allreduce requires input byte size to be multiples of 16
if inp_size % 16 != 0:
Expand Down
Loading