onnxruntime/onnxruntime/test/perftest
Adrian Tsai 4090d0d0de
Add DirectML Execution Provider (#2057)
This change adds a new execution provider powered by [DirectML](https://aka.ms/DirectML).

DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning on Windows. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers.

The DirectML execution provider is capable of greatly improving evaluation time of models using commodity GPU hardware, without sacrificing broad hardware support or requiring vendor-specific extensions to be installed.

**Note** that the DML EP code was moved verbatim from the existing WindowsAI project, which is why it doesn't yet conform to the onnxruntime coding style. This is something that can be fixed later; we would like to keep formatting/whitespace changes to a minimum for the time being to make it easier to port fixes from WindowsAI to ORT during this transition.

Summary of changes:
* Initial commit of DML EP files under onnxruntime/core/providers/dml
* Add cmake entries for building the DML EP and for pulling down the DirectML redist using nuget
* Add a submodule dependency on the Windows Implementation Library (WIL)
* Add docs under docs/execution_providers/DirectML-ExecutionProvider.md
* Add support for DML EP to provider tests and perf tests
* Add support for DML EP to fns_candy_style_transfer sample
* Add entries to the C ABI for instantiating the DML EP
2019-10-15 06:13:07 -07:00
..
posix Replace GSL with GSL-LITE submodule and fix up refs (#1920) 2019-10-01 12:43:29 -07:00
windows Replace GSL with GSL-LITE submodule and fix up refs (#1920) 2019-10-01 12:43:29 -07:00
command_args_parser.cc Add DirectML Execution Provider (#2057) 2019-10-15 06:13:07 -07:00
command_args_parser.h Support large model(>2GB) (#520) 2019-03-05 21:27:12 -08:00
main.cc Ryanunderhill/customop dll (#2002) 2019-10-11 11:12:51 -07:00
ort_test_session.cc Add DirectML Execution Provider (#2057) 2019-10-15 06:13:07 -07:00
ort_test_session.h Ryanunderhill/cxx api2 (#1091) 2019-05-24 11:15:51 -07:00
performance_runner.cc Replace GSL with GSL-LITE submodule and fix up refs (#1920) 2019-10-01 12:43:29 -07:00
performance_runner.h General performance testing tooling improvements (#1577) 2019-09-11 19:46:59 +10:00
README.md Implementation of Nuphar execution provider (#881) 2019-09-01 23:01:47 -07:00
ReadMe.txt Initial bootstrap commit. 2018-11-19 16:48:22 -08:00
test_configuration.h Introduce execution mode enum for clarity and extensibility; Change Python, C and C# APIs accordingly; Removed EnableSequentialExecution, DisableSequentialExecution in favor of the more general SetExecutionModeAPI. (#2098) 2019-10-14 09:48:19 -07:00
test_session.h perf test runner: support NCHW->NHWC rotation (#976) 2019-05-07 11:50:29 -07:00
tf_test_session.h Fix a build break in tf_test_session.h (#1205) 2019-06-11 14:05:24 -07:00
TFModelInfo.cc Remove unneeded C APIs + some refactoring. (#1555) 2019-08-07 11:05:29 -07:00
TFModelInfo.h Integrate tensorflow into onnxruntime_perf_test tool 2019-04-09 15:55:08 -07:00
utils.h Initial bootstrap commit. 2018-11-19 16:48:22 -08:00

ONNXRuntime Performance Test

onnxruntime_perf_test [options...] model_path result_file Options: -m [test_mode]: Specifies the test mode. Value coulde be 'duration' or 'times'. Provide 'duration' to run the test for a fix duration, and 'times' to repeated for a certain times. Default:'duration'. -e [cpu|cuda|mkldnn|tensorrt|ngraph|nuphar]: Specifies the provider 'cpu','cuda','mkldnn','tensorrt','ngraph' or 'nuphar'. Default:'cpu'. -r [repeated_times]: Specifies the repeated times if running in 'times' test mode.Default:1000. -t [seconds_to_run]: Specifies the seconds to run for 'duration' mode. Default:600. -p [profile_file]: Specifies the profile name to enable profiling and dump the profile data to the file. -s: Show statistics result, like P75, P90. -v: Show verbose information. -x: Use parallel executor, default (without -x): sequential executor. -h: help

Model path and input data dependency: Performance test uses the same input structure as onnx_test_runner. It requrires the directory trees as below:

--ModelName
    --test_data_set_0
        --input0.pb
    --test_data_set_2
        --input0.pb
    --model.onnx
The path of model.onnx needs to be provided as <model_path> argument.