Repository navigation
Support TPU advanced profiling options and upload_all_profiler_results in MicroStepProfiler - #5778
Open
SurbhiJainUSC wants to merge 1 commit into
Open
SurbhiJainUSC wants to merge 1 commit into
SurbhiJainUSC wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the MicroStepProfiler to conditionally enable profiling based on the profiler type, process index, and upload settings. It also dynamically populates the advanced_configuration dictionary with TPU profiling and power event options. Corresponding integration and unit tests have been added to verify these new behaviors. The review feedback suggests explicitly casting config.xprof_tpu_power_trace_level to an integer to avoid potential serialization issues with custom enum subclasses in the underlying profiling client.
…s in MicroStepProfiler
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
SurbhiJainUSC
force-pushed
the
b_573295009
branch
from
October 15, 2026 20:50
b02bd4a to
87fc2af
Compare
igorts-git
approved these changes
Oct 15, 2026
SurbhiJainUSC
marked this pull request as ready for review
October 15, 2026 21:51
SurbhiJainUSC
requested review from
A9isha,
NuojCheng,
RissyRan,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
October 15, 2026 21:51
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR aligns
MicroStepProfilerin the training engine withcommon/profiler.pyso it respectsconfig.profiler,upload_all_profiler_results, and TPU/power advanced profiling options.Previously,
MicroStepProfiler:config.profiler, meaningProfilerType.NONE(profiler="") still opened a trace wheneverprofiler_steps > 0(which defaults to5inbase.yml), causing"No profile started"failures under Pathways.jax.process_index() == 0, ignoringupload_all_profiler_results.ProfileOptions.advanced_configurationonly forenable_continuous_profiling, ignoringenable_tpu_profiling_options(tpu_num_chips_to_profile_per_task,tpu_num_sparse_core_tiles_to_trace,tpu_num_sparse_cores_to_trace) andprofile_power_events(tpu_power_trace_level,e2e_enable_fw_*_event).This change updates
MicroStepProfilerto:config.profiler == ProfilerType.XPLANE.config.upload_all_profiler_resultsisTrue.ProfileOptions.advanced_configurationforenable_tpu_profiling_optionsandprofile_power_eventsin addition toenable_continuous_profiling.FIXES: b/573295009
Tests
tests/post_training/unit/maxtext_engine_profiling_test.pyChecklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.