Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XNNPACK code snippet rendering #19685

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/execution-providers/Xnnpack-ExecutionProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ See [here](../install/index.md#install-on-ios) for installation instructions.

Please see the [Build page](../build/eps.md#xnnpack) for instructions on building a package that includes the XNNPACK EP.

Support build for Android/iOS/Windows/Linux
You can build ONNX Runtime with the XNNPACK EP for Android, iOS, Windows, and Linux.

## Usage

Expand All @@ -41,7 +41,7 @@ The XNNPACK EP must be explicitly registered when creating the inference session
```C++
Ort::Env env = Ort::Env{ORT_LOGGING_LEVEL_ERROR, "Default"};
Ort::SessionOptions so;
so.AppendExecutionProvider("XNNPACK", {{"intra_op_num_threads", std::to_string(intra_op_num_threads)}});
so.AppendExecutionProvider("XNNPACK", {"intra_op_num_threads", std::to_string(intra_op_num_threads)});
Ort::Session session(env, model_path, so);
```

Expand All @@ -56,7 +56,7 @@ To minimize this, we recommend setting the following options:
```
2. Set the XNNPACK intra-op thread-pool size when registering the XNNPACK EP. The suggested value would be the number of physical cores on the device.
```C++
so.AppendExecutionProvider("XNNPACK", {{"intra_op_num_threads", std::to_string(intra_op_num_threads)}});
so.AppendExecutionProvider("XNNPACK", {"intra_op_num_threads", std::to_string(intra_op_num_threads)});
```
3. Set the ORT intra-op thread-pool size to 1:
```C++
Expand Down
Loading