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

Feature request: Extend the privatization to improve segmentation #3830

Open
naoyam opened this issue Feb 5, 2025 · 0 comments
Open

Feature request: Extend the privatization to improve segmentation #3830

naoyam opened this issue Feb 5, 2025 · 0 comments
Labels
Segmentation Issues related to nvFuser Segmentation

Comments

@naoyam
Copy link
Collaborator

naoyam commented Feb 5, 2025

Here's how the Llama3 RoPE forward fusion is currently segmented (with NVFUSER_ENABLE=resize_scheduler):

Image

There are two resize segments, one with the grey nodes and another with the yellow nodes. The green nodes compose a no-op segment.

One performance problem here is that T1 is used as an input to the yellow segment and T24 is generated as an output after just broadcast and expand, which is then fed into the grey segment. Instead, the grey segment should just directly read T1 and replicate the broadcast and expand ops.

The current status is better than it used to be because the bf16 tensor is used as the segment output and input, which was not the case before the privation of cast ops by #3776. I think we should extend that approach to include other "cheap" ops. In this particular case, extending the forwarding approach may work, but it also has some limitation.

@naoyam naoyam added the Segmentation Issues related to nvFuser Segmentation label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Segmentation Issues related to nvFuser Segmentation
Projects
None yet
Development

No branches or pull requests

1 participant