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

Nccl ops correction changes #3387

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Nccl ops correction changes #3387

wants to merge 4 commits into from

Conversation

apbose
Copy link
Collaborator

@apbose apbose commented Feb 10, 2025

No description provided.

@apbose apbose requested a review from narendasan February 10, 2025 19:16
@github-actions github-actions bot added component: lowering Issues re: The lowering / preprocessing passes component: conversion Issues re: Conversion stage component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: torch_compile labels Feb 10, 2025
Comment on lines 68 to 76
# transpose key deleted since not desirable to lower it to permute
to_delete = {
key
for key in settings_aot_autograd["decompositions"]
if "detach" in key._name or "transpose" in key._name
}

for key in to_delete:
del settings_aot_autograd["decompositions"][key]
Copy link
Collaborator

Choose a reason for hiding this comment

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

we have a remove_detach lowering pass. Can that help here ?

if aten.detach in settings_aot_autograd["decompositions"]:
del settings_aot_autograd["decompositions"][aten.detach]
# transpose key deleted since not desirable to lower it to permute
to_delete = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this apply to all cases not just NCCL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean in the non distributed example? I am not sure about that answer, I added this for the llama3 example since I was issues in the model lowering and it was generating graph breaks at the wrong part, leading to complex input error. It can be added to all cases in case if we want to not lower transpose to permute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: runtime component: torch_compile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants