Merge trace files together.

To run:

python -m composer.profiler.json_trace_merger -o merged_trace_output.json path/to/input_file_1.json path/to/input_file_2.json ...

To view the traces, open a Google Chrome browser window, navigate to chrome://tracing and load the merged_trace_output.json to visualize the trace.



Merge profiler output JSON trace files together.

composer.profiler.json_trace_merger.merge_traces(output_file, *trace_files)[source]#

Merge profiler output JSON trace files together.

This function will update the trace events such that:

  • The pid will be set to the global rank.

  • The ts is syncronized with that of the rank 0 process.

  • The backward pass process appears below the forward process.

  • output_file (str | Path) โ€“ The file to write the merged trace to

  • trace_files (str | Path) โ€“ Variable number of trace files to merge together