Skip to content

opt-in for scatter operation in nvfuser #2183

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

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

Conversation

jjsjann123
Copy link
Collaborator

No description provided.

@t-vi
Copy link
Collaborator

t-vi commented Jun 4, 2025

Cool to see NVFuser expand the ops!

What would be the circumstances in which one would opt in and not opt in? I can see why linear is a thing that is more tricky in terms of perf, but this seems to be a good option to always activate.

I still think all options are more or less evil, but after #2057 , I'm more optimistic that this one could be temporary.

@jjsjann123
Copy link
Collaborator Author

I still think all options are more or less evil, but after #2057 , I'm more optimistic that this one could be temporary.

Agree that these options are not good user experience. These are going to be a temporary thing.

The reason I'm adding a flag is that we have concurrent work going on.

  • nvfuser is adding codegen support for these operations, so eventually we should be able to take them as-is by nvfuser.
  • Meanwhile, our multi-gpu folks are working on models that needed these operations inside nvfuser (for parallelization strategy), so we want to have them, even though they are running as a fallback.

We'll see a couple similar ops added in the coming weeks (topk groupedgemm e.t.c.). We are not expecting any user to rely on these flags, since fallbacks don't necessarily provide any kernel perf gain.

@jjsjann123
Copy link
Collaborator Author

Looks like scatter related tests run fine. I'm not sure what the failure on stable torch 2.7 is about.

I'll clean up the PR

@jjsjann123 jjsjann123 marked this pull request as ready for review June 7, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants