Skip to content

Conversation

@richardsliu
Copy link
Contributor

Issue: The Ray worker could fail to actuall acquire the TPU devices if another process is already using the TPU. This would cause Jax to fall back to CPUs in the Ray worker process.

Fix: If running with Ray, all processes by default should have JAX_PLATFORMS set to cpu (this can be set from the yaml configuration, which is not included in this PR). When a Ray worker is created, override the runtime environment to tpu,cpu. This ensures that the Ray worker can acquire access to the TPU device.

@qihqi qihqi requested a review from FanhaiLu1 July 9, 2024 18:02
@richardsliu richardsliu merged commit 508d71c into AI-Hypercomputer:main Jul 9, 2024
Copy link
Collaborator

@FanhaiLu1 FanhaiLu1 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

wang2yn84 pushed a commit that referenced this pull request Jul 18, 2024
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.

3 participants