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 option to dump hlo #1121

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Add option to dump hlo #1121

merged 1 commit into from
Jan 3, 2025

Conversation

gobbleturk
Copy link
Collaborator

@gobbleturk gobbleturk commented Dec 23, 2024

Description

  • Add option to Dump HLO in MaxText
  • This uploads soon after compilation for both train.py and train_compile, which is beneficial as compared to using --debug-dump-gcs on XPK which uploads only at the job end (which will never happen if the job hangs).
  • This does have the drawback of assuming a GCS endpoint for the dump location, some code modification is required for arbitrary endpoints

Tests

Ran a few manual tests of train.py different dump options on both local devbox and on a larger XPK job, as well as some local train_compile tests.
We can modify our hybrid sim flow to use this so it will be covered in e2e test. It is hard to unit test because

  1. it is not hermetic - depending on the state of the jax cache and gcs buckets
  2. The XLA flags does not play nicely with pytest, I think only one backend will be set with an intial set of XLA flags, we cannot use different flags in different tests

Checklist

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

  • I have performed a self-review of my code.
  • 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.

@gobbleturk gobbleturk force-pushed the mattdavidow-dump-hlo branch from 0214dc8 to d52ab9d Compare January 3, 2025 19:20
@copybara-service copybara-service bot merged commit 6eb375f into main Jan 3, 2025
16 checks passed
@copybara-service copybara-service bot deleted the mattdavidow-dump-hlo branch January 3, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants