import{s as oe,o as re}from"../chunks/scheduler.5f3e6389.js";import{S as me,i as ce,e as i,s as n,c as o,h as ue,a as p,d as l,b as a,f as ie,g as r,j as h,k as pe,l as de,m as s,n as m,t as c,o as u,p as d,q as he,r as Me}from"../chunks/index.373ab25c.js";import{T as fe}from"../chunks/Tip.3e202241.js";import{C as ye,H as y}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.315d5a08.js";import{C as T}from"../chunks/CodeBlock.fbe06bf8.js";function be(st){let M;return{c(){M=he("To avoid conflicts between `onnxruntime` and `onnxruntime-rocm`, make sure the package `onnxruntime` is not installed by running `pip uninstall onnxruntime` prior to installing `onnxruntime-rocm`.")},l(f){M=Me(f,"To avoid conflicts between `onnxruntime` and `onnxruntime-rocm`, make sure the package `onnxruntime` is not installed by running `pip uninstall onnxruntime` prior to installing `onnxruntime-rocm`.")},m(f,g){s(f,M,g)},d(f){f&&l(M)}}}function Te(st){let M,f,g,nt,J,at,w,it,U,St="By default, ONNX Runtime runs inference on CPU devices. However, it is possible to place supported operations on an AMD Instinct GPU, while leaving any unsupported ones on CPU. In most cases, this allows costly operations to be placed on GPU and significantly accelerate inference.",pt,j,Pt='Our testing involved AMD Instinct GPUs, and for specific GPU compatibility, please refer to the official support list of GPUs available <a href="https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html" rel="nofollow">here</a>.',ot,$,Qt="This guide will show you how to run inference on the <code>ROCMExecutionProvider</code> execution provider that ONNX Runtime supports for AMD GPUs.",rt,R,mt,v,zt="The following setup installs the ONNX Runtime support with ROCM Execution Provider with ROCm 6.0.",ct,C,ut,x,Ft='Refer to the <a href="https://rocm.docs.amd.com/en/latest/deploy/linux/index.html" rel="nofollow">ROCm installation guide</a> to install ROCm 6.0.',dt,Z,ht,B,Lt='Please use the provided <a href="https://github.com/huggingface/optimum-amd/blob/main/docker/onnx-runtime-amd-gpu/Dockerfile" rel="nofollow">Dockerfile</a> example or do a local installation from source since pip wheels are currently unavailable.',Mt,W,Ot="<strong>Docker Installation:</strong>",ft,G,yt,V,Yt="<strong>Local Installation Steps:</strong>",bt,I,Tt,N,qt='Optimum ONNX Runtime integration relies on some functionalities of Transformers that require PyTorch. For now, we recommend to use Pytorch compiled against RoCm 6.0, that can be installed following <a href="https://pytorch.org/get-started/locally/" rel="nofollow">PyTorch installation guide</a>:',gt,k,Jt,X,wt,_,Ut,H,At="Note: The instructions build ORT for <code>MI210/MI250/MI300</code> gpus. To support other architectures, please update the <code>CMAKE_HIP_ARCHITECTURES</code> in the build command.",jt,b,$t,E,Rt,S,Dt="Before going further, run the following sample code to check whether the install was successful:",vt,P,Ct,Q,Kt="In case this code runs gracefully, congratulations, the installation is successful! If you encounter the following error or similar,",xt,z,Zt,F,te="then something is wrong with the ROCM or ONNX Runtime installation.",Bt,L,Wt,O,ee="For ORT models, the use is straightforward. Simply specify the <code>provider</code> argument in the <code>ORTModel.from_pretrained()</code> method. Here’s an example:",Gt,Y,Vt,q,le=`The model can then be used with the common 🤗 Transformers API for inference and evaluation, such as <a href="https://huggingface.co/docs/optimum/onnxruntime/usage_guides/pipelines" rel="nofollow">pipelines</a>.
When using Transformers pipeline, note that the <code>device</code> argument should be set to perform pre- and post-processing on GPU, following the example below:`,It,A,Nt,D,se="Additionally, you can pass the session option <code>log_severity_level = 0</code> (verbose), to check whether all nodes are indeed placed on the ROCM execution provider or not:",kt,K,Xt,tt,_t,et,ne="Coming soon!",Ht,lt,Et;return J=new ye({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new y({props:{title:"Accelerated inference on AMD GPUs supported by ROCm",local:"accelerated-inference-on-amd-gpus-supported-by-rocm",headingTag:"h1"}}),R=new y({props:{title:"Installation",local:"installation",headingTag:"h2"}}),C=new y({props:{title:"1 ROCm Installation",local:"1-rocm-installation",headingTag:"h4"}}),Z=new y({props:{title:"2 Installing onnxruntime-rocm",local:"2-installing-onnxruntime-rocm",headingTag:"h4"}}),G=new T({props:{code:"ZG9ja2VyJTIwYnVpbGQlMjAtZiUyMERvY2tlcmZpbGUlMjAtdCUyMG9ydCUyRnJvY20lMjAu",highlighted:"docker build -f Dockerfile -t ort/rocm .",wrap:!1}}),I=new y({props:{title:"2.1 PyTorch with ROCm Support",local:"21-pytorch-with-rocm-support",headingTag:"h5"}}),k=new T({props:{code:"cGlwMyUyMGluc3RhbGwlMjAtLXByZSUyMHRvcmNoJTIwdG9yY2h2aXNpb24lMjB0b3JjaGF1ZGlvJTIwLS1pbmRleC11cmwlMjBodHRwcyUzQSUyRiUyRmRvd25sb2FkLnB5dG9yY2gub3JnJTJGd2hsJTJGcm9jbTYuMCUwQSUyMyUyMFVzZSUyMCdyb2NtJTJGcHl0b3JjaCUzQXJvY202LjAuMl91YnVudHUyMi4wNF9weTMuMTBfcHl0b3JjaF8yLjEuMiclMjBhcyUyMHRoZSUyMHByZWZlcnJlZCUyMGJhc2UlMjBpbWFnZSUyMHdoZW4lMjB1c2luZyUyMERvY2tlciUyMGZvciUyMFB5VG9yY2glMjBpbnN0YWxsYXRpb24u",highlighted:`pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0
<span class="hljs-comment"># Use &#x27;rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2&#x27; as the preferred base image when using Docker for PyTorch installation.</span>`,wrap:!1}}),X=new y({props:{title:"2.2 ONNX Runtime with ROCm Execution Provider",local:"22-onnx-runtime-with-rocm-execution-provider",headingTag:"h5"}}),_=new T({props:{code:"JTIzJTIwcHJlLXJlcXVpc2l0ZXMlMEFwaXAlMjBpbnN0YWxsJTIwLVUlMjBwaXAlMEFwaXAlMjBpbnN0YWxsJTIwY21ha2UlMjBvbm54JTBBY3VybCUyMC0tcHJvdG8lMjAnJTNEaHR0cHMnJTIwLS10bHN2MS4yJTIwLXNTZiUyMGh0dHBzJTNBJTJGJTJGc2gucnVzdHVwLnJzJTIwJTdDJTIwc2glMEElMEElMjMlMjBJbnN0YWxsJTIwT05OWFJ1bnRpbWUlMjBmcm9tJTIwc291cmNlJTBBZ2l0JTIwY2xvbmUlMjAtLXNpbmdsZS1icmFuY2glMjAtLWJyYW5jaCUyMG1haW4lMjAtLXJlY3Vyc2l2ZSUyMGh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRk1pY3Jvc29mdCUyRm9ubnhydW50aW1lJTIwb25ueHJ1bnRpbWUlMEFjZCUyMG9ubnhydW50aW1lJTBBJTBBLiUyRmJ1aWxkLnNoJTIwLS1jb25maWclMjBSZWxlYXNlJTIwLS1idWlsZF93aGVlbCUyMC0tYWxsb3dfcnVubmluZ19hc19yb290JTIwLS11cGRhdGUlMjAtLWJ1aWxkJTIwLS1wYXJhbGxlbCUyMC0tY21ha2VfZXh0cmFfZGVmaW5lcyUyMENNQUtFX0hJUF9BUkNISVRFQ1RVUkVTJTNEZ2Z4OTBhJTJDZ2Z4OTQyJTIwT05OWFJVTlRJTUVfVkVSU0lPTiUzRCUyNChjYXQlMjAuJTJGVkVSU0lPTl9OVU1CRVIpJTIwLS11c2Vfcm9jbSUyMC0tcm9jbV9ob21lJTNEJTJGb3B0JTJGcm9jbSUwQXBpcCUyMGluc3RhbGwlMjBidWlsZCUyRkxpbnV4JTJGUmVsZWFzZSUyRmRpc3QlMkYq",highlighted:`<span class="hljs-comment"># pre-requisites</span>
pip install -U pip
pip install cmake onnx
curl --proto <span class="hljs-string">&#x27;=https&#x27;</span> --tlsv1.2 -sSf https://sh.rustup.rs | sh

<span class="hljs-comment"># Install ONNXRuntime from source</span>
git <span class="hljs-built_in">clone</span> --single-branch --branch main --recursive https://github.com/Microsoft/onnxruntime onnxruntime
<span class="hljs-built_in">cd</span> onnxruntime

./build.sh --config Release --build_wheel --allow_running_as_root --update --build --parallel --cmake_extra_defines CMAKE_HIP_ARCHITECTURES=gfx90a,gfx942 ONNXRUNTIME_VERSION=$(<span class="hljs-built_in">cat</span> ./VERSION_NUMBER) --use_rocm --rocm_home=/opt/rocm
pip install build/Linux/Release/dist/*`,wrap:!1}}),b=new fe({props:{$$slots:{default:[be]},$$scope:{ctx:st}}}),E=new y({props:{title:"Checking the ROCm installation is successful",local:"checking-the-rocm-installation-is-successful",headingTag:"h3"}}),P=new T({props:{code:"ZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBPUlRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUwQSUwQW9ydF9tb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIycGhpbHNjaG1pZCUyRnRpbnktYmVydC1zc3QyLWRpc3RpbGxlZCUyMiUyQyUwQSUyMCUyMGV4cG9ydCUzRFRydWUlMkMlMEElMjAlMjBwcm92aWRlciUzRCUyMlJPQ01FeGVjdXRpb25Qcm92aWRlciUyMiUyQyUwQSklMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJwaGlsc2NobWlkJTJGdGlueS1iZXJ0LXNzdDItZGlzdGlsbGVkJTIyKSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJleHBlY3RhdGlvbnMlMjB3ZXJlJTIwbG93JTJDJTIwYWN0dWFsJTIwZW5qb3ltZW50JTIwd2FzJTIwaGlnaCUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwb3J0X21vZGVsKCoqaW5wdXRzKSUwQWFzc2VydCUyMG9ydF9tb2RlbC5wcm92aWRlcnMlMjAlM0QlM0QlMjAlNUIlMjJST0NNRXhlY3V0aW9uUHJvdmlkZXIlMjIlMkMlMjAlMjJDUFVFeGVjdXRpb25Qcm92aWRlciUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>ort_model = ORTModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>  <span class="hljs-string">&quot;philschmid/tiny-bert-sst2-distilled&quot;</span>,
<span class="hljs-meta">... </span>  export=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>  provider=<span class="hljs-string">&quot;ROCMExecutionProvider&quot;</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;philschmid/tiny-bert-sst2-distilled&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;expectations were low, actual enjoyment was high&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = ort_model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> ort_model.providers == [<span class="hljs-string">&quot;ROCMExecutionProvider&quot;</span>, <span class="hljs-string">&quot;CPUExecutionProvider&quot;</span>]`,wrap:!1}}),z=new T({props:{code:"VmFsdWVFcnJvciUzQSUyMEFza2VkJTIwdG8lMjB1c2UlMjBST0NNRXhlY3V0aW9uUHJvdmlkZXIlMjBhcyUyMGFuJTIwT05OWCUyMFJ1bnRpbWUlMjBleGVjdXRpb24lMjBwcm92aWRlciUyQyUyMGJ1dCUyMHRoZSUyMGF2YWlsYWJsZSUyMGV4ZWN1dGlvbiUyMHByb3ZpZGVycyUyMGFyZSUyMCU1QidDUFVFeGVjdXRpb25Qcm92aWRlciclNUQu",highlighted:'ValueError: Asked <span class="hljs-built_in">to</span> use ROCMExecutionProvider <span class="hljs-keyword">as</span> <span class="hljs-keyword">an</span> ONNX Runtime execution provider, but <span class="hljs-keyword">the</span> available execution providers are [<span class="hljs-string">&#x27;CPUExecutionProvider&#x27;</span>].',wrap:!1}}),L=new y({props:{title:"Use ROCM Execution Provider with ORT models",local:"use-rocm-execution-provider-with-ort-models",headingTag:"h2"}}),Y=new T({props:{code:"ZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBPUlRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFvcnRfbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyJTJDJTBBJTIwJTIwZXhwb3J0JTNEVHJ1ZSUyQyUwQSUyMCUyMHByb3ZpZGVyJTNEJTIyUk9DTUV4ZWN1dGlvblByb3ZpZGVyJTIyJTJDJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>ort_model = ORTModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>  <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>,
<span class="hljs-meta">... </span>  export=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>  provider=<span class="hljs-string">&quot;ROCMExecutionProvider&quot;</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),A=new T({props:{code:"ZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBwaXBlbGluZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvVG9rZW5pemVyJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIpJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKHRhc2slM0QlMjJ0ZXh0LWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0RvcnRfbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIlMkMlMjBkZXZpY2UlM0QlMjJjdWRhJTNBMCUyMiklMEFyZXN1bHQlMjAlM0QlMjBwaXBlKCUyMkJvdGglMjB0aGUlMjBtdXNpYyUyMGFuZCUyMHZpc3VhbCUyMHdlcmUlMjBhc3RvdW5kaW5nJTJDJTIwbm90JTIwdG8lMjBtZW50aW9uJTIwdGhlJTIwYWN0b3JzJTIwcGVyZm9ybWFuY2UuJTIyKSUwQXByaW50KHJlc3VsdCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipeline(task=<span class="hljs-string">&quot;text-classification&quot;</span>, model=ort_model, tokenizer=tokenizer, device=<span class="hljs-string">&quot;cuda:0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>result = pipe(<span class="hljs-string">&quot;Both the music and visual were astounding, not to mention the actors performance.&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(result)
<span class="hljs-comment"># printing: [{&#x27;label&#x27;: &#x27;POSITIVE&#x27;, &#x27;score&#x27;: 0.9997727274894c714}]</span>`,wrap:!1}}),K=new T({props:{code:"aW1wb3J0JTIwb25ueHJ1bnRpbWUlMEElMEFzZXNzaW9uX29wdGlvbnMlMjAlM0QlMjBvbm54cnVudGltZS5TZXNzaW9uT3B0aW9ucygpJTBBc2Vzc2lvbl9vcHRpb25zLmxvZ19zZXZlcml0eV9sZXZlbCUyMCUzRCUyMDAlMEElMEFvcnRfbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwZXhwb3J0JTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHByb3ZpZGVyJTNEJTIyUk9DTUV4ZWN1dGlvblByb3ZpZGVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwc2Vzc2lvbl9vcHRpb25zJTNEc2Vzc2lvbl9vcHRpb25zJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> onnxruntime

<span class="hljs-meta">&gt;&gt;&gt; </span>session_options = onnxruntime.SessionOptions()
<span class="hljs-meta">&gt;&gt;&gt; </span>session_options.log_severity_level = <span class="hljs-number">0</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>ort_model = ORTModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>,
<span class="hljs-meta">... </span>    export=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    provider=<span class="hljs-string">&quot;ROCMExecutionProvider&quot;</span>,
<span class="hljs-meta">... </span>    session_options=session_options
<span class="hljs-meta">... </span>)`,wrap:!1}}),tt=new y({props:{title:"Observed time gains",local:"observed-time-gains",headingTag:"h2"}}),{c(){M=i("meta"),f=n(),g=i("p"),nt=n(),o(J.$$.fragment),at=n(),o(w.$$.fragment),it=n(),U=i("p"),U.textContent=St,pt=n(),j=i("p"),j.innerHTML=Pt,ot=n(),$=i("p"),$.innerHTML=Qt,rt=n(),o(R.$$.fragment),mt=n(),v=i("p"),v.textContent=zt,ct=n(),o(C.$$.fragment),ut=n(),x=i("p"),x.innerHTML=Ft,dt=n(),o(Z.$$.fragment),ht=n(),B=i("p"),B.innerHTML=Lt,Mt=n(),W=i("p"),W.innerHTML=Ot,ft=n(),o(G.$$.fragment),yt=n(),V=i("p"),V.innerHTML=Yt,bt=n(),o(I.$$.fragment),Tt=n(),N=i("p"),N.innerHTML=qt,gt=n(),o(k.$$.fragment),Jt=n(),o(X.$$.fragment),wt=n(),o(_.$$.fragment),Ut=n(),H=i("p"),H.innerHTML=At,jt=n(),o(b.$$.fragment),$t=n(),o(E.$$.fragment),Rt=n(),S=i("p"),S.textContent=Dt,vt=n(),o(P.$$.fragment),Ct=n(),Q=i("p"),Q.textContent=Kt,xt=n(),o(z.$$.fragment),Zt=n(),F=i("p"),F.textContent=te,Bt=n(),o(L.$$.fragment),Wt=n(),O=i("p"),O.innerHTML=ee,Gt=n(),o(Y.$$.fragment),Vt=n(),q=i("p"),q.innerHTML=le,It=n(),o(A.$$.fragment),Nt=n(),D=i("p"),D.innerHTML=se,kt=n(),o(K.$$.fragment),Xt=n(),o(tt.$$.fragment),_t=n(),et=i("p"),et.textContent=ne,Ht=n(),lt=i("p"),this.h()},l(t){const e=ue("svelte-u9bgzb",document.head);M=p(e,"META",{name:!0,content:!0}),e.forEach(l),f=a(t),g=p(t,"P",{}),ie(g).forEach(l),nt=a(t),r(J.$$.fragment,t),at=a(t),r(w.$$.fragment,t),it=a(t),U=p(t,"P",{"data-svelte-h":!0}),h(U)!=="svelte-1ua7il2"&&(U.textContent=St),pt=a(t),j=p(t,"P",{"data-svelte-h":!0}),h(j)!=="svelte-1gmc0d5"&&(j.innerHTML=Pt),ot=a(t),$=p(t,"P",{"data-svelte-h":!0}),h($)!=="svelte-fubslz"&&($.innerHTML=Qt),rt=a(t),r(R.$$.fragment,t),mt=a(t),v=p(t,"P",{"data-svelte-h":!0}),h(v)!=="svelte-qlmugp"&&(v.textContent=zt),ct=a(t),r(C.$$.fragment,t),ut=a(t),x=p(t,"P",{"data-svelte-h":!0}),h(x)!=="svelte-ygi5i"&&(x.innerHTML=Ft),dt=a(t),r(Z.$$.fragment,t),ht=a(t),B=p(t,"P",{"data-svelte-h":!0}),h(B)!=="svelte-1s35nuu"&&(B.innerHTML=Lt),Mt=a(t),W=p(t,"P",{"data-svelte-h":!0}),h(W)!=="svelte-1ggobrn"&&(W.innerHTML=Ot),ft=a(t),r(G.$$.fragment,t),yt=a(t),V=p(t,"P",{"data-svelte-h":!0}),h(V)!=="svelte-11gz38l"&&(V.innerHTML=Yt),bt=a(t),r(I.$$.fragment,t),Tt=a(t),N=p(t,"P",{"data-svelte-h":!0}),h(N)!=="svelte-1gp4vlz"&&(N.innerHTML=qt),gt=a(t),r(k.$$.fragment,t),Jt=a(t),r(X.$$.fragment,t),wt=a(t),r(_.$$.fragment,t),Ut=a(t),H=p(t,"P",{"data-svelte-h":!0}),h(H)!=="svelte-rwanib"&&(H.innerHTML=At),jt=a(t),r(b.$$.fragment,t),$t=a(t),r(E.$$.fragment,t),Rt=a(t),S=p(t,"P",{"data-svelte-h":!0}),h(S)!=="svelte-ojb3z4"&&(S.textContent=Dt),vt=a(t),r(P.$$.fragment,t),Ct=a(t),Q=p(t,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-j2t2xg"&&(Q.textContent=Kt),xt=a(t),r(z.$$.fragment,t),Zt=a(t),F=p(t,"P",{"data-svelte-h":!0}),h(F)!=="svelte-1fgo68"&&(F.textContent=te),Bt=a(t),r(L.$$.fragment,t),Wt=a(t),O=p(t,"P",{"data-svelte-h":!0}),h(O)!=="svelte-tnexjl"&&(O.innerHTML=ee),Gt=a(t),r(Y.$$.fragment,t),Vt=a(t),q=p(t,"P",{"data-svelte-h":!0}),h(q)!=="svelte-1icvfx4"&&(q.innerHTML=le),It=a(t),r(A.$$.fragment,t),Nt=a(t),D=p(t,"P",{"data-svelte-h":!0}),h(D)!=="svelte-5v5qqy"&&(D.innerHTML=se),kt=a(t),r(K.$$.fragment,t),Xt=a(t),r(tt.$$.fragment,t),_t=a(t),et=p(t,"P",{"data-svelte-h":!0}),h(et)!=="svelte-15n2n4z"&&(et.textContent=ne),Ht=a(t),lt=p(t,"P",{}),ie(lt).forEach(l),this.h()},h(){pe(M,"name","hf:doc:metadata"),pe(M,"content",ge)},m(t,e){de(document.head,M),s(t,f,e),s(t,g,e),s(t,nt,e),m(J,t,e),s(t,at,e),m(w,t,e),s(t,it,e),s(t,U,e),s(t,pt,e),s(t,j,e),s(t,ot,e),s(t,$,e),s(t,rt,e),m(R,t,e),s(t,mt,e),s(t,v,e),s(t,ct,e),m(C,t,e),s(t,ut,e),s(t,x,e),s(t,dt,e),m(Z,t,e),s(t,ht,e),s(t,B,e),s(t,Mt,e),s(t,W,e),s(t,ft,e),m(G,t,e),s(t,yt,e),s(t,V,e),s(t,bt,e),m(I,t,e),s(t,Tt,e),s(t,N,e),s(t,gt,e),m(k,t,e),s(t,Jt,e),m(X,t,e),s(t,wt,e),m(_,t,e),s(t,Ut,e),s(t,H,e),s(t,jt,e),m(b,t,e),s(t,$t,e),m(E,t,e),s(t,Rt,e),s(t,S,e),s(t,vt,e),m(P,t,e),s(t,Ct,e),s(t,Q,e),s(t,xt,e),m(z,t,e),s(t,Zt,e),s(t,F,e),s(t,Bt,e),m(L,t,e),s(t,Wt,e),s(t,O,e),s(t,Gt,e),m(Y,t,e),s(t,Vt,e),s(t,q,e),s(t,It,e),m(A,t,e),s(t,Nt,e),s(t,D,e),s(t,kt,e),m(K,t,e),s(t,Xt,e),m(tt,t,e),s(t,_t,e),s(t,et,e),s(t,Ht,e),s(t,lt,e),Et=!0},p(t,[e]){const ae={};e&2&&(ae.$$scope={dirty:e,ctx:t}),b.$set(ae)},i(t){Et||(c(J.$$.fragment,t),c(w.$$.fragment,t),c(R.$$.fragment,t),c(C.$$.fragment,t),c(Z.$$.fragment,t),c(G.$$.fragment,t),c(I.$$.fragment,t),c(k.$$.fragment,t),c(X.$$.fragment,t),c(_.$$.fragment,t),c(b.$$.fragment,t),c(E.$$.fragment,t),c(P.$$.fragment,t),c(z.$$.fragment,t),c(L.$$.fragment,t),c(Y.$$.fragment,t),c(A.$$.fragment,t),c(K.$$.fragment,t),c(tt.$$.fragment,t),Et=!0)},o(t){u(J.$$.fragment,t),u(w.$$.fragment,t),u(R.$$.fragment,t),u(C.$$.fragment,t),u(Z.$$.fragment,t),u(G.$$.fragment,t),u(I.$$.fragment,t),u(k.$$.fragment,t),u(X.$$.fragment,t),u(_.$$.fragment,t),u(b.$$.fragment,t),u(E.$$.fragment,t),u(P.$$.fragment,t),u(z.$$.fragment,t),u(L.$$.fragment,t),u(Y.$$.fragment,t),u(A.$$.fragment,t),u(K.$$.fragment,t),u(tt.$$.fragment,t),Et=!1},d(t){t&&(l(f),l(g),l(nt),l(at),l(it),l(U),l(pt),l(j),l(ot),l($),l(rt),l(mt),l(v),l(ct),l(ut),l(x),l(dt),l(ht),l(B),l(Mt),l(W),l(ft),l(yt),l(V),l(bt),l(Tt),l(N),l(gt),l(Jt),l(wt),l(Ut),l(H),l(jt),l($t),l(Rt),l(S),l(vt),l(Ct),l(Q),l(xt),l(Zt),l(F),l(Bt),l(Wt),l(O),l(Gt),l(Vt),l(q),l(It),l(Nt),l(D),l(kt),l(Xt),l(_t),l(et),l(Ht),l(lt)),l(M),d(J,t),d(w,t),d(R,t),d(C,t),d(Z,t),d(G,t),d(I,t),d(k,t),d(X,t),d(_,t),d(b,t),d(E,t),d(P,t),d(z,t),d(L,t),d(Y,t),d(A,t),d(K,t),d(tt,t)}}}const ge='{"title":"Accelerated inference on AMD GPUs supported by ROCm","local":"accelerated-inference-on-amd-gpus-supported-by-rocm","sections":[{"title":"Installation","local":"installation","sections":[{"title":"1 ROCm Installation","local":"1-rocm-installation","sections":[],"depth":4},{"title":"2 Installing onnxruntime-rocm","local":"2-installing-onnxruntime-rocm","sections":[{"title":"2.1 PyTorch with ROCm Support","local":"21-pytorch-with-rocm-support","sections":[],"depth":5},{"title":"2.2 ONNX Runtime with ROCm Execution Provider","local":"22-onnx-runtime-with-rocm-execution-provider","sections":[],"depth":5}],"depth":4},{"title":"Checking the ROCm installation is successful","local":"checking-the-rocm-installation-is-successful","sections":[],"depth":3}],"depth":2},{"title":"Use ROCM Execution Provider with ORT models","local":"use-rocm-execution-provider-with-ort-models","sections":[],"depth":2},{"title":"Observed time gains","local":"observed-time-gains","sections":[],"depth":2}],"depth":1}';function Je(st){return re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ve extends me{constructor(M){super(),ce(this,M,Je,Te,oe,{})}}export{ve as component};
