mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
[doc] update a part of the documents for ORT JavaScript (#7935)
* update api-basics.md * update install.md * add placeholder for "build for web" * update js api * add more sections in js-api.md * update "coming soon" for how-to-build-web * Update "Web" -> "web" in title of web.md * Update install.md
This commit is contained in:
parent
68b1ba0e24
commit
25b2aa6d04
8 changed files with 57 additions and 44 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Build for Android/iOS
|
||||
parent: Build ORT
|
||||
nav_order: 4
|
||||
nav_order: 5
|
||||
grand_parent: How to
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ GCC 4.x and below are not supported.
|
|||
| OS/Compiler | Supports VC | Supports GCC | Supports Clang |
|
||||
|-------------|:------------:|:----------------:|:----------------:|
|
||||
|Windows 10 | YES | Not tested | Not tested |
|
||||
|Linux | NO | YES(gcc>=8) | Not tested |
|
||||
|Linux | NO | YES(gcc>=8) | Not tested |
|
||||
|macOS | NO | Not tested | YES (Minimum version required not ascertained)|
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: Build with reduced size
|
||||
grand_parent: How to
|
||||
parent: Build ORT
|
||||
nav_order: 5
|
||||
nav_order: 6
|
||||
---
|
||||
|
||||
# Build ORT with reduced size
|
||||
|
|
|
|||
10
docs/how-to/build/web.md
Normal file
10
docs/how-to/build/web.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: Build for web
|
||||
parent: Build ORT
|
||||
nav_order: 4
|
||||
grand_parent: How to
|
||||
---
|
||||
|
||||
# Build ONNX Runtime for Web
|
||||
|
||||
*[COMING SOON]*
|
||||
|
|
@ -39,7 +39,7 @@ The following build variants are available as officially supported packages. Oth
|
|||
|Android|[**com.microsoft.onnxruntime:onnxruntime-mobile**](https://search.maven.org/artifact/com.microsoft.onnxruntime/onnxruntime-mobile) ||
|
||||
|iOS (C/C++)|CocoaPods: **onnxruntime-mobile-c**||
|
||||
|Objective-C|CocoaPods: **onnxruntime-mobile-objc**||
|
||||
|Node.js|[**onnxruntime-node**](https://www.npmjs.com/package/onnxruntime)|
|
||||
|Node.js|[**onnxruntime-node**](https://www.npmjs.com/package/onnxruntime-node)||
|
||||
|Web|[**onnxruntime-web**](https://www.npmjs.com/package/onnxruntime-web)||
|
||||
|
||||
|
||||
|
|
@ -63,4 +63,4 @@ by running `locale-gen en_US.UTF-8` and `update-locale LANG=en_US.UTF-8`
|
|||
|---|---|---|
|
||||
|PyTorch (CUDA 10.2)|[**onnxruntime-training**](https://pypi.org/project/onnxruntime-training)|[onnxruntime_nightly_cu102](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_cu102.html)|
|
||||
|PyTorch (CUDA 11.1)|[**onnxruntime_stable_cu111**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_cu111.html)|[onnxruntime_nightly_cu111](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_cu111.html)|
|
||||
|[*Preview*] PyTorch (ROCm 4.2)|[**onnxruntime_stable_rocm42**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_rocm42.html)|[onnxruntime_nightly_rocm42](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_rocm42.html)|
|
||||
|[*Preview*] PyTorch (ROCm 4.2)|[**onnxruntime_stable_rocm42**](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_stable_rocm42.html)|[onnxruntime_nightly_rocm42](https://onnxruntimepackages.z14.web.core.windows.net/onnxruntime_nightly_rocm42.html)|
|
||||
|
|
|
|||
40
docs/reference/api/js-api.md
Normal file
40
docs/reference/api/js-api.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
title: JavaScript API
|
||||
parent: API docs
|
||||
grand_parent: Reference
|
||||
---
|
||||
|
||||
# ONNX Runtime JavaScript API
|
||||
{: .no_toc }
|
||||
|
||||
ONNX Runtime JavaScript API is the unified interface used by [ONNX Runtime Node.js binding](https://github.com/microsoft/onnxruntime/tree/master/js/node), [ONNX Runtime Web](https://github.com/microsoft/onnxruntime/tree/master/js/web) and [ONNX Runtime for React Native](https://github.com/microsoft/onnxruntime/tree/master/js/react_native).
|
||||
|
||||
## Contents
|
||||
{: .no_toc }
|
||||
|
||||
* TOC placeholder
|
||||
{:toc}
|
||||
|
||||
|
||||
## Supported Versions
|
||||
|
||||
- ONNX Runtime Node.js binding: Node.js v12.x+ or Electron v5.x+
|
||||
- ONNX Runtime Web: mainstream modern browsers on Windows, macOS, Android and iOS.
|
||||
- ONNX Runtime for React Native: TBD
|
||||
|
||||
## Builds
|
||||
|
||||
Builds are published to **npm** and can be installed using `npm install`
|
||||
|
||||
| Package | Artifact | Description | Supported Platforms |
|
||||
|---------|-----------|-------------|---------------------|
|
||||
|Node.js binding|[onnxruntime-node](https://www.npmjs.com/package/onnxruntime-node)|CPU (Release)| Windows x64 CPU NAPI_v3, Linux x64 CPU NAPI_v3, MacOS x64 CPU NAPI_v3|
|
||||
|Web|[onnxruntime-web](https://www.npmjs.com/package/onnxruntime-web)||Browsers (wasm, webgl), Node.js (wasm)|
|
||||
|React Native|[onnxruntime-react-native](https://www.npmjs.com/package/onnxruntime-react-native)|||
|
||||
|
||||
For Node.js binding, to use on platforms without pre-built binaries, you can [build Node.js binding from source](../../how-to/build/inferencing.md#apis-and-language-bindings) and consume using `npm install <onnxruntime_repo_root>/js/node/`.
|
||||
|
||||
## API Reference
|
||||
See Typescript declarations for [Inference Session](https://github.com/microsoft/onnxruntime/blob/master/js/common/lib/inference-session.ts), [Tensor](https://github.com/microsoft/onnxruntime/blob/master/js/common/lib/tensor.ts) and [Environment Flags](https://github.com/microsoft/onnxruntime/blob/master/js/common/lib/env.ts) for reference.
|
||||
|
||||
See also [ONNX Runtime JavaScript examples](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js).
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: Node.js API
|
||||
parent: API docs
|
||||
grand_parent: Reference
|
||||
---
|
||||
|
||||
# ONNX Runtime Node.js API
|
||||
{: .no_toc }
|
||||
|
||||
ONNX Runtime Node.js binding enables Node.js applications to run ONNX model inference.
|
||||
|
||||
## Contents
|
||||
{: .no_toc }
|
||||
|
||||
* TOC placeholder
|
||||
{:toc}
|
||||
|
||||
## Supported Versions
|
||||
Node.js v12.x+ or Electron v5.x+
|
||||
|
||||
## API Reference
|
||||
See [Typescript declarations](https://github.com/microsoft/onnxruntime/blob/master/nodejs/lib/inference-session.ts) and refer to [samples](#samples) for reference.
|
||||
|
||||
## Builds
|
||||
Builds are published to **npm** and can be installed using `npm install`
|
||||
|
||||
| Artifact | Description | Supported Platforms |
|
||||
|----------- |-------------|---------------------|
|
||||
|[onnxruntime](https://www.npmjs.com/package/onnxruntime)|CPU (Release)| Windows x64 CPU NAPI_v3, Linux x64 CPU NAPI_v3, MacOS x64 CPU NAPI_v3|
|
||||
|onnxruntime@dev| CPU (Dev)|Windows x64 CPU NAPI_v3, Linux x64 CPU NAPI_v3, MacOS x64 CPU NAPI_v3|
|
||||
|
||||
To use on platforms without pre-built binaries, you can [build Node.js binding from source]((../../how-to/build.md#apis-and-language-bindings)) and consume using `npm install <onnxruntime_repo_root>/nodejs/`.
|
||||
|
||||
## Samples
|
||||
See [Tutorials: Basics - NodeJS](../../tutorials/inferencing/api-basics.md#nodejs)
|
||||
|
||||
|
||||
|
|
@ -36,5 +36,5 @@ These tutorials demonstrate basic inferencing with ONNX Runtime with each langua
|
|||
## Java
|
||||
* [Number recognition (MNIST)](../tutorials/mnist_java.html)
|
||||
|
||||
## Node.js
|
||||
* [Basic usage](https://github.com/microsoft/onnxruntime/tree/master/samples/nodejs)
|
||||
## JavaScript
|
||||
* [ONNX Runtime JavaScript examples](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js)
|
||||
|
|
|
|||
Loading…
Reference in a new issue