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

Add allreduce runtime support for nvshmem reduction on-stream api #21973

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tixxx
Copy link
Contributor

@Tixxx Tixxx commented Jan 28, 2025

This pr adds runtime support for nvshmem reduction on-stream api.
It adds a new backend config to instruction the emitter to lower to nvshmem with corresponding collective thunks that call nvshmem reduction api.

Copy link

google-cla bot commented Jan 28, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Tixxx Tixxx force-pushed the tixxx/nvshmem_ar branch 2 times, most recently from 11f965b to 74f118c Compare January 28, 2025 19:15
is_nvshmem_collective = backend_config.backend() == CollectiveBackendConfig::NVSHMEM;
}
return (alias->instruction()->opcode() == HloOpcode::kCustomCall &&
alias->instruction()->custom_call_target() == "mosaic_gpu") || is_nvshmem_collective;
Copy link
Contributor

Choose a reason for hiding this comment

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

why are mosaic_gpu custom calls in the same category as nvshmem ops?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is from the allocator branch. We use nvshmem allocator for mosaic gpu calls or native nvshmem collectives. I think instead of using mosaic_gpu custom call, the pallas kernel will use a more specific custom call name so this will change after it's changed in the other pr and rebase on that.

@Tixxx Tixxx force-pushed the tixxx/nvshmem_ar branch 4 times, most recently from 36e5e7d to 52701d0 Compare February 8, 2025 00:37
Added more fixes on top of base branch, needs one last rebase
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