Skip to content

Conversation

@mydatascience
Copy link
Collaborator

Description

Better handling of resources namely TPU so there is one place to init it and gracefully release

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Signed-off-by: Vladimir Suvorov <[email protected]>
@mydatascience mydatascience added the draft Draft PR label Oct 10, 2025
@mydatascience mydatascience changed the title Refactor resource management [WIP]Refactor resource management Oct 10, 2025
Signed-off-by: Vladimir Suvorov <[email protected]>
@shauryagup
Copy link
Collaborator

Can you clarify the motivation for this a bit more? Is there a particular multi-tenancy setup that you are running that needs this resource management? My initial thought is that this resource management should be done by a higher layer whichever is scheduling workloads that needs to share resources like GKE etc.

Also, to note is that this logic seems highly coupled with multi controller JAX and would likely not be needed with pathways (there is no jax.distributed.initialize() needed for pathways)

@mydatascience
Copy link
Collaborator Author

mydatascience commented Oct 23, 2025

The logic here is to have some resource management. Right now jax.distributed.initialize is called but jax.distributed.shutdown is not. Also jax.distributed.initialize is inside some functions in maxtext. For a colab it might result in non-releasing TPU even when the job is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

draft Draft PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants