diff --git a/.github/workflows/check-website-links.yml b/.github/workflows/check-website-links.yml new file mode 100644 index 0000000000..7340bccff2 --- /dev/null +++ b/.github/workflows/check-website-links.yml @@ -0,0 +1,27 @@ +name: CheckLinks +on: + push: + branches: + - gh-pages + pull_request: + branches: + - gh-pages + +jobs: + checklinks: + name: Check website links + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 + bundler-cache: true + - name: Build jekyll website with drafts + run: bundle exec jekyll build --drafts + - name: Check for broken links + run: | + bundle exec htmlproofer --assume_extension --checks_to_ignore ImageCheck,ScriptCheck --only_4xx --http_status_ignore 429 --allow_hash_href --url_ignore "https://onnxruntime.ai/docs/reference/api/c-api.html,https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html#c-api-example,https://www.onnxruntime.ai/docs/resources/graph-optimizations.html,onnxruntime/capi/onnxruntime_pybind11_state.html" --log-level :info ./_site diff --git a/Gemfile b/Gemfile index 410e2fc01c..f55151d29a 100644 --- a/Gemfile +++ b/Gemfile @@ -38,8 +38,3 @@ gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform? # kramdown v2 ships without the gfm parser by default. If you're using # kramdown v1, comment out this line. gem "kramdown-parser-gfm" - -# Link checker -gem 'rake' -gem 'html-proofer' - diff --git a/Gemfile.lock b/Gemfile.lock index 2148d3f09c..be6e4f6d56 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.2) + activesupport (6.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) coffee-script (2.4.1) coffee-script-source @@ -16,21 +16,36 @@ GEM colorator (1.1.0) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.7) - dnsruby (1.61.4) + concurrent-ruby (1.1.9) + dnsruby (1.61.7) simpleidn (~> 0.1) - em-websocket (0.5.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.12.0) - ffi (>= 1.3.0) + ethon (0.15.0) + ffi (>= 1.15.0) eventmachine (1.2.7) - eventmachine (1.2.7-x64-mingw32) - execjs (2.7.0) - faraday (1.0.1) + execjs (2.8.1) + faraday (1.8.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) - ffi (1.13.1) - ffi (1.13.1-x64-mingw32) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + ffi (1.15.4) forwardable-extended (2.6.0) gemoji (3.0.1) github-pages (207) @@ -86,7 +101,7 @@ GEM html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) - html-proofer (3.15.3) + html-proofer (3.19.1) addressable (~> 2.3) mercenary (~> 0.3) nokogumbo (~> 2.0) @@ -196,16 +211,16 @@ GEM jekyll-seo-tag (~> 2.0) jekyll-titles-from-headings (0.5.3) jekyll (>= 3.3, < 5.0) - jekyll-toc (0.14.0) - jekyll (>= 3.8) - nokogiri (~> 1.10) + jekyll-toc (0.17.1) + jekyll (>= 3.9) + nokogiri (~> 1.11) jekyll-watch (2.2.1) listen (~> 3.0) jemoji (0.11.1) gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) - just-the-docs (0.3.1) + just-the-docs (0.3.3) jekyll (>= 3.8.5) jekyll-seo-tag (~> 2.0) rake (>= 12.3.1, < 13.1.0) @@ -214,40 +229,39 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.2.1) + listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.4.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.1) + minitest (5.14.4) multipart-post (2.1.1) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) - nokogiri (1.10.10-x64-mingw32) - mini_portile2 (~> 2.4.0) - nokogumbo (2.0.2) + nokogiri (1.12.5-x86_64-linux) + racc (~> 1.4) + nokogumbo (2.0.5) nokogiri (~> 1.8, >= 1.8.4) - octokit (4.18.0) + octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - parallel (1.19.2) + parallel (1.21.0) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) + racc (1.6.0) rainbow (3.0.0) - rake (13.0.1) - rb-fsevent (0.10.4) + rake (13.0.6) + rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.4) + rexml (3.2.5) rouge (3.19.0) - ruby-enum (0.8.0) + ruby-enum (0.9.0) i18n - rubyzip (2.3.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) @@ -257,29 +271,27 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - simpleidn (0.1.1) + simpleidn (0.2.1) unf (~> 0.1.4) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.7) + tzinfo (1.2.9) thread_safe (~> 0.1) - tzinfo-data (1.2020.1) + tzinfo-data (1.2021.5) tzinfo (>= 1.0.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unf_ext (0.0.7.7-x64-mingw32) - unicode-display_width (1.7.0) + unf_ext (0.0.8) + unicode-display_width (1.8.0) wdm (0.1.1) yell (2.2.2) - zeitwerk (2.4.0) + zeitwerk (2.5.1) PLATFORMS - ruby - x64-mingw32 + x86_64-linux DEPENDENCIES github-pages (~> 207) @@ -294,4 +306,4 @@ DEPENDENCIES wdm (~> 0.1.0) BUNDLED WITH - 2.1.4 + 2.2.29 diff --git a/docs/build/android-ios.md b/docs/build/android-ios.md index f236acbbd6..60cf990c8b 100644 --- a/docs/build/android-ios.md +++ b/docs/build/android-ios.md @@ -7,7 +7,7 @@ nav_order: 5 # Build ONNX Runtime for Android and iOS {: .no_toc } -Below are general build instructions for Android and iOS. For instructions on fully deploying ONNX Runtime on mobile platforms (includes overall smaller package size and other configurations), see [How to: Deploy on mobile](../mobile). +Below are general build instructions for Android and iOS. For examples of deploying ONNX Runtime on mobile platforms (includes overall smaller package size and other configurations), see [Mobile Tutorials](../tutorials/mobile). ## Contents {: .no_toc } diff --git a/docs/build/eps.md b/docs/build/eps.md index 17d7be8688..a1f10c9220 100644 --- a/docs/build/eps.md +++ b/docs/build/eps.md @@ -96,7 +96,7 @@ See more information on the TensorRT Execution Provider [here](../execution-prov * The path to the CUDA installation must be provided via the CUDA_PATH environment variable, or the `--cuda_home` parameter. The CUDA path should contain `bin`, `include` and `lib` directories. * The path to the CUDA `bin` directory must be added to the PATH environment variable so that `nvcc` is found. * The path to the cuDNN installation (path to folder that contains libcudnn.so) must be provided via the cuDNN_PATH environment variable, or `--cudnn_home` parameter. - * Install [TensorRT](https://developer.nvidia.com/nvidia-tensorrt-download) + * Install [TensorRT](https://developer.nvidia.com/tensorrt) * The TensorRT execution provider for ONNX Runtime is built and tested with TensorRT 8.0.3.4. * To use earlier versions of TensorRT, prior to building, change the onnx-tensorrt submodule to a branch corresponding to the TensorRT version. e.g. To use TensorRT 7.2.x, * cd cmake/external/onnx-tensorrt @@ -428,7 +428,7 @@ See more information on the ACL Execution Provider [here](../execution-providers source /opt/fsl-imx-xwayland/4.*/environment-setup-aarch64-poky-linux alias cmake="/usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" ``` -* See [Build ARM](#ARM) below for information on building for ARM devices +* See [Build ARM](inferencing.md#arm) below for information on building for ARM devices ### Build Instructions {: .no_toc } @@ -498,7 +498,7 @@ source /opt/fsl-imx-xwayland/4.*/environment-setup-aarch64-poky-linux alias cmake="/usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" ``` -* See [Build ARM](#ARM) below for information on building for ARM devices +* See [Build ARM](inferencing.md#arm) below for information on building for ARM devices ### Build Instructions {: .no_toc } @@ -537,7 +537,7 @@ See more information on the RKNPU Execution Provider [here](../execution-provide * Supported platform: RK1808 Linux -* See [Build ARM](#ARM) below for information on building for ARM devices +* See [Build ARM](inferencing.md#arm) below for information on building for ARM devices * Use gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu instead of gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf, and modify CMAKE_CXX_COMPILER & CMAKE_C_COMPILER in tool.cmake: ``` @@ -550,7 +550,7 @@ set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) #### Linux -1. Download [rknpu_ddk](#https://github.com/airockchip/rknpu_ddk.git) to any directory. +1. Download [rknpu_ddk](https://github.com/airockchip/rknpu_ddk.git) to any directory. 2. Build ONNX Runtime library and test: @@ -571,7 +571,7 @@ set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) ## Vitis-AI See more information on the Xilinx Vitis-AI execution provider [here](../execution-providers/Vitis-AI-ExecutionProvider.md). -For instructions to setup the hardware environment: [Hardware setup](../execution-providers/Vitis-AI-ExecutionProvider.md#Hardware-setup) +For instructions to setup the hardware environment: [Hardware setup](../execution-providers/Vitis-AI-ExecutionProvider.md#hardware-setup) ### Linux {: .no_toc } diff --git a/docs/build/training.md b/docs/build/training.md index 79e2b9edae..049a5ebd09 100644 --- a/docs/build/training.md +++ b/docs/build/training.md @@ -50,7 +50,7 @@ The default NVIDIA GPU build requires CUDA runtime libraries installed on the sy * [OpenMPI](https://www.open-mpi.org/) 4.0.4 * See [install_openmpi.sh](https://github.com/microsoft/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/install_openmpi.sh) -These dependency versions should reflect what is in [Dockerfile.training](https://github.com/microsoft/onnxruntime/blob/master/dockerfiles/Dockerfile.training). +These dependency versions should reflect what is in the [Dockerfiles](https://github.com/pytorch/ort/tree/main/docker). ### Build instructions {: .no_toc } @@ -82,9 +82,9 @@ The default AMD GPU build requires ROCM software toolkit installed on the system * [ROCM](https://rocmdocs.amd.com/en/latest/) * [OpenMPI](https://www.open-mpi.org/) 4.0.4 - * See [install_openmpi.sh](./tools/ci_build/github/linux/docker/scripts/install_openmpi.sh) + * See [install_openmpi.sh](https://github.com/microsoft/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/install_openmpi.sh) -These dependency versions should reflect what is in [Dockerfile.training](./dockerfiles/Dockerfile.training). +These dependency versions should reflect what is in the [Dockerfiles](https://github.com/pytorch/ort/tree/main/docker). ### Build instructions {: .no_toc } diff --git a/docs/execution-providers/ACL-ExecutionProvider.md b/docs/execution-providers/ACL-ExecutionProvider.md index 65cd2eb0cc..aafe30f8dd 100644 --- a/docs/execution-providers/ACL-ExecutionProvider.md +++ b/docs/execution-providers/ACL-ExecutionProvider.md @@ -18,7 +18,7 @@ nav_order: 4 ## Build -For build instructions, please see the [BUILD page](./build/eps.md#arm-compute-library). +For build instructions, please see the [build page](../build/eps.md#arm-compute-library). ## Usage ### C/C++ @@ -33,6 +33,6 @@ Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_ACL(sf, enable_cpu_me The C API details are [here](../get-started/with-c.html). ## Performance Tuning -For performance tuning, please see guidance on this page: [ONNX Runtime Perf Tuning](./performance/tune-performance.md) +For performance tuning, please see guidance on this page: [ONNX Runtime Perf Tuning](../performance/tune-performance.md) When/if using [onnxruntime_perf_test](https://github.com/microsoft/onnxruntime/tree/master/onnxruntime/test/perftest){:target="_blank"}, use the flag -e acl diff --git a/docs/execution-providers/DirectML-ExecutionProvider.md b/docs/execution-providers/DirectML-ExecutionProvider.md index 2253816b6c..abe130cd7f 100644 --- a/docs/execution-providers/DirectML-ExecutionProvider.md +++ b/docs/execution-providers/DirectML-ExecutionProvider.md @@ -52,7 +52,7 @@ Note that building onnxruntime with the DirectML execution provider enabled caus ## Usage -When using the [C API](../get-started/with-c.html.md) with a DML-enabled build of onnxruntime, the DirectML execution provider can be enabled using one of the two factory functions included in `include/onnxruntime/core/providers/dml/dml_provider_factory.h`. +When using the [C API](../get-started/with-c.md) with a DML-enabled build of onnxruntime, the DirectML execution provider can be enabled using one of the two factory functions included in `include/onnxruntime/core/providers/dml/dml_provider_factory.h`. ### `OrtSessionOptionsAppendExecutionProvider_DML` function {: .no_toc } diff --git a/docs/execution-providers/RKNPU-ExecutionProvider.md b/docs/execution-providers/RKNPU-ExecutionProvider.md index 31efb0ed77..e6b573bbd6 100644 --- a/docs/execution-providers/RKNPU-ExecutionProvider.md +++ b/docs/execution-providers/RKNPU-ExecutionProvider.md @@ -29,7 +29,7 @@ Ort::SessionOptions sf; Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_RKNPU(sf)); Ort::Session session(env, model_path, sf); ``` -The C API details are [here](../get-started/with-c.html.md). +The C API details are [here](../get-started/with-c.md). ## Support Coverage diff --git a/docs/execution-providers/Vitis-AI-ExecutionProvider.md b/docs/execution-providers/Vitis-AI-ExecutionProvider.md index d0dd0afddf..97695678ea 100644 --- a/docs/execution-providers/Vitis-AI-ExecutionProvider.md +++ b/docs/execution-providers/Vitis-AI-ExecutionProvider.md @@ -39,7 +39,7 @@ The following table lists system requirements for running docker containers as w ## Build See [Build instructions](../build/eps.md#vitis-ai). -**Hardware setup and docker build** +### Hardware setup 1. Clone the Vitis AI repository: ``` @@ -92,11 +92,11 @@ A couple of environment variables can be used to customize the Vitis-AI executio | PX_QUANT_SIZE | 128 | The number of inputs that will be used for quantization (necessary for Vitis-AI acceleration) | | PX_BUILD_DIR | Use the on-the-fly quantization flow | Loads the quantization and compilation information from the provided build directory and immediately starts Vitis-AI hardware acceleration. This configuration can be used if the model has been executed before using on-the-fly quantization during which the quantization and comilation information was cached in a build directory. | -### Samples +## Samples When using python, you can base yourself on the following example: -``` +```python # Import pyxir before onnxruntime import pyxir import pyxir.frontend.onnx diff --git a/docs/execution-providers/index.md b/docs/execution-providers/index.md index 33debbf8d5..a30319547e 100644 --- a/docs/execution-providers/index.md +++ b/docs/execution-providers/index.md @@ -39,7 +39,7 @@ Developers of specialized HW acceleration solutions can integrate with ONNX Runt ### Build ONNX Runtime package with EPs -The ONNX Runtime package can be built with any combination of the EPs along with the default CPU execution provider. **Note** that if multiple EPs are combined into the same ONNX Runtime package then all the dependent libraries must be present in the execution environment. The steps for producing the ONNX Runtime package with different EPs is documented [here](../build/inferencing.md#execution-providers). +The ONNX Runtime package can be built with any combination of the EPs along with the default CPU execution provider. **Note** that if multiple EPs are combined into the same ONNX Runtime package then all the dependent libraries must be present in the execution environment. The steps for producing the ONNX Runtime package with different EPs is documented [here](../build/inferencing.md). ### APIs for Execution Provider diff --git a/docs/execution-providers/oneDNN-ExecutionProvider.md b/docs/execution-providers/oneDNN-ExecutionProvider.md index e0031bd6d3..42a89e9934 100644 --- a/docs/execution-providers/oneDNN-ExecutionProvider.md +++ b/docs/execution-providers/oneDNN-ExecutionProvider.md @@ -37,7 +37,7 @@ bool enable_cpu_mem_arena = true; Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_Dnnl(sf, enable_cpu_mem_arena)); ``` -The C API details are [here](../get-started/with-c.html.md). +The C API details are [here](../get-started/with-c.md). ### Python diff --git a/docs/get-started/with-c.md b/docs/get-started/with-c.md index 11411a0243..f6b6adc839 100644 --- a/docs/get-started/with-c.md +++ b/docs/get-started/with-c.md @@ -17,8 +17,8 @@ nav_order: 4 | Artifact | Description | Supported Platforms | |-----------|-------------|---------------------| -| [Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime) | CPU (Release) |Windows, Linux, Mac, X64, X86 (Windows-only), ARM64 (Windows-only)...more details: [compatibility](../references/compatibility) | -| [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu) | GPU - CUDA (Release) | Windows, Linux, Mac, X64...more details: [compatibility](../references/compatibility) | +| [Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime) | CPU (Release) |Windows, Linux, Mac, X64, X86 (Windows-only), ARM64 (Windows-only)...more details: [compatibility](../reference/compatibility) | +| [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu) | GPU - CUDA (Release) | Windows, Linux, Mac, X64...more details: [compatibility](../reference/compatibility) | | [Microsoft.ML.OnnxRuntime.DirectML](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.directml) | GPU - DirectML (Release) | Windows 10 1709+ | | [ort-nightly](https://aiinfra.visualstudio.com/PublicPackages/_packaging?_a=feed&feed=ORT-Nightly) | CPU, GPU (Dev) | Same as Release versions | diff --git a/docs/get-started/with-csharp.md b/docs/get-started/with-csharp.md index 256f23ca8b..10db333268 100644 --- a/docs/get-started/with-csharp.md +++ b/docs/get-started/with-csharp.md @@ -125,8 +125,8 @@ The ONNX runtime provides a C# .NET binding for running inference on ONNX models | Artifact | Description | Supported Platforms | |-----------|-------------|---------------------| -| [Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime) | CPU (Release) |Windows, Linux, Mac, X64, X86 (Windows-only), ARM64 (Windows-only)...more details: [compatibility](../references/compatibility) | -| [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu) | GPU - CUDA (Release) | Windows, Linux, Mac, X64...more details: [compatibility](../references/compatibility) | +| [Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime) | CPU (Release) |Windows, Linux, Mac, X64, X86 (Windows-only), ARM64 (Windows-only)...more details: [compatibility](../reference/compatibility.md) | +| [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu) | GPU - CUDA (Release) | Windows, Linux, Mac, X64...more details: [compatibility](../reference/compatibility.md) | | [Microsoft.ML.OnnxRuntime.DirectML](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.directml) | GPU - DirectML (Release) | Windows 10 1709+ | | [ort-nightly](https://aiinfra.visualstudio.com/PublicPackages/_packaging?_a=feed&feed=ORT-Nightly) | CPU, GPU (Dev) | Same as Release versions | diff --git a/docs/get-started/with-obj-c.md b/docs/get-started/with-obj-c.md index 03a4498d82..a62374fd8c 100644 --- a/docs/get-started/with-obj-c.md +++ b/docs/get-started/with-obj-c.md @@ -26,7 +26,7 @@ The artifacts are published to CocoaPods. |-|-|-| | onnxruntime-mobile-objc | CPU and CoreML | iOS | -Refer to the [installation instructions](../tutorials/mobile/mobile/initial-setup.md#iOS). +Refer to the [installation instructions](../tutorials/mobile/initial-setup.md#ios). ## Swift Usage diff --git a/docs/get-started/with-winrt.md b/docs/get-started/with-winrt.md index 06ba9b631d..ab441b30b7 100644 --- a/docs/get-started/with-winrt.md +++ b/docs/get-started/with-winrt.md @@ -14,7 +14,7 @@ This allows scenarios such as passing a [Windows.Media.VideoFrame](https://docs. The WinML API is a WinRT API that shipped inside the Windows OS starting with build 1809 (RS5) in the Windows.AI.MachineLearning namespace. It embedded a version of the ONNX Runtime. -In addition to using the in-box version of WinML, WinML can also be installed as an application redistributable package (see [layered architecture](../references/high-level-design.md#the-onnx-runtime-and-windows-os-integration) for technical details). +In addition to using the in-box version of WinML, WinML can also be installed as an application redistributable package (see [layered architecture](../reference/high-level-design.md#the-onnx-runtime-and-windows-os-integration) for technical details). ## Contents {: .no_toc } diff --git a/docs/install/index.md b/docs/install/index.md index 0a66dbea34..ac8ea67ebd 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -139,20 +139,20 @@ by running `locale-gen en_US.UTF-8` and `update-locale LANG=en_US.UTF-8` |Python|If using pip, run `pip install --upgrade pip` prior to downloading.||| ||CPU: [**onnxruntime**](https://pypi.org/project/onnxruntime)| [ort-nightly (dev)](https://test.pypi.org/project/ort-nightly)|| ||GPU - CUDA: [**onnxruntime-gpu**](https://pypi.org/project/onnxruntime-gpu) | [ort-nightly-gpu (dev)](https://test.pypi.org/project/ort-nightly-gpu)|[View](../execution-providers/CUDA-ExecutionProvider.md#requirements)| -||OpenVINO: [**intel/onnxruntime**](https://github.com/intel/onnxruntime/releases/latest) - *Intel managed*||[View](build/eps.md#openvino)| +||OpenVINO: [**intel/onnxruntime**](https://github.com/intel/onnxruntime/releases/latest) - *Intel managed*||[View](../build/eps.md#openvino)| ||TensorRT (Jetson): [**Jetson Zoo**](https://elinux.org/Jetson_Zoo#ONNX_Runtime) - *NVIDIA managed*||| |C#/C/C++|CPU: [**Microsoft.ML.OnnxRuntime**](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime) |[ort-nightly (dev)](https://aiinfra.visualstudio.com/PublicPackages/_packaging?_a=feed&feed=ORT-Nightly)|| ||GPU - CUDA: [**Microsoft.ML.OnnxRuntime.Gpu**](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu)|[ort-nightly (dev)](https://aiinfra.visualstudio.com/PublicPackages/_packaging?_a=feed&feed=ORT-Nightly)|[View](../execution-providers/CUDA-ExecutionProvider)| ||GPU - DirectML: [**Microsoft.ML.OnnxRuntime.DirectML**](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.DirectML)|[ort-nightly (dev)](https://aiinfra.visualstudio.com/PublicPackages/_packaging?_a=feed&feed=ORT-Nightly)|[View](../execution-providers/DirectML-ExecutionProvider)| |WinML|[**Microsoft.AI.MachineLearning**](https://www.nuget.org/packages/Microsoft.AI.MachineLearning)||[View](https://docs.microsoft.com/en-us/windows/ai/windows-ml/port-app-to-nuget#prerequisites)| -|Java|CPU: [**com.microsoft.onnxruntime:onnxruntime**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime)||[View](../api/java-api.md)| -||GPU - CUDA: [**com.microsoft.onnxruntime:onnxruntime_gpu**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime_gpu)||[View](../api/java-api.md)| -|Android|[**com.microsoft.onnxruntime:onnxruntime-mobile**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime-mobile) ||[View](tutorials/mobile/mobile/initial-setup)| -|iOS (C/C++)|CocoaPods: **onnxruntime-mobile-c**||[View](tutorials/mobile/mobile/initial-setup)| -|Objective-C|CocoaPods: **onnxruntime-mobile-objc**||[View](tutorials/mobile/mobile/initial-setup)| -|React Native|[**onnxruntime-react-native**](https://www.npmjs.com/package/onnxruntime-react-native)||[View](../api/js-api.md)| -|Node.js|[**onnxruntime-node**](https://www.npmjs.com/package/onnxruntime-node)||[View](../api/js-api.md)| -|Web|[**onnxruntime-web**](https://www.npmjs.com/package/onnxruntime-web)||[View](../api/js-api.md)| +|Java|CPU: [**com.microsoft.onnxruntime:onnxruntime**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime)||[View](../api/java)| +||GPU - CUDA: [**com.microsoft.onnxruntime:onnxruntime_gpu**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime_gpu)||[View](../api/java)| +|Android|[**com.microsoft.onnxruntime:onnxruntime-mobile**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime-mobile) ||[View](../tutorials/mobile/initial-setup)| +|iOS (C/C++)|CocoaPods: **onnxruntime-mobile-c**||[View](../tutorials/mobile/initial-setup)| +|Objective-C|CocoaPods: **onnxruntime-mobile-objc**||[View](../tutorials/mobile/initial-setup)| +|React Native|[**onnxruntime-react-native**](https://www.npmjs.com/package/onnxruntime-react-native)||[View](../api/js)| +|Node.js|[**onnxruntime-node**](https://www.npmjs.com/package/onnxruntime-node)||[View](../api/js)| +|Web|[**onnxruntime-web**](https://www.npmjs.com/package/onnxruntime-web)||[View](../api/js)| diff --git a/docs/performance/quantization.md b/docs/performance/quantization.md index 4f1889c8be..d065381965 100644 --- a/docs/performance/quantization.md +++ b/docs/performance/quantization.md @@ -146,11 +146,12 @@ There are specific optimization for transformer-based models, like QAttention fo This [notebook](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/quantization/notebooks/bert) demonstrates the E2E process. ## Quantization on GPU -Hardware suppor is required to achieve better performance with quantization on GPUs. You need a device that support Tensor Core int8 computation, like T4, A100. Older hardware won't get benefit. + +Hardware support is required to achieve better performance with quantization on GPUs. You need a device that support Tensor Core int8 computation, like T4, A100. Older hardware won't get benefit. ORT leverage TRT EP for quantization on GPU now. Different with CPU EP, TRT takes in full precision model and calibration result for inputs. It decides how to quantize with their own logic. The overall procedure to leverage TRT EP quantization is: - Implement a [CalibrationDataReader](https://github.com/microsoft/onnxruntime/blob/07788e082ef2c78c3f4e72f49e7e7c3db6f09cb0/onnxruntime/python/tools/quantization/calibrate.py). -- Compute quantization parameter with calibration data set. Our quantization tool supports 2 calibration methods: MinMax and Entropy. Note: In order to include all tensors from the model for better calibration, please run symbolic_shape_infer.py first. Please refer to[here](https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html#sample) for detail. +- Compute quantization parameter with calibration data set. Our quantization tool supports 2 calibration methods: MinMax and Entropy. Note: In order to include all tensors from the model for better calibration, please run symbolic_shape_infer.py first. Please refer to[here](../execution-providers/TensorRT-ExecutionProvider.md#samples) for detail. - Save quantization parameter into a flatbuffer file - Load model and quantization parameter file and run with TRT EP. diff --git a/docs/performance/tune-performance.md b/docs/performance/tune-performance.md index 6030a6e038..0c0dd2e8cd 100644 --- a/docs/performance/tune-performance.md +++ b/docs/performance/tune-performance.md @@ -132,7 +132,7 @@ TensorRT and CUDA are separate execution providers for ONNX Runtime. On the same ### TensorRT/CUDA or DirectML? {: .no_toc } -DirectML is the hardware-accelerated DirectX 12 library for machine learning on Windows and supports all DirectX 12 capable devices (Nvidia, Intel, AMD). This means that if you are targeting Windows GPUs, using the DirectML Execution Provider is likely your best bet. This can be used with both the ONNX Runtime as well as [WinML APIs](../api/winrt-api.md). +DirectML is the hardware-accelerated DirectX 12 library for machine learning on Windows and supports all DirectX 12 capable devices (Nvidia, Intel, AMD). This means that if you are targeting Windows GPUs, using the DirectML Execution Provider is likely your best bet. This can be used with both the ONNX Runtime as well as [WinML APIs](https://docs.microsoft.com/en-us/windows/ai/windows-ml/api-reference). ## Tuning performance Below are some suggestions for things to try for various EPs for tuning performance. @@ -223,7 +223,7 @@ The answers below are troubleshooting suggestions based on common previous user- Here is a list of things to check through when assessing performance issues. * Are you using OpenMP? OpenMP will parallelize some of the code for potential performance improvements. This is not recommended for running on single threads. -* Have you enabled all [graph optimizations](../resources/graph-optimizations.md)? The official published packages do enable all by default, but when building from source, check that these are enabled in your build. +* Have you enabled all [graph optimizations](graph-optimizations.md)? The official published packages do enable all by default, but when building from source, check that these are enabled in your build. * Have you searched through prior filed [Github issues](https://github.com/microsoft/onnxruntime/issues) to see if your problem has been discussed previously? Please do this before filing new issues. * If using CUDA or TensorRT, do you have the right versions of the dependent libraries installed? diff --git a/docs/tutorials/OpenVINO_EP_samples/squeezenet_classification_cpp.md b/docs/tutorials/OpenVINO_EP_samples/squeezenet_classification_cpp.md index 4591815182..557b08e2af 100644 --- a/docs/tutorials/OpenVINO_EP_samples/squeezenet_classification_cpp.md +++ b/docs/tutorials/OpenVINO_EP_samples/squeezenet_classification_cpp.md @@ -26,11 +26,11 @@ The source code for this sample is available [here](https://github.com/microsoft ## Install ONNX Runtime for OpenVINO Execution Provider ## Build steps -[build instructions](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html#build) +[build instructions](../../build/eps.md#openvino) ## Reference Documentation -[Documentation](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html) +[Documentation](../../execution-providers/OpenVINO-ExecutionProvider.md) If you build it by yourself, you must append the "--build_shared_lib" flag to your build command. ``` @@ -45,7 +45,7 @@ If you build it by yourself, you must append the "--build_shared_lib" flag to yo 3. compile the sample -``` +```bash g++ -o run_squeezenet squeezenet_cpp_app.cpp -I ../../../include/onnxruntime/core/session/ -I /opt/intel/openvino_2021.4.582/opencv/include/ -I /opt/intel/openvino_2021.4.582/opencv/lib/ -L ./ -lonnxruntime_providers_openvino -lonnxruntime_providers_shared -lonnxruntime -L /opt/intel/openvino_2021.4.582/opencv/lib/ -lopencv_imgcodecs -lopencv_dnn -lopencv_core -lopencv_imgproc ``` @@ -57,24 +57,24 @@ Note: This build command is using the opencv location from OpenVINO 2021.4 Relea (using Intel OpenVINO-EP) -``` +```bash ./run_squeezenet --use_openvino ``` Example: -``` +```bash ./run_squeezenet --use_openvino squeezenet1.1-7.onnx demo.jpeg synset.txt (using Intel OpenVINO-EP) ``` (using Default CPU) -``` +```bash ./run_squeezenet --use_cpu ``` Example: -``` +```bash ./run_squeezenet --use_cpu squeezenet1.1-7.onnx demo.jpeg synset.txt (using Default CPU) ``` diff --git a/docs/tutorials/OpenVINO_EP_samples/tiny_yolo_v2_object_detection_python.md b/docs/tutorials/OpenVINO_EP_samples/tiny_yolo_v2_object_detection_python.md index 861f720341..d8cd6a9fb5 100644 --- a/docs/tutorials/OpenVINO_EP_samples/tiny_yolo_v2_object_detection_python.md +++ b/docs/tutorials/OpenVINO_EP_samples/tiny_yolo_v2_object_detection_python.md @@ -22,11 +22,11 @@ The source code for this sample is available [here](https://github.com/microsoft ## Install ONNX Runtime for OpenVINO Execution Provider ## Build steps -[build instructions](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html#build) +[build instructions](../../execution-providers/OpenVINO-ExecutionProvider.md#build) ## Reference Documentation -[Documentation](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html) +[Documentation](../../execution-providers/OpenVINO-ExecutionProvider.md) ## Requirements diff --git a/docs/tutorials/OpenVINO_EP_samples/yolov3_object_detection_csharp.md b/docs/tutorials/OpenVINO_EP_samples/yolov3_object_detection_csharp.md index 27df383eae..e0ef528c1c 100644 --- a/docs/tutorials/OpenVINO_EP_samples/yolov3_object_detection_csharp.md +++ b/docs/tutorials/OpenVINO_EP_samples/yolov3_object_detection_csharp.md @@ -26,14 +26,15 @@ The source code for this sample is available [here](https://github.com/microsoft ## Install ONNX Runtime for OpenVINO Execution Provider ## Build steps -[build instructions](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html#build) +[build instructions](../../build/eps.md#openvino) ## Reference Documentation -[Documentation](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html) +[Documentation](../../execution-providers/OpenVINO-ExecutionProvider.md) To build nuget packages of onnxruntime with openvino flavour -``` + +```bash ./build.sh --config Release --use_openvino MYRIAD_FP16 --build_shared_lib --build_nuget ``` diff --git a/docs/tutorials/export-pytorch-model.md b/docs/tutorials/export-pytorch-model.md index 49b06af85c..fe3d7b2337 100644 --- a/docs/tutorials/export-pytorch-model.md +++ b/docs/tutorials/export-pytorch-model.md @@ -55,7 +55,7 @@ For more on writing a symbolic function, see the [torch.onnx documentation](http ### Extend ONNX Runtime with Custom Ops The next step is to add an op schema and kernel implementation in ONNX Runtime. -See [custom operators](/docs/how-to/add-custom-op) for details. +See [custom operators](../reference/operators/add-custom-op.md) for details. ### Test End-to-End: Export and Run