From d0d20766869222eb59f692335a59948f19c11d74 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:50:55 +0000 Subject: [PATCH 1/5] Initial plan From df1ecc20ffc2f9e931544016679e35b1ed3a2189 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:57:54 +0000 Subject: [PATCH 2/5] Add missing driver options and fix inconsistencies in documentation Co-authored-by: CharlieL7 <11913076+CharlieL7@users.noreply.github.com> --- docs/driver/compile.rst | 8 ++++++-- docs/driver/read.rst | 16 ++++++++++++++++ docs/migraphx-driver.rst | 22 ++++++++++++++++++++-- docs/reference/driver-options.rst | 8 ++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/docs/driver/compile.rst b/docs/driver/compile.rst index a2d9ac48f5f..8c5d0007273 100644 --- a/docs/driver/compile.rst +++ b/docs/driver/compile.rst @@ -28,7 +28,7 @@ Disable fast math optimization .. option:: --exhaustive-tune -Perform an exhaustive search to find the fastest version of generated kernels for selected backend +Exhaustively search for best tuning parameters for kernels .. option:: --fp16 @@ -44,4 +44,8 @@ Quantize for int8 .. option:: --fp8 -Quantize for Float8E4M3FNUZ type +Quantize for fp8 + +.. option:: --int4-weights + +Quantize weights for int4 diff --git a/docs/driver/read.rst b/docs/driver/read.rst index db32b11dda7..8a4ab740271 100644 --- a/docs/driver/read.rst +++ b/docs/driver/read.rst @@ -42,10 +42,18 @@ Treat tensorflow format as nchw Trim instructions from the end (Default: 0) +.. option:: --trim-size, -s [unsigned int] + +Number of instructions in the trim model + .. option:: --input-dim [std::vector] Dim of a parameter (format: "@name d1 d2 dn") +.. option:: --dim-param [std::vector] + +Symbolic parameter dimension name (fixed / dynamic) - (fixed format): "@dim_param_name" "x" / (dynamic format): "@dim_param_name" "{min:x, max:y, optimals:[o1,o2]}" + .. option:: --dyn-input-dim [std::vector] Set dynamic dimensions of a parameter using JSON formatting (format "@name" "dynamic_dimension_json") @@ -54,10 +62,18 @@ Set dynamic dimensions of a parameter using JSON formatting (format "@name" "dyn Set the default dynamic dimension (format {min:x, max:y, optimals:[o1,o2,...]}) +.. option:: --output-names [std::vector] + +Names of node output (format: "name_1 name_2 name_n") + .. option:: --optimize, -O Optimize when reading +.. option:: --mlir + +Offload everything to mlir + .. option:: --apply-pass, -p Passes to apply to model diff --git a/docs/migraphx-driver.rst b/docs/migraphx-driver.rst index b84edb0f371..47f36e60083 100644 --- a/docs/migraphx-driver.rst +++ b/docs/migraphx-driver.rst @@ -71,14 +71,22 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d - Skips unknown operators when parsing and continues to parse. * - --trim | -t - Trims instructions from the end. + * - --trim-size | -s + - Number of instructions in the trim model. * - --optimize | -O - Optimizes read + * - --mlir + - Offloads everything to MLIR + * - --apply-pass | -p + - Passes to apply to model * - --graphviz | -g - Prints a graphviz representation * - --brief - Makes the output brief * - --cpp - Prints the program in .cpp format + * - --python | --py + - Prints the program in .py format * - --json - Prints the program in .json format * - --text @@ -95,10 +103,14 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d - Fills parameter with 1s * - --input-dim - Sets static dimensions of a parameter + * - --dim-param + - Symbolic parameter dimension name (fixed / dynamic) * - --dyn-input-dim - Sets dynamic dimensions of a parameter * - --default-dyn-dim - Sets default dynamic dimension + * - --output-names + - Names of node output * - --gpu - Compiles on the GPU * - --cpu @@ -110,7 +122,7 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d * - --disable-fast-math - Disables fast math optimization * - --exhaustive-tune - - Enables exhaustive search to find the fastest kernel + - Exhaustively searches for best tuning parameters for kernels * - --fp16 - Quantizes for fp16 * - --bf16 @@ -118,7 +130,9 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d * - --int8 - Quantizes for int8 * - --fp8 - - Quantize for ``Float8E4M3FNUZ`` type + - Quantizes for fp8 + * - --int4-weights + - Quantizes weights for int4 * - --rms-tol - Sets tolerance for the RMS error (Default: 0.001) * - --atol @@ -129,6 +143,10 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d - Verifies each instruction * - --reduce | -r - Reduces program and verifies + * - --bisect | -b + - Bisects program and verifies + * - --compiled-model | -c + - Compiled model to use * - --iterations | -n - Sets the number of iterations to run for perf report * - --list | -l diff --git a/docs/reference/driver-options.rst b/docs/reference/driver-options.rst index 82e75267d28..4fffa11501a 100644 --- a/docs/reference/driver-options.rst +++ b/docs/reference/driver-options.rst @@ -82,6 +82,14 @@ Verifies each instruction Reduces program and verifies +.. option:: -b, --bisect + +Bisects program and verifies + +.. option:: -c, --compiled-model [std::string] + +Compiled model to use + .. option:: --ref-use-double Converts floating point values to double for the ref target From 5b5590cc68147df348b70d7ff96140f7da3fdb76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:00:14 +0000 Subject: [PATCH 3/5] Fix acronym capitalization for consistency Co-authored-by: CharlieL7 <11913076+CharlieL7@users.noreply.github.com> --- docs/driver/compile.rst | 10 +++++----- docs/driver/read.rst | 2 +- docs/migraphx-driver.rst | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/driver/compile.rst b/docs/driver/compile.rst index 8c5d0007273..923bc7dea71 100644 --- a/docs/driver/compile.rst +++ b/docs/driver/compile.rst @@ -32,20 +32,20 @@ Exhaustively search for best tuning parameters for kernels .. option:: --fp16 -Quantize for fp16 +Quantize for FP16 .. option:: --bf16 -Quantize for bf16 +Quantize for BF16 .. option:: --int8 -Quantize for int8 +Quantize for INT8 .. option:: --fp8 -Quantize for fp8 +Quantize for FP8 .. option:: --int4-weights -Quantize weights for int4 +Quantize weights for INT4 diff --git a/docs/driver/read.rst b/docs/driver/read.rst index 8a4ab740271..2cb6aefb4d5 100644 --- a/docs/driver/read.rst +++ b/docs/driver/read.rst @@ -72,7 +72,7 @@ Optimize when reading .. option:: --mlir -Offload everything to mlir +Offload everything to MLIR .. option:: --apply-pass, -p diff --git a/docs/migraphx-driver.rst b/docs/migraphx-driver.rst index 47f36e60083..dd7c875e8d4 100644 --- a/docs/migraphx-driver.rst +++ b/docs/migraphx-driver.rst @@ -124,15 +124,15 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d * - --exhaustive-tune - Exhaustively searches for best tuning parameters for kernels * - --fp16 - - Quantizes for fp16 + - Quantizes for FP16 * - --bf16 - - Quantizes for bf16 + - Quantizes for BF16 * - --int8 - - Quantizes for int8 + - Quantizes for INT8 * - --fp8 - - Quantizes for fp8 + - Quantizes for FP8 * - --int4-weights - - Quantizes weights for int4 + - Quantizes weights for INT4 * - --rms-tol - Sets tolerance for the RMS error (Default: 0.001) * - --atol From 774de81bde592e11228fd7f0eb77179569c40243 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:02:08 +0000 Subject: [PATCH 4/5] Fix --python/--py option consistency across documentation Co-authored-by: CharlieL7 <11913076+CharlieL7@users.noreply.github.com> --- docs/driver/read.rst | 4 ++-- docs/migraphx-driver.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/driver/read.rst b/docs/driver/read.rst index 2cb6aefb4d5..0b7b9da9ff7 100644 --- a/docs/driver/read.rst +++ b/docs/driver/read.rst @@ -106,9 +106,9 @@ Print out program in text format. Print out program in binary format. -.. option:: --py +.. option:: --python, --py -Print out program using python API. +Print out the program as python program. .. option:: --output, -o [std::string] diff --git a/docs/migraphx-driver.rst b/docs/migraphx-driver.rst index dd7c875e8d4..3ab43616254 100644 --- a/docs/migraphx-driver.rst +++ b/docs/migraphx-driver.rst @@ -86,7 +86,7 @@ To learn which options can be used with which commands, see the :ref:`MIGraphX d * - --cpp - Prints the program in .cpp format * - --python | --py - - Prints the program in .py format + - Prints the program as python program * - --json - Prints the program in .json format * - --text From d1cfbcbc850b5dced277383a96c8aab50d2eabe4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 20:33:02 +0000 Subject: [PATCH 5/5] Add documentation for driver time command Co-authored-by: CharlieL7 <11913076+CharlieL7@users.noreply.github.com> --- docs/migraphx-driver.rst | 2 ++ docs/reference/driver-options.rst | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/migraphx-driver.rst b/docs/migraphx-driver.rst index 3ab43616254..2cadb23867a 100644 --- a/docs/migraphx-driver.rst +++ b/docs/migraphx-driver.rst @@ -38,6 +38,8 @@ The table below summarizes the MIGraphX driver commands. - Runs reference and GPU implementations and checks outputs for consistency * - perf - Compiles and runs input graph followed by printing the performance report + * - time + - Compiles and runs input graph and reports total time Options ---------- diff --git a/docs/reference/driver-options.rst b/docs/reference/driver-options.rst index 4fffa11501a..a3028d12f29 100644 --- a/docs/reference/driver-options.rst +++ b/docs/reference/driver-options.rst @@ -52,6 +52,20 @@ Compiles and runs input graph then prints performance report. Sets number of iterations to run for perf report (Default: 100) +time +---- + +.. program:: migraphx-driver time + +Compiles and runs input graph and reports total time. + +.. include:: ../driver/read.rst +.. include:: ../driver/compile.rst + +.. option:: --iterations, -n [unsigned int] + +Sets number of iterations to run (Default: 100) + verify ------