Skip to content

Fallback to standard mesh on neuron backend for incompatible multi-granule meshes #1146

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 1 commit into
base: main
Choose a base branch
from

Conversation

apoorvtintin
Copy link
Contributor

@apoorvtintin apoorvtintin commented May 1, 2025

Allow fallback to standard mesh for multi-granule mesh as such a mesh provides better performance on TRN2

  • Added corresponding tests for fallback and mesh creation for TRN2.
  • Switch to a new mesh for neuron-(trn2|trn2n).48xlarge-64 on 70B-FujiV2 as it provides better scale-out performance.

@apoorvtintin
Copy link
Contributor Author

Rebased the PR

if (
device_platform == "gpu"
device_platform in ("gpu", "neuron")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
device_platform in ("gpu", "neuron")
device_platform != "tpu"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made this change, thank you!

@@ -1743,13 +1743,15 @@ def create_device_mesh(
assert num_devices % num_granules == 0, "Number of devices should divide number of granules."
num_devices_per_granule = num_devices // num_granules

# Fallback to a standard mesh if on GPU with incompatible multi-granule mesh.
# Fallback to a standard mesh if on GPU or neuron with incompatible multi-granule mesh.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Fallback to a standard mesh if on GPU or neuron with incompatible multi-granule mesh.
# Fallback to a standard mesh with incompatible multi-granule mesh if not on TPU.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made this change, thank you!

- Switch to a new mesh for neuron-(trn2|trn2n).48xlarge-64 with better scale-out performance.
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