Applies to Linux


3 min read time

MIGraphX driver provides roctx command which can be used with rocprof binary to get marker timing information for each MIGraphX operator. In order to help user to process timing information, rocTX helper script is provided at tools/ The helper script provides two main functionality: run and parse. Available knobs and usage are given below:

Usage: [-h] [--json-path json_path] [--out out]
[--study-name study-name] [--repeat repeat] [--parse]
[--run run] [--debug]

Runs migraphx-driver roctx command and given migraphx-driver knobs, and then parses the results, providing GPU kernel timing information. MIGraphX knobs can be given via a string to –run knob. Please see the examples below.


Given –json-path, parses JSON file and provides GPU kernel timing information.


Output folder


Optional. Allows user to name a study for easier interpretation. Defaults to timestamp.


Number of iterations. Set to 2 by default.


Provides additional debug information related to data. Only use for debugging purposes.


Running inference with rocTX for a given ONNX file:

python --run '--onnx --gpu fcn-resnet50-11.onnx' --out output_folder --repeat 5

After a run, similar to output given below is expected at terminal. The output will provide SUM, MIN, MAX and COUNT information for each kernel executed for a given model. Average total time is also provided. There are three files provided for reference:

  1. OUTPUT CSV FILE provides a summary of the run, providing utilized MIGraphX knobs and related kernel timing information

  2. KERNEL TIMING DETAILS provides the hotspot kernel timing information

  3. This will provide all output data related to all iterations executed during a run.

An example output:


Hotspot kerel timing information:


Parsing an already existing JSON file:

python --parse --json-path ../trace.json