Commit 076556e9 authored by Umang Yadav's avatar Umang Yadav
Browse files

change threshold to rms_tol

parent f5329965
...@@ -50,9 +50,9 @@ Runs reference and CPU or GPU implementations and checks outputs for consistency ...@@ -50,9 +50,9 @@ Runs reference and CPU or GPU implementations and checks outputs for consistency
.. include:: ./driver/compile.rst .. include:: ./driver/compile.rst
.. option:: --threshold [double] .. option:: --rms_tol [double]
Threshold for RMS error (Default: 0.001) Tolerance for RMS error (Default: 0.001)
.. option:: -i, --per-instruction .. option:: -i, --per-instruction
......
...@@ -21,45 +21,45 @@ See below for a comprehensive list of commands and option arguments, as well as ...@@ -21,45 +21,45 @@ See below for a comprehensive list of commands and option arguments, as well as
| perf | Compiles and runs input graph then prints performance report | | perf | Compiles and runs input graph then prints performance report |
### Options ### Options
| Option | Description | | Option | Description |
| ---------------------------------------- | --------------------------------------------------------- | | ---------------------------------------- | ---------------------------------------------------------------------------------------------- |
| --help \| -h | Show help | | --help \| -h | Show help |
| --model <resnet50\|inceptionv3\|alexnet> | Loads one of the three default models | | --model <resnet50\|inceptionv3\|alexnet> | Loads one of the three default models |
| --onnx | Load file as onnx graph | | --onnx | Load file as onnx graph |
| --tf | Load file as a tensorflow graph | | --tf | Load file as a tensorflow graph |
| --migraphx | Load file as a migraphx graph | | --migraphx | Load file as a migraphx graph |
| --migraphx-json | Load file as a migraphx JSON graph | | --migraphx-json | Load file as a migraphx JSON graph |
| --batch | For a static model, set batch size. For a dynamic batch model, sets the batch size at runtime.| | --batch | For a static model, set batch size. For a dynamic batch model, sets the batch size at runtime. |
| --nhwc | Treat tensorflow format as nhwc | | --nhwc | Treat tensorflow format as nhwc |
| --nchw | Treat tensorflow format as nchw | | --nchw | Treat tensorflow format as nchw |
| --skip-unknown-operators | Skip unknown operators when parsing and continue to parse | | --skip-unknown-operators | Skip unknown operators when parsing and continue to parse |
| --trim \| -t | Trim instructions from the end | | --trim \| -t | Trim instructions from the end |
| --optimize \| -O | Optimize when reading | | --optimize \| -O | Optimize when reading |
| --graphviz \| -g | Print out a graphviz representation | | --graphviz \| -g | Print out a graphviz representation |
| --brief | Make the output brief | | --brief | Make the output brief |
| --cpp | Print out the program as cpp program | | --cpp | Print out the program as cpp program |
| --json | Print out program as json | | --json | Print out program as json |
| --text | Print out program in text format | | --text | Print out program in text format |
| --binary | Print out program in binary format | | --binary | Print out program in binary format |
| --output \| -o | Output to file | | --output \| -o | Output to file |
| --fill0 | Fill parameter with 0s | | --fill0 | Fill parameter with 0s |
| --fill1 | Fill parameter with 1s | | --fill1 | Fill parameter with 1s |
| --input-dim | Set static dimensions of a parameter | | --input-dim | Set static dimensions of a parameter |
| --dyn-input-dim | Set dynamic dimensions of a parameter | | --dyn-input-dim | Set dynamic dimensions of a parameter |
| --default-dyn-dim | Set default dynamic dimension | | --default-dyn-dim | Set default dynamic dimension |
| --gpu | Compile on the gpu | | --gpu | Compile on the gpu |
| --cpu | Compile on the cpu | | --cpu | Compile on the cpu |
| --ref | Compile on the reference implementation | | --ref | Compile on the reference implementation |
| --enable-offload-copy | Enable implicit offload copying | | --enable-offload-copy | Enable implicit offload copying |
| --disable-fast-math | Disable fast math optimization | | --disable-fast-math | Disable fast math optimization |
| --exhaustive-tune | Enable exhaustive search to find fastest kernel | | --exhaustive-tune | Enable exhaustive search to find fastest kernel |
| --fp16 | Quantize for fp16 | | --fp16 | Quantize for fp16 |
| --int8 | Quantize for int8 | | --int8 | Quantize for int8 |
| --threshold | threshold for errors | | --rms_tol | Tolerance for the RMS error |
| --per-instruction \| -i | Verify each instruction | | --per-instruction \| -i | Verify each instruction |
| --reduce \| -r | Reduce program and verify | | --reduce \| -r | Reduce program and verify |
| --iterations \| -n | Number of iterations to run for perf report | | --iterations \| -n | Number of iterations to run for perf report |
| --list \| -l | List all the operators of MIGraphX | | --list \| -l | List all the operators of MIGraphX |
## Usage Examples ## Usage Examples
The examples below supply a simple MNIST ConvNet as the input graph. Models of higher complexity will have considerably larger outputs in most cases. The examples below supply a simple MNIST ConvNet as the input graph. Models of higher complexity will have considerably larger outputs in most cases.
......
...@@ -536,13 +536,13 @@ struct params : command<params> ...@@ -536,13 +536,13 @@ struct params : command<params>
struct verify : command<verify> struct verify : command<verify>
{ {
compiler c; compiler c;
double threshold = 0.001; double rms_tol = 0.001;
bool per_instruction = false; bool per_instruction = false;
bool reduce = false; bool reduce = false;
void parse(argument_parser& ap) void parse(argument_parser& ap)
{ {
c.parse(ap); c.parse(ap);
ap(threshold, {"--threshold"}, ap.help("threshold for the RMS error")); ap(rms_tol, {"--rms_tol"}, ap.help("Tolerance for the RMS error"));
ap(per_instruction, ap(per_instruction,
{"-i", "--per-instruction"}, {"-i", "--per-instruction"},
ap.help("Verify each instruction"), ap.help("Verify each instruction"),
...@@ -567,15 +567,15 @@ struct verify : command<verify> ...@@ -567,15 +567,15 @@ struct verify : command<verify>
if(per_instruction) if(per_instruction)
{ {
verify_instructions(p, t, c.co, quantize, threshold); verify_instructions(p, t, c.co, quantize, rms_tol);
} }
else if(reduce) else if(reduce)
{ {
verify_reduced_program(p, t, c.co, quantize, m, threshold); verify_reduced_program(p, t, c.co, quantize, m, rms_tol);
} }
else else
{ {
verify_program(c.l.file, p, t, c.co, quantize, m, threshold); verify_program(c.l.file, p, t, c.co, quantize, m, rms_tol);
} }
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment