mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-15 18:23:41 +00:00
1265 lines
54 KiB
HTML
1265 lines
54 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>OrtSession.SessionOptions (onnxruntime 1.14.0 API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../jquery/jquery-ui.min.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="../../script.js"></script>
|
|
<script type="text/javascript" src="../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../jquery/jquery-3.6.0.min.js"></script>
|
|
<script type="text/javascript" src="../../jquery/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="OrtSession.SessionOptions (onnxruntime 1.14.0 API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../";
|
|
var useModuleDirectories = true;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../index-all.html">Index</a></li>
|
|
<li><a href="../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">ai.onnxruntime</a></div>
|
|
<h2 title="Class OrtSession.SessionOptions" class="title">Class OrtSession.SessionOptions</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>ai.onnxruntime.OrtSession.SessionOptions</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><code>java.lang.AutoCloseable</code></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>Enclosing class:</dt>
|
|
<dd><a href="OrtSession.html" title="class in ai.onnxruntime">OrtSession</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public static class <span class="typeNameLabel">OrtSession.SessionOptions</span>
|
|
extends java.lang.Object
|
|
implements java.lang.AutoCloseable</pre>
|
|
<div class="block">Represents the options used to construct this session.
|
|
|
|
<p>Used to set the number of threads, optimisation level, computation backend and other
|
|
options.
|
|
|
|
<p>Modifying this after the session has been constructed will have no effect.
|
|
|
|
<p>The SessionOptions object must not be closed until all sessions which use it are closed, as
|
|
otherwise it could release resources that are in use.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Class</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="OrtSession.SessionOptions.ExecutionMode.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.ExecutionMode</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The execution mode to use.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="OrtSession.SessionOptions.OptLevel.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.OptLevel</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">The optimisation level to use.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">SessionOptions</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Create an empty session options.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addACL(boolean)">addACL</a></span>​(boolean useArena)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds the ARM Compute Library as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addArmNN(boolean)">addArmNN</a></span>​(boolean useArena)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds the ARM Neural Net library as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addConfigEntry(java.lang.String,java.lang.String)">addConfigEntry</a></span>​(java.lang.String configKey,
|
|
java.lang.String configValue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds a single session configuration entry as a pair of strings.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCoreML()">addCoreML</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Apple's CoreML as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCoreML(java.util.EnumSet)">addCoreML</a></span>​(java.util.EnumSet<<a href="providers/CoreMLFlags.html" title="enum in ai.onnxruntime.providers">CoreMLFlags</a>> flags)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Apple's CoreML as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCPU(boolean)">addCPU</a></span>​(boolean useArena)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds the CPU as an execution backend, using the arena allocator if desired.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCUDA()">addCUDA</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add CUDA as an execution backend, using device 0.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCUDA(int)">addCUDA</a></span>​(int deviceNum)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add CUDA as an execution backend, using the specified CUDA device id.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCUDA(ai.onnxruntime.providers.OrtCUDAProviderOptions)">addCUDA</a></span>​(<a href="providers/OrtCUDAProviderOptions.html" title="class in ai.onnxruntime.providers">OrtCUDAProviderOptions</a> cudaOpts)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds CUDA as an execution backend, using the specified CUDA options.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDirectML(int)">addDirectML</a></span>​(int deviceId)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds DirectML as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDnnl(boolean)">addDnnl</a></span>​(boolean useArena)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Intel's Deep Neural Network Library as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addNnapi()">addNnapi</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Android's NNAPI as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addNnapi(java.util.EnumSet)">addNnapi</a></span>​(java.util.EnumSet<<a href="providers/NNAPIFlags.html" title="enum in ai.onnxruntime.providers">NNAPIFlags</a>> flags)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Android's NNAPI as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addOpenVINO(java.lang.String)">addOpenVINO</a></span>​(java.lang.String deviceId)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds OpenVINO as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addROCM()">addROCM</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add ROCM as an execution backend, using device 0.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addROCM(int)">addROCM</a></span>​(int deviceNum)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add ROCM as an execution backend, using the specified ROCM device id.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addTensorrt(int)">addTensorrt</a></span>​(int deviceNum)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Nvidia's TensorRT as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addTensorrt(ai.onnxruntime.providers.OrtTensorRTProviderOptions)">addTensorrt</a></span>​(<a href="providers/OrtTensorRTProviderOptions.html" title="class in ai.onnxruntime.providers">OrtTensorRTProviderOptions</a> tensorRTOpts)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Nvidia's TensorRT as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addTvm(java.lang.String)">addTvm</a></span>​(java.lang.String settings)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds TVM as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addXnnpack(java.util.Map)">addXnnpack</a></span>​(java.util.Map<java.lang.String,​java.lang.String> providerOptions)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds Xnnpack as an execution backend.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Closes the session options, releasing any memory acquired.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disablePerSessionThreads()">disablePerSessionThreads</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Disables the per session thread pools.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disableProfiling()">disableProfiling</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Disables profiling in sessions using this SessionOptions.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enableProfiling(java.lang.String)">enableProfiling</a></span>​(java.lang.String filePath)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enables profiling in sessions using this SessionOptions.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>java.util.Map<java.lang.String,​java.lang.String></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConfigEntries()">getConfigEntries</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns an unmodifiable view of the map contains all session configuration entries.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#registerCustomOpLibrary(java.lang.String)">registerCustomOpLibrary</a></span>​(java.lang.String path)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Registers a library of custom ops for use with <a href="OrtSession.html" title="class in ai.onnxruntime"><code>OrtSession</code></a>s using this SessionOptions.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#registerCustomOpsUsingFunction(java.lang.String)">registerCustomOpsUsingFunction</a></span>​(java.lang.String registrationFuncName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Registers custom ops for use with <a href="OrtSession.html" title="class in ai.onnxruntime"><code>OrtSession</code></a>s using this SessionOptions by calling
|
|
the specified native function name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCPUArenaAllocator(boolean)">setCPUArenaAllocator</a></span>​(boolean useArena)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the CPU to use an arena memory allocator.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setExecutionMode(ai.onnxruntime.OrtSession.SessionOptions.ExecutionMode)">setExecutionMode</a></span>​(<a href="OrtSession.SessionOptions.ExecutionMode.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.ExecutionMode</a> mode)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the execution mode of this options object, overriding the old setting.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setInterOpNumThreads(int)">setInterOpNumThreads</a></span>​(int numThreads)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the size of the CPU thread pool used for executing multiple request concurrently, if
|
|
executing on a CPU.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIntraOpNumThreads(int)">setIntraOpNumThreads</a></span>​(int numThreads)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the size of the CPU thread pool used for executing a single graph, if executing on a
|
|
CPU.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLoggerId(java.lang.String)">setLoggerId</a></span>​(java.lang.String loggerId)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the logger id to use.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMemoryPatternOptimization(boolean)">setMemoryPatternOptimization</a></span>​(boolean memoryPatternOptimization)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Turns on memory pattern optimizations, where memory is preallocated if all shapes are known.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOptimizationLevel(ai.onnxruntime.OrtSession.SessionOptions.OptLevel)">setOptimizationLevel</a></span>​(<a href="OrtSession.SessionOptions.OptLevel.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.OptLevel</a> level)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the optimization level of this options object, overriding the old setting.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOptimizedModelFilePath(java.lang.String)">setOptimizedModelFilePath</a></span>​(java.lang.String outputPath)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the output path for the optimized model.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionLogLevel(ai.onnxruntime.OrtLoggingLevel)">setSessionLogLevel</a></span>​(<a href="OrtLoggingLevel.html" title="enum in ai.onnxruntime">OrtLoggingLevel</a> logLevel)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the Session's logging level.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionLogVerbosityLevel(int)">setSessionLogVerbosityLevel</a></span>​(int logLevel)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the Session's logging verbosity level.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSymbolicDimensionValue(java.lang.String,long)">setSymbolicDimensionValue</a></span>​(java.lang.String dimensionName,
|
|
long dimensionValue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the value of a symbolic dimension.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a id="<init>()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>SessionOptions</h4>
|
|
<pre>public SessionOptions()</pre>
|
|
<div class="block">Create an empty session options.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="close()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>close</h4>
|
|
<pre class="methodSignature">public void close()</pre>
|
|
<div class="block">Closes the session options, releasing any memory acquired.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setExecutionMode(ai.onnxruntime.OrtSession.SessionOptions.ExecutionMode)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setExecutionMode</h4>
|
|
<pre class="methodSignature">public void setExecutionMode​(<a href="OrtSession.SessionOptions.ExecutionMode.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.ExecutionMode</a> mode)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the execution mode of this options object, overriding the old setting.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mode</code> - The execution mode to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setOptimizationLevel(ai.onnxruntime.OrtSession.SessionOptions.OptLevel)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setOptimizationLevel</h4>
|
|
<pre class="methodSignature">public void setOptimizationLevel​(<a href="OrtSession.SessionOptions.OptLevel.html" title="enum in ai.onnxruntime">OrtSession.SessionOptions.OptLevel</a> level)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the optimization level of this options object, overriding the old setting.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>level</code> - The optimization level to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setInterOpNumThreads(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setInterOpNumThreads</h4>
|
|
<pre class="methodSignature">public void setInterOpNumThreads​(int numThreads)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the size of the CPU thread pool used for executing multiple request concurrently, if
|
|
executing on a CPU.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numThreads</code> - The number of threads to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setIntraOpNumThreads(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setIntraOpNumThreads</h4>
|
|
<pre class="methodSignature">public void setIntraOpNumThreads​(int numThreads)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the size of the CPU thread pool used for executing a single graph, if executing on a
|
|
CPU.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numThreads</code> - The number of threads to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setOptimizedModelFilePath(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setOptimizedModelFilePath</h4>
|
|
<pre class="methodSignature">public void setOptimizedModelFilePath​(java.lang.String outputPath)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the output path for the optimized model.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>outputPath</code> - The output path to write the model to.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setLoggerId(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setLoggerId</h4>
|
|
<pre class="methodSignature">public void setLoggerId​(java.lang.String loggerId)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the logger id to use.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>loggerId</code> - The logger id string.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="enableProfiling(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enableProfiling</h4>
|
|
<pre class="methodSignature">public void enableProfiling​(java.lang.String filePath)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Enables profiling in sessions using this SessionOptions.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>filePath</code> - The file to write profile information to.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="disableProfiling()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disableProfiling</h4>
|
|
<pre class="methodSignature">public void disableProfiling()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Disables profiling in sessions using this SessionOptions.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setMemoryPatternOptimization(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMemoryPatternOptimization</h4>
|
|
<pre class="methodSignature">public void setMemoryPatternOptimization​(boolean memoryPatternOptimization)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Turns on memory pattern optimizations, where memory is preallocated if all shapes are known.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>memoryPatternOptimization</code> - If true enable memory pattern optimizations.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setCPUArenaAllocator(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCPUArenaAllocator</h4>
|
|
<pre class="methodSignature">public void setCPUArenaAllocator​(boolean useArena)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the CPU to use an arena memory allocator.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>useArena</code> - If true use an arena memory allocator for the CPU execution provider.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setSessionLogLevel(ai.onnxruntime.OrtLoggingLevel)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSessionLogLevel</h4>
|
|
<pre class="methodSignature">public void setSessionLogLevel​(<a href="OrtLoggingLevel.html" title="enum in ai.onnxruntime">OrtLoggingLevel</a> logLevel)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the Session's logging level.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>logLevel</code> - The log level to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setSessionLogVerbosityLevel(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSessionLogVerbosityLevel</h4>
|
|
<pre class="methodSignature">public void setSessionLogVerbosityLevel​(int logLevel)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the Session's logging verbosity level.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>logLevel</code> - The logging verbosity to use.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="registerCustomOpLibrary(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>registerCustomOpLibrary</h4>
|
|
<pre class="methodSignature">public void registerCustomOpLibrary​(java.lang.String path)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Registers a library of custom ops for use with <a href="OrtSession.html" title="class in ai.onnxruntime"><code>OrtSession</code></a>s using this SessionOptions.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>path</code> - The path to the library on disk.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error loading the library.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="registerCustomOpsUsingFunction(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>registerCustomOpsUsingFunction</h4>
|
|
<pre class="methodSignature">public void registerCustomOpsUsingFunction​(java.lang.String registrationFuncName)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Registers custom ops for use with <a href="OrtSession.html" title="class in ai.onnxruntime"><code>OrtSession</code></a>s using this SessionOptions by calling
|
|
the specified native function name. The custom ops library must either be linked against, or
|
|
have previously been loaded by the user.
|
|
|
|
<p>The registration function must have the signature:
|
|
|
|
<p> OrtStatus* (*fn)(OrtSessionOptions* options, const OrtApiBase* api);
|
|
|
|
<p>See https://onnxruntime.ai/docs/reference/operators/add-custom-op.html for more
|
|
information on custom ops. See
|
|
https://github.com/microsoft/onnxruntime/blob/342a5bf2b756d1a1fc6fdc582cfeac15182632fe/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc#L115
|
|
for an example of a custom op library registration function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>registrationFuncName</code> - The name of the registration function to call.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error finding or calling the registration function.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setSymbolicDimensionValue(java.lang.String,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSymbolicDimensionValue</h4>
|
|
<pre class="methodSignature">public void setSymbolicDimensionValue​(java.lang.String dimensionName,
|
|
long dimensionValue)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Sets the value of a symbolic dimension. Fixed dimension computations may have more
|
|
optimizations applied to them.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>dimensionName</code> - The name of the symbolic dimension.</dd>
|
|
<dd><code>dimensionValue</code> - The value to set that dimension to.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="disablePerSessionThreads()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disablePerSessionThreads</h4>
|
|
<pre class="methodSignature">public void disablePerSessionThreads()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Disables the per session thread pools. Must be used in conjunction with an environment
|
|
containing global thread pools.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addConfigEntry(java.lang.String,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addConfigEntry</h4>
|
|
<pre class="methodSignature">public void addConfigEntry​(java.lang.String configKey,
|
|
java.lang.String configValue)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds a single session configuration entry as a pair of strings.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>configKey</code> - The config key string.</dd>
|
|
<dd><code>configValue</code> - The config value string.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getConfigEntries()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getConfigEntries</h4>
|
|
<pre class="methodSignature">public java.util.Map<java.lang.String,​java.lang.String> getConfigEntries()</pre>
|
|
<div class="block">Returns an unmodifiable view of the map contains all session configuration entries.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>All session configuration entries</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCUDA()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCUDA</h4>
|
|
<pre class="methodSignature">public void addCUDA()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Add CUDA as an execution backend, using device 0.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCUDA(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCUDA</h4>
|
|
<pre class="methodSignature">public void addCUDA​(int deviceNum)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Add CUDA as an execution backend, using the specified CUDA device id.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>deviceNum</code> - The CUDA device id.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCUDA(ai.onnxruntime.providers.OrtCUDAProviderOptions)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCUDA</h4>
|
|
<pre class="methodSignature">public void addCUDA​(<a href="providers/OrtCUDAProviderOptions.html" title="class in ai.onnxruntime.providers">OrtCUDAProviderOptions</a> cudaOpts)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds CUDA as an execution backend, using the specified CUDA options.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>cudaOpts</code> - The CUDA execution provider options.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in the native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addROCM()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addROCM</h4>
|
|
<pre class="methodSignature">public void addROCM()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Add ROCM as an execution backend, using device 0.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addROCM(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addROCM</h4>
|
|
<pre class="methodSignature">public void addROCM​(int deviceNum)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Add ROCM as an execution backend, using the specified ROCM device id.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>deviceNum</code> - The ROCM device id.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCPU(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCPU</h4>
|
|
<pre class="methodSignature">public void addCPU​(boolean useArena)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds the CPU as an execution backend, using the arena allocator if desired.
|
|
|
|
<p>By default this backend is used, but if other backends are requested, it should be
|
|
requested last.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>useArena</code> - If true use the arena memory allocator.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addDnnl(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addDnnl</h4>
|
|
<pre class="methodSignature">public void addDnnl​(boolean useArena)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Intel's Deep Neural Network Library as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>useArena</code> - If true use the arena memory allocator.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addOpenVINO(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addOpenVINO</h4>
|
|
<pre class="methodSignature">public void addOpenVINO​(java.lang.String deviceId)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds OpenVINO as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>deviceId</code> - The id of the OpenVINO execution device.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addTensorrt(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addTensorrt</h4>
|
|
<pre class="methodSignature">public void addTensorrt​(int deviceNum)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Nvidia's TensorRT as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>deviceNum</code> - The id of the CUDA device.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addTensorrt(ai.onnxruntime.providers.OrtTensorRTProviderOptions)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addTensorrt</h4>
|
|
<pre class="methodSignature">public void addTensorrt​(<a href="providers/OrtTensorRTProviderOptions.html" title="class in ai.onnxruntime.providers">OrtTensorRTProviderOptions</a> tensorRTOpts)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Nvidia's TensorRT as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>tensorRTOpts</code> - The configuration parameters for TensorRT.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addNnapi()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addNnapi</h4>
|
|
<pre class="methodSignature">public void addNnapi()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Android's NNAPI as an execution backend. Uses the default empty flag.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addNnapi(java.util.EnumSet)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addNnapi</h4>
|
|
<pre class="methodSignature">public void addNnapi​(java.util.EnumSet<<a href="providers/NNAPIFlags.html" title="enum in ai.onnxruntime.providers">NNAPIFlags</a>> flags)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Android's NNAPI as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>flags</code> - The flags which control the NNAPI configuration.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addTvm(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addTvm</h4>
|
|
<pre class="methodSignature">public void addTvm​(java.lang.String settings)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds TVM as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>settings</code> - See the documentation for valid settings strings.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addDirectML(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addDirectML</h4>
|
|
<pre class="methodSignature">public void addDirectML​(int deviceId)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds DirectML as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>deviceId</code> - The id of the DirectML device.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addACL(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addACL</h4>
|
|
<pre class="methodSignature">public void addACL​(boolean useArena)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds the ARM Compute Library as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>useArena</code> - If true use the arena memory allocator.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addArmNN(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addArmNN</h4>
|
|
<pre class="methodSignature">public void addArmNN​(boolean useArena)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds the ARM Neural Net library as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>useArena</code> - If true use the arena memory allocator.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCoreML()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCoreML</h4>
|
|
<pre class="methodSignature">public void addCoreML()
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Apple's CoreML as an execution backend. Uses the default empty flag.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addCoreML(java.util.EnumSet)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addCoreML</h4>
|
|
<pre class="methodSignature">public void addCoreML​(java.util.EnumSet<<a href="providers/CoreMLFlags.html" title="enum in ai.onnxruntime.providers">CoreMLFlags</a>> flags)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Apple's CoreML as an execution backend.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>flags</code> - The flags which control the CoreML configuration.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addXnnpack(java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>addXnnpack</h4>
|
|
<pre class="methodSignature">public void addXnnpack​(java.util.Map<java.lang.String,​java.lang.String> providerOptions)
|
|
throws <a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></pre>
|
|
<div class="block">Adds Xnnpack as an execution backend. Needs to list all options here if a new option
|
|
supported. current supported options: {}</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>providerOptions</code> - options pass to XNNPACK EP for initialization.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="OrtException.html" title="class in ai.onnxruntime">OrtException</a></code> - If there was an error in native code.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../index-all.html">Index</a></li>
|
|
<li><a href="../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|