import{s as et,n as lt,o as nt}from"../chunks/scheduler.f3b1e791.js";import{S as st,i as at,e as i,s,c as x,h as Mt,a as r,d as l,b as a,f as P,g as d,j as k,k as K,l as it,m as n,n as h,t as C,o as g,p as b}from"../chunks/index.023a9934.js";import{C as rt}from"../chunks/CopyLLMTxtMenu.ee636735.js";import{C as tt}from"../chunks/CodeBlock.5aa52fca.js";import{H as L,E as ot}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9b009efe.js";function yt(R){let M,N,f,$,o,A,y,W,T,E,c,Q,J,H=`Before <code>kernels</code> 0.12, kernels could be pulled from a repository
without specifying a version. This is deprecated in kernels 0.12
and will become an error in kernels 0.14. Instead, use of a kernel
should always specify a version (except for local kernels).`,B,u,Z=`Kernels only use a major version. The kernel maintainer is responsible
for never breaking a kernel within a major version and should bump up
the major version if the kernel API changes and/or when support for
older Torch versions is removed.`,X,p,z=`You can find the versions that are supported by a kernel using the
<code>kernels versions command</code>. For example:`,Y,m,S,j,O=`The command lists all available versions (here only version 1) with
all the variants that are supported. A check mark is printed after
the variant that is compatible with your current environment.`,_,U,F="Code that uses a kernel can be updated as follows:",V,w,D,I,q,v,G;return o=new rt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),y=new L({props:{title:"Migrating from older versions",local:"migrating-from-older-versions",headingTag:"h1"}}),T=new L({props:{title:"0.12",local:"012",headingTag:"h2"}}),c=new L({props:{title:"Adopting kernel versions",local:"adopting-kernel-versions",headingTag:"h3"}}),m=new tt({props:{code:"JTI0JTIwa2VybmVscyUyMHZlcnNpb25zJTIwa2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTBBVmVyc2lvbiUyMDElM0ElMjB0b3JjaDIxMC1jeHgxMS1jdTEyNi14ODZfNjQtbGludXglMkMlMjB0b3JjaDIxMC1jeHgxMS1jdTEyOC14ODZfNjQtbGludXglMkMlMjB0b3JjaDIxMC1jeHgxMS1jdTEzMC14ODZfNjQtbGludXglMkMlMjB0b3JjaDI3LWN4eDExLWN1MTE4LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjctY3h4MTEtY3UxMjYteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyNy1jeHgxMS1jdTEyOC1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyNy1jeHgxMS1jdTEyOC14ODZfNjQtbGludXglMjAlRTIlOUMlODUlMkMlMjB0b3JjaDI4LWN4eDExLWN1MTI2LWFhcmNoNjQtbGludXglMkMlMjB0b3JjaDI4LWN4eDExLWN1MTI2LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjgtY3h4MTEtY3UxMjgtYWFyY2g2NC1saW51eCUyQyUyMHRvcmNoMjgtY3h4MTEtY3UxMjgteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyOC1jeHgxMS1jdTEyOS1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyOC1jeHgxMS1jdTEyOS14ODZfNjQtbGludXglMkMlMjB0b3JjaDI5LWN4eDExLWN1MTI2LWFhcmNoNjQtbGludXglMkMlMjB0b3JjaDI5LWN4eDExLWN1MTI2LXg4Nl82NC1saW51eCUyQyUyMHRvcmNoMjktY3h4MTEtY3UxMjgtYWFyY2g2NC1saW51eCUyQyUyMHRvcmNoMjktY3h4MTEtY3UxMjgteDg2XzY0LWxpbnV4JTJDJTIwdG9yY2gyOS1jeHgxMS1jdTEzMC1hYXJjaDY0LWxpbnV4JTJDJTIwdG9yY2gyOS1jeHgxMS1jdTEzMC14ODZfNjQtbGludXg=",highlighted:`$ kernels versions kernels-community/activation
Version 1: torch210-cxx11-cu126-x86_64-linux, torch210-cxx11-cu128-x86_64-linux, torch210-cxx11-cu130-x86_64-linux, torch27-cxx11-cu118-x86_64-linux, torch27-cxx11-cu126-x86_64-linux, torch27-cxx11-cu128-aarch64-linux, torch27-cxx11-cu128-x86_64-linux ✅, torch28-cxx11-cu126-aarch64-linux, torch28-cxx11-cu126-x86_64-linux, torch28-cxx11-cu128-aarch64-linux, torch28-cxx11-cu128-x86_64-linux, torch28-cxx11-cu129-aarch64-linux, torch28-cxx11-cu129-x86_64-linux, torch29-cxx11-cu126-aarch64-linux, torch29-cxx11-cu126-x86_64-linux, torch29-cxx11-cu128-aarch64-linux, torch29-cxx11-cu128-x86_64-linux, torch29-cxx11-cu130-aarch64-linux, torch29-cxx11-cu130-x86_64-linux`,wrap:!1}}),w=new tt({props:{code:"JTIzJTIwT2xkJTNBJTBBYWN0aXZhdGlvbiUyMCUzRCUyMGdldF9rZXJuZWwoJTIya2VybmVscy1jb21tdW5pdHklMkZhY3RpdmF0aW9uJTIyKSUwQWFjdGl2YXRpb24lMjAlM0QlMjBnZXRfa2VybmVsKCUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyQyUyMHZlcnNpb24lM0QlMjIlM0UlM0QwLjAuMiUyMCUyNiUyNiUyMCUzQzAuMS4wJTIyKSUwQSUwQSUyMyUyME5ldyUzQSUwQWFjdGl2YXRpb24lMjAlM0QlMjBnZXRfa2VybmVsKCUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyQyUyMHZlcnNpb24lM0QxKSUwQSUwQSUyMyUyME9sZCUzQSUwQWtlcm5lbF9sYXllcl9tYXBwaW5nJTIwJTNEJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIyU2lsdUFuZE11bCUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMmN1ZGElMjIlM0ElMjBMYXllclJlcG9zaXRvcnkoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmVwb19pZCUzRCUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxheWVyX25hbWUlM0QlMjJTaWx1QW5kTXVsJTIyJTJD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MlNpbHVBbmRNdWwlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB2ZXJzaW9uJTNEMSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCklMkMlMEElMjAlMjAlMjAlMjAlN0QlMEElN0Q=",highlighted:`<span class="hljs-comment"># Old:</span>
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>)
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>, version=<span class="hljs-string">&quot;&gt;=0.0.2 &amp;&amp; &lt;0.1.0&quot;</span>)

<span class="hljs-comment"># New:</span>
activation = get_kernel(<span class="hljs-string">&quot;kernels-community/activation&quot;</span>, version=<span class="hljs-number">1</span>)

<span class="hljs-comment"># Old:</span>
kernel_layer_mapping = {
    <span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
        <span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
            repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
            layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
        ),
    }
}
kernel_layer_mapping = {
    <span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
        <span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
            repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
            layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
            version=<span class="hljs-string">&quot;&gt;=0.0.2 &amp;&amp; &lt;0.1.0&quot;</span>,
        ),
    }
}

<span class="hljs-comment"># New:</span>
kernel_layer_mapping = {
    <span class="hljs-string">&quot;SiluAndMul&quot;</span>: {
        <span class="hljs-string">&quot;cuda&quot;</span>: LayerRepository(
            repo_id=<span class="hljs-string">&quot;kernels-community/activation&quot;</span>,
            layer_name=<span class="hljs-string">&quot;SiluAndMul&quot;</span>,
            version=<span class="hljs-number">1</span>,
        ),
    }
}`,wrap:!1}}),I=new ot({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/migration.md"}}),{c(){M=i("meta"),N=s(),f=i("p"),$=s(),x(o.$$.fragment),A=s(),x(y.$$.fragment),W=s(),x(T.$$.fragment),E=s(),x(c.$$.fragment),Q=s(),J=i("p"),J.innerHTML=H,B=s(),u=i("p"),u.textContent=Z,X=s(),p=i("p"),p.innerHTML=z,Y=s(),x(m.$$.fragment),S=s(),j=i("p"),j.textContent=O,_=s(),U=i("p"),U.textContent=F,V=s(),x(w.$$.fragment),D=s(),x(I.$$.fragment),q=s(),v=i("p"),this.h()},l(t){const e=Mt("svelte-u9bgzb",document.head);M=r(e,"META",{name:!0,content:!0}),e.forEach(l),N=a(t),f=r(t,"P",{}),P(f).forEach(l),$=a(t),d(o.$$.fragment,t),A=a(t),d(y.$$.fragment,t),W=a(t),d(T.$$.fragment,t),E=a(t),d(c.$$.fragment,t),Q=a(t),J=r(t,"P",{"data-svelte-h":!0}),k(J)!=="svelte-1j0u906"&&(J.innerHTML=H),B=a(t),u=r(t,"P",{"data-svelte-h":!0}),k(u)!=="svelte-1cirsrj"&&(u.textContent=Z),X=a(t),p=r(t,"P",{"data-svelte-h":!0}),k(p)!=="svelte-2bt5ad"&&(p.innerHTML=z),Y=a(t),d(m.$$.fragment,t),S=a(t),j=r(t,"P",{"data-svelte-h":!0}),k(j)!=="svelte-eoylg7"&&(j.textContent=O),_=a(t),U=r(t,"P",{"data-svelte-h":!0}),k(U)!=="svelte-1y70x1q"&&(U.textContent=F),V=a(t),d(w.$$.fragment,t),D=a(t),d(I.$$.fragment,t),q=a(t),v=r(t,"P",{}),P(v).forEach(l),this.h()},h(){K(M,"name","hf:doc:metadata"),K(M,"content",Tt)},m(t,e){it(document.head,M),n(t,N,e),n(t,f,e),n(t,$,e),h(o,t,e),n(t,A,e),h(y,t,e),n(t,W,e),h(T,t,e),n(t,E,e),h(c,t,e),n(t,Q,e),n(t,J,e),n(t,B,e),n(t,u,e),n(t,X,e),n(t,p,e),n(t,Y,e),h(m,t,e),n(t,S,e),n(t,j,e),n(t,_,e),n(t,U,e),n(t,V,e),h(w,t,e),n(t,D,e),h(I,t,e),n(t,q,e),n(t,v,e),G=!0},p:lt,i(t){G||(C(o.$$.fragment,t),C(y.$$.fragment,t),C(T.$$.fragment,t),C(c.$$.fragment,t),C(m.$$.fragment,t),C(w.$$.fragment,t),C(I.$$.fragment,t),G=!0)},o(t){g(o.$$.fragment,t),g(y.$$.fragment,t),g(T.$$.fragment,t),g(c.$$.fragment,t),g(m.$$.fragment,t),g(w.$$.fragment,t),g(I.$$.fragment,t),G=!1},d(t){t&&(l(N),l(f),l($),l(A),l(W),l(E),l(Q),l(J),l(B),l(u),l(X),l(p),l(Y),l(S),l(j),l(_),l(U),l(V),l(D),l(q),l(v)),l(M),b(o,t),b(y,t),b(T,t),b(c,t),b(m,t),b(w,t),b(I,t)}}}const Tt='{"title":"Migrating from older versions","local":"migrating-from-older-versions","sections":[{"title":"0.12","local":"012","sections":[{"title":"Adopting kernel versions","local":"adopting-kernel-versions","sections":[],"depth":3}],"depth":2}],"depth":1}';function ct(R){return nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ut extends st{constructor(M){super(),at(this,M,ct,yt,et,{})}}export{Ut as component};
