Buckets:
| import{s as $i,n as Ui,o as Ji}from"../chunks/scheduler.f3b1e791.js";import{S as vi,i as Ci,e as a,s,c as p,h as ji,a as o,d as l,b as i,f as Pn,g as c,j as r,k as ls,l as T,m as n,n as d,t as m,o as u,p as h}from"../chunks/index.023a9934.js";import{C as xi,H as f,E as Ii}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bc186cc7.js";import{C as y}from"../chunks/CodeBlock.f573e8ef.js";function Hi(ns){let g,Nt,Bt,Wt,U,Et,J,At,v,Qt,C,ss=`The Kernel Hub allows Python libraries and applications to load compute | |
| kernels directly from the <a href="https://hf.co/" rel="nofollow">Hub</a>. To support this kind | |
| of dynamic loading, Hub kernels differ from traditional Python kernel | |
| packages in that they are made to be:`,qt,j,is=`<li>Portable: a kernel can be loaded from paths outside <code>PYTHONPATH</code>.</li> <li>Unique: multiple versions of the same kernel can be loaded in the | |
| same Python process.</li> <li>Compatible: kernels must support all recent versions of Python and | |
| the different PyTorch build configurations (various CUDA versions | |
| and C++ ABIs). Furthermore, older C library versions must be supported.</li>`,St,x,as=`<code>kernel-builder</code> is a set of tools that can build conforming kernels. It | |
| takes care of:`,Gt,I,os=`<li>Building kernels for all supported PyTorch configurations (C++98/11 and | |
| different CUDA versions).</li> <li>Compatibility with old glibc and libstdc++ versions, so that kernels also | |
| work on older Linux distributions.</li> <li>Registering Torch ops, such that multiple versions the same kernel can be | |
| loaded without namespace conflicts.</li>`,Xt,H,rs=`<code>kernel-builder</code> builds are configured through a <code>build.toml</code> file. | |
| <code>build.toml</code> is a simple format that does not require intricate knowledge | |
| of CMake or setuptools.`,Pt,_,ps=`This page describes the directory layout of a kernel-builder project, the | |
| format of the <code>build.toml</code> file, and some additional Python glue that | |
| <code>kernel-builder</code> provides. We will use a <a href="https://github.com/huggingface/kernels/tree/main/examples/kernels/relu" rel="nofollow">simple ReLU kernel</a> | |
| as the running example. After reading this page, you may also want to have | |
| a look at the more realistic <a href="https://github.com/huggingface/kernels/tree/main/examples/kernels/relu-backprop-compile" rel="nofollow">ReLU kernel with backprop and <code>torch.compile</code></a> | |
| support.`,Ft,w,cs=`<p>We maintain a set of conforming kernels in the | |
| <a href="https://github.com/huggingface/kernels-community" rel="nofollow">kernels-community repository</a>. | |
| We try to keep these kernels synced with upstream as much as possible.</p>`,Yt,L,zt,Z,Ot,V,ds=`The fastest way to get started is to run the install script. This | |
| installs <a href="https://docs.determinate.systems/determinate-nix/" rel="nofollow">Determinate Nix</a> | |
| and <code>kernel-builder</code> in a single command:`,Dt,B,Kt,R,ms="This will:",el,N,us=`<li>Install Determinate Nix (if not already installed).</li> <li>Configure the Hugging Face binary cache (to avoid building dependencies from | |
| source).</li> <li>Install <code>kernel-builder</code> via <code>nix profile install</code>.</li>`,tl,W,hs="To update <code>kernel-builder</code> later:",ll,E,nl,A,fs=`For a step-by-step breakdown of what the script does, see | |
| <a href="nix">Using the kernel builder with Nix</a>.`,sl,Q,il,q,Ts=`In the <a href="https://github.com/huggingface/kernels/tree/main/terraform" rel="nofollow"><code>terraform</code></a> directory, we provide an | |
| example of programatically spinning up an EC2 instance that is ready | |
| with everything needed for you to start developing and building | |
| kernels.`,al,S,ys=`If you use a different provider, the Terraform bridges should be | |
| similar and straightforward to modify.`,ol,G,rl,X,bs=`The easiest way to start a new kernel is by using the <code>init</code> subcommand | |
| of <code>kernel-builder</code>. This creates a minimal, compilable kernel:`,pl,P,cl,F,Ms=`This creates a kernel named <code>mykernel</code> in the directory <code>mykernel</code>. The | |
| kernel is configured to upload to the <code>myorg/mykernel</code> Hub | |
| repository when an upload command is used.`,dl,Y,ks=`By default, the <code>init</code> subcommand creates a CUDA kernel. You can specify | |
| another backend with the <code>--backends</code> option:`,ml,z,ul,O,gs=`You can also make a multi-backend kernel by adding all the backends | |
| that you would like to support as arguments to <code>--backends</code>:`,hl,D,fl,K,ws=`Finally, if you want to create a kernel for all supported backends, you | |
| can use <code>--backends all</code>.`,Tl,ee,yl,te,$s="Kernel projects follow this general directory layout:",bl,le,Ml,ne,Us="In this example we can find:",kl,se,Js=`<li>The build configuration in <code>build.toml</code>.</li> <li>One or more top-level directories containing kernels (<code>mykernel_cuda</code>).</li> <li>The <code>torch-ext</code> directory, which contains: | |
| <ul><li><code>torch_binding.h</code>: contains declarations for kernel entry points | |
| (from <code>kernel_a</code> and <code>kernel_b</code>).</li> <li><code>torch_binding.cpp</code>: registers the entry points as Torch ops.</li> <li><code>torch_ext/mykernel</code>: contains any Python wrapping the kernel needs. At the | |
| bare minimum, it should contain an <code>__init__.py</code> file.</li></ul></li> <li>Kernel tests in the directory <code>tests</code>.</li> <li>Benchmarks in the directory <code>benchmarks</code>.</li> <li>A kernel card template in <code>CARD.md</code>. This placeholders in the card are filled | |
| during the kernel build.</li> <li>The Nix flake configuration in <code>flake.nix</code>.</li> <li>An example script that uses the kernel in <code>example.py</code>.</li>`,gl,ie,wl,ae,vs=`<code>build.toml</code> tells <code>kernel-builder</code> what to build and how. It looks as | |
| follows for the <code>mykernel</code> kernel:`,$l,oe,Ul,re,Cs="The following sections enumerate all supported options for <code>build.toml</code>.",Jl,pe,vl,ce,js=`<li><code>name</code> (required): the name of the kernel. The Python code for a Torch | |
| extension must be stored in <code>torch-ext/<name></code>.</li> <li><code>version</code> (int): the major version of the kernel. | |
| The version is written to the kernel’s <code>metadata.json</code> and is used | |
| by the <code>kernels upload</code> command to upload the kernel to a version | |
| branch named <code>v<version></code>.</li> <li><code>backends</code> (required): a list of supported backends. Must be one or | |
| more of <code>cpu</code>, <code>cuda</code>, <code>metal</code>, <code>rocm</code>, or <code>xpu</code>.</li> <li><code>upstream</code>: Git-compatible URL (passable to <code>git clone</code>) of the original | |
| upstream repository where the kernel source code comes from.</li> <li><code>source</code>: Git-compatible URL (passable to <code>git clone</code>) of the kernel-builder | |
| formatted source repository. This repository must contain a <code>build.toml</code> and | |
| <code>flake.nix</code> so that it can be pulled and built with the kernel builder.</li> <li><code>python-depends</code> (<strong>experimental</strong>): a list of additional Python dependencies | |
| that the kernel requires. The only supported dependencies are <code>einops</code> | |
| and <code>nvidia-cutlass-dsl</code>.</li>`,Cl,de,jl,me,xs=`<li><code>repo-id</code>: the Hub repository to upload the kernel to when the <code>upload</code> or | |
| <code>build-and-upload</code> subcommands of <code>kernel-builder</code> are used.</li>`,xl,ue,Il,he,Is=`<li><code>maxver</code>: the maximum CUDA toolkit version (inclusive). This option | |
| <em>must not</em> be set under normal circumstances, since it can exclude Torch | |
| build variants that are <a href="../kernel-requirements">required for compliant kernels</a>. | |
| This option is provided for kernels that cause compiler errors on | |
| newer CUDA toolkit versions.</li> <li><code>minver</code>: the minimum required CUDA toolkit version. This option | |
| <em>must not</em> be set under normal circumstances, since it can exclude Torch | |
| build variants that are <a href="../kernel-requirements">required for compliant kernels</a>. | |
| This option is provided for kernels that require functionality only | |
| provided by newer CUDA toolkits.</li>`,Hl,fe,_l,Te,Hs=`The framework section specifies framework-specific settings. The name of | |
| the section depends on the framework that is used. The currently supported | |
| frameworks are:`,Ll,ye,_s="<li>AOT-compiled Torch kernel (<code>torch</code>).</li> <li>AOT-compiled TVM-FFI kernel (<code>tvm-ffi</code>).</li> <li>JIT-compiled or not-compiled Torch kernel (<code>torch-noarch</code>, experimental).</li>",Zl,be,Vl,Me,Ls=`This framework section is used for AOT-compiled Torch kernels, and has the | |
| following options:`,Bl,b,jt,Zs="<p><code>src</code> (required): a list of source files and headers.</p>",Fn,xt,Vs=`<p><code>pyext</code> (optional): the list of extensions for Python files. Default: | |
| <code>["py", "pyi"]</code>.</p>`,Yn,It,Bs=`<p><code>include</code> (optional): include directories relative to the project root. | |
| Default: <code>[]</code>.</p>`,zn,Ht,Rs=`<p><code>maxver</code> (optional): only build for this Torch version and earlier. Use cautiously, since this option produces | |
| non-compliant kernels if the version range does not correspond to the <a href="build-variants">required variants</a>.</p>`,On,_t,Ns=`<p><code>minver</code> (optional): only build for this Torch version and later. Use cautiously, since this option produces | |
| non-compliant kernels if the version range does not correspond to the <a href="build-variants">required variants</a>.</p>`,Dn,k,Lt,Ws=`<code>stable-abi</code> (<strong>experimental</strong>): when set to a Torch version (e.g. | |
| <code>"2.11"</code>), the kernel is built using the Torch stable ABI. This | |
| requires that the kernel itself only use | |
| <a href="https://docs.pytorch.org/docs/2.12/notes/libtorch_stable_abi.html" rel="nofollow">stable ABI headers</a>. | |
| For an example, see the <a href="https://github.com/huggingface/kernels/tree/main/examples/kernels/relu-torch-stable-abi" rel="nofollow"><code>relu-torch-stable-abi</code></a> | |
| example kernel.`,Kn,Zt,Es=`The stable ABI can also be configured per-backend by providing a table | |
| mapping backend names to Torch versions instead of a single version. Backends | |
| that are not listed in the table are built normally (without the stable ABI), | |
| allowing a kernel to mix stable-ABI and full-ABI backends:`,es,ke,ts,Vt,As=`Entries for backends that are not in <code>[general].backends</code> are ignored, so a | |
| backend can be commented out of <code>[general].backends</code> for testing without | |
| having to also remove it from the table.`,Rl,ge,Nl,we,Qs="This framework section is used for AOT-compiled TVM-FFI kernels.",Wl,$e,qs=`<li><code>src</code> (required): a list of source files and headers.</li> <li><code>pyext</code> (optional): the list of extensions for Python files. Default: | |
| <code>["py", "pyi"]</code>.</li> <li><code>include</code> (optional): include directories relative to the project root. | |
| Default: <code>[]</code>.</li>`,El,Ue,Al,Je,Ss=`The <code>torch-noarch</code> section is used for JIT-compiled kernels or kernels that | |
| do not require any ahead-of-time compilation (e.g. a kernel that packages plain PyTorch | |
| layers).`,Ql,ve,Gs=`Normally, it is expected that this type of kernel runs on all CUDA capabilities | |
| or ROCm architectures. However, for kernels that support only a limited range | |
| of archs, the <code>cuda-capabilites</code> and <code>rocm-archs</code> options can be used to specify | |
| the supported archs. These are then exported to <code>metadata.json</code> for consumption | |
| by e.g. the Hugging Face Hub.`,ql,Ce,Xs=`<li><code>pyext</code> (optional): the list of extensions for Python files. Default: | |
| <code>["py", "pyi"]</code>.</li> <li><code>cuda-capabilities</code> (optional): a list of CUDA compute capabilities the | |
| kernel supports (e.g. <code>["9.0", "10.0"]</code>).</li> <li><code>rocm-archs</code> (optional): a list of ROCm architectures the kernel supports | |
| (e.g. <code>["gfx942"]</code>).</li>`,Sl,je,Gl,xe,Ps=`Specification of a kernel with the name <code><name></code>. Multiple <code>kernel.<name></code> | |
| sections can be defined in the same <code>build.toml</code>. | |
| See for example <a href="https://huggingface.co/kernels-community/quantization/" rel="nofollow"><code>kernels-community/quantization</code></a> | |
| for an example with multiple kernel sections.`,Xl,Ie,Fs="The following options can be set for a kernel:",Pl,He,Ys=`<li><code>backend</code> (required): the compute backend of the kernel. The currently | |
| supported backends are <code>cpu</code>, <code>cuda</code>, <code>metal</code>, <code>rocm</code>, and <code>xpu</code>. | |
| <strong>The <code>cpu</code> backend is currently experimental and might still change.</strong></li> <li><code>depends</code> (required): a list of dependencies. The supported dependencies | |
| are listed in <a href="https://github.com/huggingface/kernels/blob/main/builder/lib/deps.nix" rel="nofollow"><code>deps.nix</code></a>.</li> <li><code>src</code> (required): a list of source files and headers.</li> <li><code>include</code> (optional): include directories relative to the project root. | |
| Default: <code>[]</code>.</li>`,Fl,_e,zs=`Besides these shared options, the following backend-specific options | |
| are available:`,Yl,Le,zl,Ze,Os=`<li><code>cuda-capabilities</code> (optional): a list of CUDA capabilities that the | |
| kernel should be compiled for. When absent, the kernel will be built | |
| using all capabilities that the builder supports. The effective | |
| capabilities are the intersection of this list and the capabilities | |
| supported by the CUDA compiler. It is recommended to leave this option | |
| unspecified <strong>unless</strong> a kernel requires specific capabilities.</li> <li><code>cuda-flags</code> (optional): additional flags to be passed to <code>nvcc</code>. | |
| <strong>Warning</strong>: this option should only be used in exceptional circumstances. | |
| Custom compile flags can interfere with the build process or break | |
| compatibility requirements.</li>`,Ol,Ve,Dl,Be,Ds=`<li><code>rocm-archs</code>: a list of ROCm architectures that the kernel should be | |
| compiled for.</li>`,Kl,Re,en,Ne,Ks=`<li><code>sycl-flags</code>: a list of additional flags to be passed to the SYCL | |
| compiler.</li>`,tn,We,ln,Ee,ei=`<li><code>cxx-flags</code>: a list of additional flags to be passed to the C++ | |
| compiler.</li>`,nn,Ae,sn,Qe,an,qe,ti="Torch bindings are defined in C++, kernels commonly use two files:",on,Se,li="<li><code>torch_binding.h</code> containing function declarations.</li> <li><code>torch_binding.cpp</code> registering the functions as Torch ops.</li>",rn,Ge,ni=`For instance, the <code>mykernel</code> kernel discussed above has the following | |
| declaration in <code>torch_binding.h</code>:`,pn,Xe,cn,Pe,si="This function is then registered as a Torch op in <code>torch_binding.cpp</code>:",dn,Fe,mn,Ye,ii=`This snippet uses macros from <code>registration.h</code> to register the function. | |
| <code>registration.h</code> is generated by <code>kernel-builder</code> itself. A function | |
| is registered through the <code>def</code>/<code>ops</code> methods. <code>ops</code> specifies the | |
| function signature following the <a href="https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/README.md#func" rel="nofollow">function schema</a>. | |
| <code>impl</code> associates the function name with the C/C++ function and | |
| the applicable device.`,un,ze,hn,Oe,ai=`The bindings are typically wrapped in Python code in <code>torch_ext/<name></code>. | |
| The native code is exposed under the <code>torch.ops</code> namespace. However, | |
| we add some unique material to the name of the extension to ensure that | |
| different versions of the same extension can be loaded at the same time. | |
| As a result, the extension is registered as | |
| <code>torch.ops.<name>_<unique_material></code>.`,fn,De,oi=`To deal with this uniqueness, <code>kernel_builder</code> generates a Python module | |
| named <code>_ops</code> that contains an alias for the name. This can be used to | |
| refer to the correct <code>torch.ops</code> module. For example:`,Tn,Ke,yn,et,bn,tt,ri=`You may want to register Torch ops from your kernel’s Python code or | |
| register fake ops for <code>torch.compile</code> support. It is important to register | |
| such ops in the namespace that kernel-builder makes for your kernel | |
| build. This is required for compliant kernels to ensure that multiple | |
| versions of the same kernel can be loaded at the same time without | |
| namespace conflicts.`,Mn,lt,pi=`You can use the <code>add_op_namespace_prefix</code> to prefix an op name with the | |
| correct prefix. So for instance, replace`,kn,nt,gn,st,ci="by",wn,it,$n,at,di="As mentioned in the above, the <code>_ops</code> module is generated by kernel-builder.",Un,ot,mi=`kernel-builder uses a hook to reject incorrect usage of Torch op registration | |
| functions. However, it can only catch direct use of certain <code>torch.library</code> | |
| decorators. For instance, the hook would not reject the following decorator, | |
| so it should be seen as a last-resort check if human review failed:`,Jn,rt,vn,pt,Cn,ct,jn,dt,ui=`Kernel tests are stored in the <code>tests</code> directory. Tests must not use direct | |
| imports, but instead use <code>get_kernel</code> to test the kernel as it will be used. | |
| For example:`,xn,mt,In,ut,hi=`Development shells (<code>kernel-builder devshell</code>/<code>kernel-builder testshell</code>) | |
| will set the <code>LOCAL_KERNELS</code> variable to ensure that the kernel will be | |
| loaded from the development environment.`,Hn,ht,_n,ft,fi=`Since running all kernel tests in CI may be prohibitively expensive, the | |
| <code>pyproject.toml</code> generated by the builder adds support for the special | |
| <code>kernels_ci</code> PyTest marker that can be used as follows:`,Ln,Tt,Zn,yt,Ti=`We recommend that you to pick tests that together would catch most error | |
| cases while running within 60 seconds.`,Vn,bt,yi="You can run the tests (e.g. in CI) using:",Bn,Mt,Rn,kt,bi=`If the kernel supports multiple backends, it will run the test for the | |
| first supported backend that was found, obeying the following order: CUDA, | |
| ROCm, XPU, Metal, CPU. If you would like to the tests for a specific build | |
| variant, you can use <code>nix run .#ciTests.<variant></code>. For instance:`,Nn,gt,Wn,wt,Mi=`When running the tests on a non-NixOS systems, make sure that | |
| <a href="https://danieldk.eu/Software/Nix/Nix-CUDA-on-non-NixOS-systems#solutions" rel="nofollow">the CUDA driver library can be found</a>.`,En,$t,An,Ut,ki=`We provide a utility to generate a system card for a given kernel, utilizing | |
| information from its <code>build.toml</code> and metadata. This system card provides a | |
| reasonable starting point and is meant to be edited afterward by the kernel | |
| developer.`,Qn,Jt,gi=`The template card is generated as a part of <code>kernel-builder init</code> | |
| command and is serialized in the root directory of the kernel.`,qn,vt,wi=`The card will be filled automatically by the builder when using the | |
| <code>build-and-upload</code> or <code>build-and-copy</code> command. It will be serialized | |
| to the <code>build</code> sub-directory inside the main kernel directory. It | |
| will be uploaded as <code>README.md</code> to the Hub.`,Sn,Ct,Gn,Rt,Xn;return U=new xi({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),J=new f({props:{title:"Write kernels",local:"write-kernels",headingTag:"h1"}}),v=new f({props:{title:"Introduction",local:"introduction",headingTag:"h2"}}),L=new f({props:{title:"Setting up environment",local:"setting-up-environment",headingTag:"h2"}}),Z=new f({props:{title:"Quick install",local:"quick-install",headingTag:"h3"}}),B=new y({props:{code:"Y3VybCUyMC1mc1NMJTIwaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGaHVnZ2luZ2ZhY2UlMkZrZXJuZWxzJTJGbWFpbiUyRmluc3RhbGwuc2glMjAlN0MlMjBiYXNo",highlighted:"curl -fsSL https://raw.githubusercontent.com/huggingface/kernels/main/install.sh | bash",lang:"bash",wrap:!1}}),E=new y({props:{code:"bml4JTIwcHJvZmlsZSUyMHVwZ3JhZGUlMjAtLWFsbA==",highlighted:"nix profile upgrade --all",lang:"bash",wrap:!1}}),Q=new f({props:{title:"Cloud environment",local:"cloud-environment",headingTag:"h3"}}),G=new f({props:{title:"Starting a new kernel",local:"starting-a-new-kernel",headingTag:"h2"}}),P=new y({props:{code:"JTI0JTIwa2VybmVsLWJ1aWxkZXIlMjBpbml0JTIwLS1uYW1lJTIwbXlvcmclMkZteWtlcm5lbCUwQUluaXRpYWxpemVkJTIwJTYwbXlvcmclMkZteWtlcm5lbCU2MCUyMGF0JTIwJTJGaG9tZSUyRmRhbmllbCUyRmdpdCUyRmtlcm5lbHMlMkZleGFtcGxlcyUyRmtlcm5lbHMlMkZteWtlcm5lbA==",highlighted:"$ kernel-builder init --name myorg/mykernel\nInitialized `myorg/mykernel` at /home/daniel/git/kernels/examples/kernels/mykernel",lang:"bash",wrap:!1}}),z=new y({props:{code:"JTI0JTIwa2VybmVsLWJ1aWxkZXIlMjBpbml0JTIwLS1uYW1lJTIwbXlvcmclMkZteWtlcm5lbCUyMC0tYmFja2VuZHMlMjB4cHU=",highlighted:"$ kernel-builder init --name myorg/mykernel --backends xpu",lang:"bash",wrap:!1}}),D=new y({props:{code:"JTI0JTIwa2VybmVsLWJ1aWxkZXIlMjBpbml0JTIwLS1uYW1lJTIwbXlvcmclMkZteWtlcm5lbCUyMC0tYmFja2VuZHMlMjBjdWRhJTIweHB1JTBBSW5pdGlhbGl6ZWQlMjAlNjBteW9yZyUyRm15a2VybmVsJTYwJTIwYXQlMjAlMkZob21lJTJGZGFuaWVsJTJGZ2l0JTJGa2VybmVscyUyRmV4YW1wbGVzJTJGa2VybmVscyUyRm15a2VybmVs",highlighted:"$ kernel-builder init --name myorg/mykernel --backends cuda xpu\nInitialized `myorg/mykernel` at /home/daniel/git/kernels/examples/kernels/mykernel",lang:"bash",wrap:!1}}),ee=new f({props:{title:"Kernel project layout",local:"kernel-project-layout",headingTag:"h2"}}),le=new y({props:{code:"bXlrZXJuZWwlMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBiZW5jaG1hcmtzJTBBJUUyJTk0JTgyJTIwJTIwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwYmVuY2htYXJrLnB5JTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwYnVpbGQudG9tbCUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMENBUkQubWQlMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBleGFtcGxlLnB5JTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwZmxha2Uubml4JTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwbXlrZXJuZWxfY3VkYSUwQSVFMiU5NCU4MiUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMG15a2VybmVsLmN1JTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwdGVzdHMlMEElRTIlOTQlODIlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBfX2luaXRfXy5weSUwQSVFMiU5NCU4MiUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMHRlc3RfbXlrZXJuZWwucHklMEElRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjB0b3JjaC1leHQlMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBteWtlcm5lbCUwQSVFMiU5NCU4MiUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMF9faW5pdF9fLnB5JTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwdG9yY2hfYmluZGluZy5jcHAlMEElRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjB0b3JjaF9iaW5kaW5nLmg=",highlighted:`mykernel | |
| ├── benchmarks | |
| │ └── benchmark.py | |
| ├── build.toml | |
| ├── CARD.md | |
| ├── example.py | |
| ├── flake.nix | |
| ├── mykernel_cuda | |
| │ └── mykernel.cu | |
| ├── tests | |
| │ ├── __init__.py | |
| │ └── test_mykernel.py | |
| └── torch-ext | |
| ├── mykernel | |
| │ └── __init__.py | |
| ├── torch_binding.cpp | |
| └── torch_binding.h`,lang:"text",wrap:!1}}),ie=new f({props:{title:"build.toml",local:"buildtoml",headingTag:"h2"}}),oe=new y({props:{code:"JTVCZ2VuZXJhbCU1RCUwQWJhY2tlbmRzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIyY3VkYSUyMiUyQyUwQSU1RCUwQW5hbWUlMjAlM0QlMjAlMjJteWtlcm5lbCUyMiUwQXZlcnNpb24lMjAlM0QlMjAxJTBBJTBBJTVCZ2VuZXJhbC5odWIlNUQlMEFyZXBvLWlkJTIwJTNEJTIwJTIybXlvcmclMkZteWtlcm5lbCUyMiUwQSUwQSU1QnRvcmNoJTVEJTBBc3JjJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIydG9yY2gtZXh0JTJGdG9yY2hfYmluZGluZy5jcHAlMjIlMkMlMEElMjAlMjAlMjJ0b3JjaC1leHQlMkZ0b3JjaF9iaW5kaW5nLmglMjIlMkMlMEElNUQlMEElMEElNUJrZXJuZWwubXlrZXJuZWwlNUQlMEFiYWNrZW5kJTIwJTNEJTIwJTIyY3VkYSUyMiUwQWRlcGVuZHMlMjAlM0QlMjAlNUIlMjJ0b3JjaCUyMiU1RCUwQXNyYyUyMCUzRCUyMCU1QiUyMm15a2VybmVsX2N1ZGElMkZteWtlcm5lbC5jdSUyMiU1RCUwQSUyMyUyMElmJTIwdGhlJTIwa2VybmVsJTIwaXMlMjBvbmx5JTIwc3VwcG9ydGVkJTIwb24lMjBzcGVjaWZpYyUyMGNhcGFiaWxpdGllcyUyQyUyMHNldCUyMHRoZSUwQSUyMyUyMGN1ZGEtY2FwYWJpbGl0aWVzJTIwb3B0aW9uJTNBJTBBJTIzJTBBJTIzJTIwY3VkYS1jYXBhYmlsaXRpZXMlMjAlM0QlMjAlNUIlMjAlMjI5LjAlMjIlMkMlMjAlMjIxMC4wJTIyJTJDJTIwJTIyMTIuMCUyMiUyMCU1RA==",highlighted:`<span class="hljs-section">[general]</span> | |
| <span class="hljs-attr">backends</span> = [ | |
| <span class="hljs-string">"cuda"</span>, | |
| ] | |
| <span class="hljs-attr">name</span> = <span class="hljs-string">"mykernel"</span> | |
| <span class="hljs-attr">version</span> = <span class="hljs-number">1</span> | |
| <span class="hljs-section">[general.hub]</span> | |
| <span class="hljs-attr">repo-id</span> = <span class="hljs-string">"myorg/mykernel"</span> | |
| <span class="hljs-section">[torch]</span> | |
| <span class="hljs-attr">src</span> = [ | |
| <span class="hljs-string">"torch-ext/torch_binding.cpp"</span>, | |
| <span class="hljs-string">"torch-ext/torch_binding.h"</span>, | |
| ] | |
| <span class="hljs-section">[kernel.mykernel]</span> | |
| <span class="hljs-attr">backend</span> = <span class="hljs-string">"cuda"</span> | |
| <span class="hljs-attr">depends</span> = [<span class="hljs-string">"torch"</span>] | |
| <span class="hljs-attr">src</span> = [<span class="hljs-string">"mykernel_cuda/mykernel.cu"</span>] | |
| <span class="hljs-comment"># If the kernel is only supported on specific capabilities, set the</span> | |
| <span class="hljs-comment"># cuda-capabilities option:</span> | |
| <span class="hljs-comment">#</span> | |
| <span class="hljs-comment"># cuda-capabilities = [ "9.0", "10.0", "12.0" ]</span>`,lang:"toml",wrap:!1}}),pe=new f({props:{title:"general",local:"general",headingTag:"h3"}}),de=new f({props:{title:"general.hub",local:"generalhub",headingTag:"h3"}}),ue=new f({props:{title:"general.cuda",local:"generalcuda",headingTag:"h3"}}),fe=new f({props:{title:"Framework sections",local:"framework-sections",headingTag:"h3"}}),be=new f({props:{title:"torch",local:"torch",headingTag:"h3"}}),ke=new y({props:{code:"JTVCdG9yY2guc3RhYmxlLWFiaSU1RCUwQWN1ZGElMjAlM0QlMjAlMjIyLjExJTIyJTBBcm9jbSUyMCUzRCUyMCUyMjIuOSUyMg==",highlighted:`<span class="hljs-section">[torch.stable-abi]</span> | |
| <span class="hljs-attr">cuda</span> = <span class="hljs-string">"2.11"</span> | |
| <span class="hljs-attr">rocm</span> = <span class="hljs-string">"2.9"</span>`,lang:"toml",wrap:!1}}),ge=new f({props:{title:"tvm-ffi",local:"tvm-ffi",headingTag:"h3"}}),Ue=new f({props:{title:"torch-noarch",local:"torch-noarch",headingTag:"h3"}}),je=new f({props:{title:"kernel.<name>",local:"kernelltnamegt",headingTag:"h3"}}),Le=new f({props:{title:"cuda",local:"cuda",headingTag:"h4"}}),Ve=new f({props:{title:"rocm",local:"rocm",headingTag:"h4"}}),Re=new f({props:{title:"xpu",local:"xpu",headingTag:"h4"}}),We=new f({props:{title:"cpu",local:"cpu",headingTag:"h3"}}),Ae=new f({props:{title:"Torch bindings",local:"torch-bindings",headingTag:"h2"}}),Qe=new f({props:{title:"Defining bindings",local:"defining-bindings",headingTag:"h3"}}),Xe=new y({props:{code:"JTIzcHJhZ21hJTIwb25jZSUwQSUwQSUyM2luY2x1ZGUlMjAlM0N0b3JjaCUyRnRvcmNoLmglM0UlMEElMEF2b2lkJTIwbXlrZXJuZWwodG9yY2glM0ElM0FUZW5zb3IlMjAlMjZvdXQlMkMlMjB0b3JjaCUzQSUzQVRlbnNvciUyMGNvbnN0JTIwJTI2aW5wdXQpJTNC",highlighted:`<span class="hljs-meta">#<span class="hljs-keyword">pragma</span> once</span> | |
| <span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><torch/torch.h></span></span> | |
| <span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">mykernel</span><span class="hljs-params">(torch::Tensor &out, torch::Tensor <span class="hljs-type">const</span> &input)</span></span>;`,lang:"cpp",wrap:!1}}),Fe=new y({props:{code:"JTIzaW5jbHVkZSUyMCUzQ3RvcmNoJTJGbGlicmFyeS5oJTNFJTBBJTBBJTIzaW5jbHVkZSUyMCUyMnJlZ2lzdHJhdGlvbi5oJTIyJTBBJTIzaW5jbHVkZSUyMCUyMnRvcmNoX2JpbmRpbmcuaCUyMiUwQSUwQVRPUkNIX0xJQlJBUllfRVhQQU5EKFRPUkNIX0VYVEVOU0lPTl9OQU1FJTJDJTIwb3BzKSUyMCU3QiUwQSUyMCUyMG9wcy5kZWYoJTIybXlrZXJuZWwoVGVuc29yISUyMG91dCUyQyUyMFRlbnNvciUyMGlucHV0KSUyMC0lM0UlMjAoKSUyMiklM0IlMEElMjNpZiUyMGRlZmluZWQoQ1VEQV9LRVJORUwpJTIwJTdDJTdDJTIwZGVmaW5lZChST0NNX0tFUk5FTCklMEElMjAlMjBvcHMuaW1wbCglMjJteWtlcm5lbCUyMiUyQyUyMHRvcmNoJTNBJTNBa0NVREElMkMlMjAlMjZteWtlcm5lbCklM0IlMEElMjNlbmRpZiUwQSU3RCUwQSUwQVJFR0lTVEVSX0VYVEVOU0lPTihUT1JDSF9FWFRFTlNJT05fTkFNRSk=",highlighted:`<span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><torch/library.h></span></span> | |
| <span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string">"registration.h"</span></span> | |
| <span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string">"torch_binding.h"</span></span> | |
| <span class="hljs-built_in">TORCH_LIBRARY_EXPAND</span>(TORCH_EXTENSION_NAME, ops) { | |
| ops.<span class="hljs-built_in">def</span>(<span class="hljs-string">"mykernel(Tensor! out, Tensor input) -> ()"</span>); | |
| <span class="hljs-meta">#<span class="hljs-keyword">if</span> defined(CUDA_KERNEL) || defined(ROCM_KERNEL)</span> | |
| ops.<span class="hljs-built_in">impl</span>(<span class="hljs-string">"mykernel"</span>, torch::kCUDA, &mykernel); | |
| <span class="hljs-meta">#<span class="hljs-keyword">endif</span></span> | |
| } | |
| <span class="hljs-built_in">REGISTER_EXTENSION</span>(TORCH_EXTENSION_NAME)`,lang:"cpp",wrap:!1}}),ze=new f({props:{title:"Using kernel functions from Python",local:"using-kernel-functions-from-python",headingTag:"h2"}}),Ke=new y({props:{code:"ZnJvbSUyMHR5cGluZyUyMGltcG9ydCUyME9wdGlvbmFsJTBBJTBBaW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwLl9vcHMlMjBpbXBvcnQlMjBvcHMlMEElMEElMEFkZWYlMjBteWtlcm5lbCh4JTNBJTIwdG9yY2guVGVuc29yJTJDJTIwb3V0JTNBJTIwT3B0aW9uYWwlNUJ0b3JjaC5UZW5zb3IlNUQlMjAlM0QlMjBOb25lKSUyMC0lM0UlMjB0b3JjaC5UZW5zb3IlM0ElMEElMjAlMjAlMjAlMjBpZiUyMG91dCUyMGlzJTIwTm9uZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG91dCUyMCUzRCUyMHRvcmNoLmVtcHR5X2xpa2UoeCklMEElMjAlMjAlMjAlMjBvcHMubXlrZXJuZWwob3V0JTJDJTIweCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBvdXQ=",highlighted:`<span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> <span class="hljs-type">Optional</span> | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> ._ops <span class="hljs-keyword">import</span> ops | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">mykernel</span>(<span class="hljs-params">x: torch.Tensor, out: <span class="hljs-type">Optional</span>[torch.Tensor] = <span class="hljs-literal">None</span></span>) -> torch.Tensor: | |
| <span class="hljs-keyword">if</span> out <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>: | |
| out = torch.empty_like(x) | |
| ops.mykernel(out, x) | |
| <span class="hljs-keyword">return</span> out`,lang:"python",wrap:!1}}),et=new f({props:{title:"Registering Torch operators",local:"registering-torch-operators",headingTag:"h2"}}),nt=new y({props:{code:"JTQwdG9yY2gubGlicmFyeS5yZWdpc3Rlcl9mYWtlKCUyMnJlbHUlM0ElM0FyZWx1X2Z3ZCUyMiklMEFkZWYlMjByZWx1X2Z3ZF9mYWtlKGlucHV0JTNBJTIwdG9yY2guVGVuc29yKSUyMC0lM0UlMjB0b3JjaC5UZW5zb3IlM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjB0b3JjaC5lbXB0eV9saWtlKGlucHV0KQ==",highlighted:`<span class="hljs-meta">@torch.library.register_fake(<span class="hljs-params"><span class="hljs-string">"relu::relu_fwd"</span></span>)</span> | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">relu_fwd_fake</span>(<span class="hljs-params"><span class="hljs-built_in">input</span>: torch.Tensor</span>) -> torch.Tensor: | |
| <span class="hljs-keyword">return</span> torch.empty_like(<span class="hljs-built_in">input</span>)`,lang:"python",wrap:!1}}),it=new y({props:{code:"ZnJvbSUyMC5fb3BzJTIwaW1wb3J0JTIwYWRkX29wX25hbWVzcGFjZV9wcmVmaXglMEElMEElNDB0b3JjaC5saWJyYXJ5LnJlZ2lzdGVyX2Zha2UoYWRkX29wX25hbWVzcGFjZV9wcmVmaXgoJTIycmVsdV9md2QlMjIpKSUwQWRlZiUyMHJlbHVfZndkX2Zha2UoaW5wdXQlM0ElMjB0b3JjaC5UZW5zb3IpJTIwLSUzRSUyMHRvcmNoLlRlbnNvciUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMHRvcmNoLmVtcHR5X2xpa2UoaW5wdXQp",highlighted:`<span class="hljs-keyword">from</span> ._ops <span class="hljs-keyword">import</span> add_op_namespace_prefix | |
| <span class="hljs-meta">@torch.library.register_fake(<span class="hljs-params">add_op_namespace_prefix(<span class="hljs-params"><span class="hljs-string">"relu_fwd"</span></span>)</span>)</span> | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">relu_fwd_fake</span>(<span class="hljs-params"><span class="hljs-built_in">input</span>: torch.Tensor</span>) -> torch.Tensor: | |
| <span class="hljs-keyword">return</span> torch.empty_like(<span class="hljs-built_in">input</span>)`,lang:"python",wrap:!1}}),rt=new y({props:{code:"JTQwc29tZV9pbmRpcmVjdGlvbl9mb3JfcmVnaXN0ZXJfZmFrZSglMjJyZWx1JTNBJTNBcmVsdV9md2QlMjIpJTBBZGVmJTIwcmVsdV9md2RfZmFrZShpbnB1dCUzQSUyMHRvcmNoLlRlbnNvciklMjAtJTNFJTIwdG9yY2guVGVuc29yJTNBJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwdG9yY2guZW1wdHlfbGlrZShpbnB1dCk=",highlighted:`<span class="hljs-meta">@some_indirection_for_register_fake(<span class="hljs-params"><span class="hljs-string">"relu::relu_fwd"</span></span>)</span> | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">relu_fwd_fake</span>(<span class="hljs-params"><span class="hljs-built_in">input</span>: torch.Tensor</span>) -> torch.Tensor: | |
| <span class="hljs-keyword">return</span> torch.empty_like(<span class="hljs-built_in">input</span>)`,lang:"python",wrap:!1}}),pt=new f({props:{title:"Kernel tests",local:"kernel-tests",headingTag:"h2"}}),ct=new f({props:{title:"Use get_kernel in tests",local:"use-getkernel-in-tests",headingTag:"h3"}}),mt=new y({props:{code:"aW1wb3J0JTIwa2VybmVscyUwQWltcG9ydCUyMHRvcmNoJTBBaW1wb3J0JTIwdG9yY2gubm4uZnVuY3Rpb25hbCUyMGFzJTIwRiUwQSUwQXJlbHUlMjAlM0QlMjBrZXJuZWxzLmdldF9rZXJuZWwoJTIya2VybmVscy1jb21tdW5pdHklMkZyZWx1JTIyJTJDJTIwdmVyc2lvbiUzRDEpJTBBJTBBZGVmJTIwdGVzdF9yZWx1KCklM0ElMEElMjAlMjAlMjAlMjB4JTIwJTNEJTIwdG9yY2gucmFuZG4oMTAyNCUyQyUyMDEwMjQlMkMlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MzIlMkMlMjBkZXZpY2UlM0R0b3JjaC5kZXZpY2UoJTIyY3VkYSUyMikpJTBBJTIwJTIwJTIwJTIweSUyMCUzRCUyMHJlbHUucmVsdSh4JTJDJTIwdG9yY2guZW1wdHlfbGlrZSh4KSklMEElMjAlMjAlMjAlMjB5X3JlZiUyMCUzRCUyMEYucmVsdSh4KSUwQSUyMCUyMCUyMCUyMHRvcmNoLnRlc3RpbmcuYXNzZXJ0X2Nsb3NlKHlfcmVmJTJDJTIweSk=",highlighted:`<span class="hljs-keyword">import</span> kernels | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">import</span> torch.nn.functional <span class="hljs-keyword">as</span> F | |
| relu = kernels.get_kernel(<span class="hljs-string">"kernels-community/relu"</span>, version=<span class="hljs-number">1</span>) | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">test_relu</span>(): | |
| x = torch.randn(<span class="hljs-number">1024</span>, <span class="hljs-number">1024</span>, dtype=torch.float32, device=torch.device(<span class="hljs-string">"cuda"</span>)) | |
| y = relu.relu(x, torch.empty_like(x)) | |
| y_ref = F.relu(x) | |
| torch.testing.assert_close(y_ref, y)`,lang:"python",wrap:!1}}),ht=new f({props:{title:"Mark CI tests",local:"mark-ci-tests",headingTag:"h3"}}),Tt=new y({props:{code:"aW1wb3J0JTIwcHl0ZXN0JTBBJTBBJTQwcHl0ZXN0Lm1hcmsua2VybmVsc19jaSUwQWRlZiUyMHRlc3RfbXlrZXJuZWwoKSUzQSUwQSUyMCUyMC4uLg==",highlighted:`<span class="hljs-keyword">import</span> pytest | |
| <span class="hljs-meta">@pytest.mark.kernels_ci</span> | |
| <span class="hljs-keyword">def</span> <span class="hljs-title function_">test_mykernel</span>(): | |
| ...`,lang:"python",wrap:!1}}),Mt=new y({props:{code:"JTI0JTIwbml4JTIwcnVuJTIwLiUyM2NpLXRlc3Q=",highlighted:'$ nix run .<span class="hljs-comment">#ci-test</span>',lang:"bash",wrap:!1}}),gt=new y({props:{code:"JTI0JTIwbml4JTIwcnVuJTIwLiUyM2NpVGVzdHMudG9yY2gyMTAtY3h4MTEtY3B1LXg4Nl82NC1saW51eA==",highlighted:'$ nix run .<span class="hljs-comment">#ciTests.torch210-cxx11-cpu-x86_64-linux</span>',lang:"bash",wrap:!1}}),$t=new f({props:{title:"Kernel docs",local:"kernel-docs",headingTag:"h2"}}),Ct=new Ii({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/builder/writing-kernels.md"}}),{c(){g=a("meta"),Nt=s(),Bt=a("p"),Wt=s(),p(U.$$.fragment),Et=s(),p(J.$$.fragment),At=s(),p(v.$$.fragment),Qt=s(),C=a("p"),C.innerHTML=ss,qt=s(),j=a("ul"),j.innerHTML=is,St=s(),x=a("p"),x.innerHTML=as,Gt=s(),I=a("ul"),I.innerHTML=os,Xt=s(),H=a("p"),H.innerHTML=rs,Pt=s(),_=a("p"),_.innerHTML=ps,Ft=s(),w=a("blockquote"),w.innerHTML=cs,Yt=s(),p(L.$$.fragment),zt=s(),p(Z.$$.fragment),Ot=s(),V=a("p"),V.innerHTML=ds,Dt=s(),p(B.$$.fragment),Kt=s(),R=a("p"),R.textContent=ms,el=s(),N=a("ol"),N.innerHTML=us,tl=s(),W=a("p"),W.innerHTML=hs,ll=s(),p(E.$$.fragment),nl=s(),A=a("p"),A.innerHTML=fs,sl=s(),p(Q.$$.fragment),il=s(),q=a("p"),q.innerHTML=Ts,al=s(),S=a("p"),S.textContent=ys,ol=s(),p(G.$$.fragment),rl=s(),X=a("p"),X.innerHTML=bs,pl=s(),p(P.$$.fragment),cl=s(),F=a("p"),F.innerHTML=Ms,dl=s(),Y=a("p"),Y.innerHTML=ks,ml=s(),p(z.$$.fragment),ul=s(),O=a("p"),O.innerHTML=gs,hl=s(),p(D.$$.fragment),fl=s(),K=a("p"),K.innerHTML=ws,Tl=s(),p(ee.$$.fragment),yl=s(),te=a("p"),te.textContent=$s,bl=s(),p(le.$$.fragment),Ml=s(),ne=a("p"),ne.textContent=Us,kl=s(),se=a("ul"),se.innerHTML=Js,gl=s(),p(ie.$$.fragment),wl=s(),ae=a("p"),ae.innerHTML=vs,$l=s(),p(oe.$$.fragment),Ul=s(),re=a("p"),re.innerHTML=Cs,Jl=s(),p(pe.$$.fragment),vl=s(),ce=a("ul"),ce.innerHTML=js,Cl=s(),p(de.$$.fragment),jl=s(),me=a("ul"),me.innerHTML=xs,xl=s(),p(ue.$$.fragment),Il=s(),he=a("ul"),he.innerHTML=Is,Hl=s(),p(fe.$$.fragment),_l=s(),Te=a("p"),Te.textContent=Hs,Ll=s(),ye=a("ul"),ye.innerHTML=_s,Zl=s(),p(be.$$.fragment),Vl=s(),Me=a("p"),Me.textContent=Ls,Bl=s(),b=a("ul"),jt=a("li"),jt.innerHTML=Zs,Fn=s(),xt=a("li"),xt.innerHTML=Vs,Yn=s(),It=a("li"),It.innerHTML=Bs,zn=s(),Ht=a("li"),Ht.innerHTML=Rs,On=s(),_t=a("li"),_t.innerHTML=Ns,Dn=s(),k=a("li"),Lt=a("p"),Lt.innerHTML=Ws,Kn=s(),Zt=a("p"),Zt.textContent=Es,es=s(),p(ke.$$.fragment),ts=s(),Vt=a("p"),Vt.innerHTML=As,Rl=s(),p(ge.$$.fragment),Nl=s(),we=a("p"),we.textContent=Qs,Wl=s(),$e=a("ul"),$e.innerHTML=qs,El=s(),p(Ue.$$.fragment),Al=s(),Je=a("p"),Je.innerHTML=Ss,Ql=s(),ve=a("p"),ve.innerHTML=Gs,ql=s(),Ce=a("ul"),Ce.innerHTML=Xs,Sl=s(),p(je.$$.fragment),Gl=s(),xe=a("p"),xe.innerHTML=Ps,Xl=s(),Ie=a("p"),Ie.textContent=Fs,Pl=s(),He=a("ul"),He.innerHTML=Ys,Fl=s(),_e=a("p"),_e.textContent=zs,Yl=s(),p(Le.$$.fragment),zl=s(),Ze=a("ul"),Ze.innerHTML=Os,Ol=s(),p(Ve.$$.fragment),Dl=s(),Be=a("ul"),Be.innerHTML=Ds,Kl=s(),p(Re.$$.fragment),en=s(),Ne=a("ul"),Ne.innerHTML=Ks,tn=s(),p(We.$$.fragment),ln=s(),Ee=a("ul"),Ee.innerHTML=ei,nn=s(),p(Ae.$$.fragment),sn=s(),p(Qe.$$.fragment),an=s(),qe=a("p"),qe.textContent=ti,on=s(),Se=a("ul"),Se.innerHTML=li,rn=s(),Ge=a("p"),Ge.innerHTML=ni,pn=s(),p(Xe.$$.fragment),cn=s(),Pe=a("p"),Pe.innerHTML=si,dn=s(),p(Fe.$$.fragment),mn=s(),Ye=a("p"),Ye.innerHTML=ii,un=s(),p(ze.$$.fragment),hn=s(),Oe=a("p"),Oe.innerHTML=ai,fn=s(),De=a("p"),De.innerHTML=oi,Tn=s(),p(Ke.$$.fragment),yn=s(),p(et.$$.fragment),bn=s(),tt=a("p"),tt.innerHTML=ri,Mn=s(),lt=a("p"),lt.innerHTML=pi,kn=s(),p(nt.$$.fragment),gn=s(),st=a("p"),st.textContent=ci,wn=s(),p(it.$$.fragment),$n=s(),at=a("p"),at.innerHTML=di,Un=s(),ot=a("p"),ot.innerHTML=mi,Jn=s(),p(rt.$$.fragment),vn=s(),p(pt.$$.fragment),Cn=s(),p(ct.$$.fragment),jn=s(),dt=a("p"),dt.innerHTML=ui,xn=s(),p(mt.$$.fragment),In=s(),ut=a("p"),ut.innerHTML=hi,Hn=s(),p(ht.$$.fragment),_n=s(),ft=a("p"),ft.innerHTML=fi,Ln=s(),p(Tt.$$.fragment),Zn=s(),yt=a("p"),yt.textContent=Ti,Vn=s(),bt=a("p"),bt.textContent=yi,Bn=s(),p(Mt.$$.fragment),Rn=s(),kt=a("p"),kt.innerHTML=bi,Nn=s(),p(gt.$$.fragment),Wn=s(),wt=a("p"),wt.innerHTML=Mi,En=s(),p($t.$$.fragment),An=s(),Ut=a("p"),Ut.innerHTML=ki,Qn=s(),Jt=a("p"),Jt.innerHTML=gi,qn=s(),vt=a("p"),vt.innerHTML=wi,Sn=s(),p(Ct.$$.fragment),Gn=s(),Rt=a("p"),this.h()},l(e){const t=ji("svelte-u9bgzb",document.head);g=o(t,"META",{name:!0,content:!0}),t.forEach(l),Nt=i(e),Bt=o(e,"P",{}),Pn(Bt).forEach(l),Wt=i(e),c(U.$$.fragment,e),Et=i(e),c(J.$$.fragment,e),At=i(e),c(v.$$.fragment,e),Qt=i(e),C=o(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-1i1c9ni"&&(C.innerHTML=ss),qt=i(e),j=o(e,"UL",{"data-svelte-h":!0}),r(j)!=="svelte-1odnsz3"&&(j.innerHTML=is),St=i(e),x=o(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-1gp9ycj"&&(x.innerHTML=as),Gt=i(e),I=o(e,"UL",{"data-svelte-h":!0}),r(I)!=="svelte-ysrhph"&&(I.innerHTML=os),Xt=i(e),H=o(e,"P",{"data-svelte-h":!0}),r(H)!=="svelte-vy7wcb"&&(H.innerHTML=rs),Pt=i(e),_=o(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-o9ssdv"&&(_.innerHTML=ps),Ft=i(e),w=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(w)!=="svelte-43d87d"&&(w.innerHTML=cs),Yt=i(e),c(L.$$.fragment,e),zt=i(e),c(Z.$$.fragment,e),Ot=i(e),V=o(e,"P",{"data-svelte-h":!0}),r(V)!=="svelte-96m8sj"&&(V.innerHTML=ds),Dt=i(e),c(B.$$.fragment,e),Kt=i(e),R=o(e,"P",{"data-svelte-h":!0}),r(R)!=="svelte-1b4vj4e"&&(R.textContent=ms),el=i(e),N=o(e,"OL",{"data-svelte-h":!0}),r(N)!=="svelte-3arzgs"&&(N.innerHTML=us),tl=i(e),W=o(e,"P",{"data-svelte-h":!0}),r(W)!=="svelte-1ihjqjm"&&(W.innerHTML=hs),ll=i(e),c(E.$$.fragment,e),nl=i(e),A=o(e,"P",{"data-svelte-h":!0}),r(A)!=="svelte-1cac215"&&(A.innerHTML=fs),sl=i(e),c(Q.$$.fragment,e),il=i(e),q=o(e,"P",{"data-svelte-h":!0}),r(q)!=="svelte-4lye9k"&&(q.innerHTML=Ts),al=i(e),S=o(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-g5i707"&&(S.textContent=ys),ol=i(e),c(G.$$.fragment,e),rl=i(e),X=o(e,"P",{"data-svelte-h":!0}),r(X)!=="svelte-cn9mkc"&&(X.innerHTML=bs),pl=i(e),c(P.$$.fragment,e),cl=i(e),F=o(e,"P",{"data-svelte-h":!0}),r(F)!=="svelte-1prqyz3"&&(F.innerHTML=Ms),dl=i(e),Y=o(e,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-1exh4w8"&&(Y.innerHTML=ks),ml=i(e),c(z.$$.fragment,e),ul=i(e),O=o(e,"P",{"data-svelte-h":!0}),r(O)!=="svelte-1poutmy"&&(O.innerHTML=gs),hl=i(e),c(D.$$.fragment,e),fl=i(e),K=o(e,"P",{"data-svelte-h":!0}),r(K)!=="svelte-s84xza"&&(K.innerHTML=ws),Tl=i(e),c(ee.$$.fragment,e),yl=i(e),te=o(e,"P",{"data-svelte-h":!0}),r(te)!=="svelte-6oo725"&&(te.textContent=$s),bl=i(e),c(le.$$.fragment,e),Ml=i(e),ne=o(e,"P",{"data-svelte-h":!0}),r(ne)!=="svelte-1lqdx4"&&(ne.textContent=Us),kl=i(e),se=o(e,"UL",{"data-svelte-h":!0}),r(se)!=="svelte-c8vtob"&&(se.innerHTML=Js),gl=i(e),c(ie.$$.fragment,e),wl=i(e),ae=o(e,"P",{"data-svelte-h":!0}),r(ae)!=="svelte-1hgp1cr"&&(ae.innerHTML=vs),$l=i(e),c(oe.$$.fragment,e),Ul=i(e),re=o(e,"P",{"data-svelte-h":!0}),r(re)!=="svelte-pgruc9"&&(re.innerHTML=Cs),Jl=i(e),c(pe.$$.fragment,e),vl=i(e),ce=o(e,"UL",{"data-svelte-h":!0}),r(ce)!=="svelte-gz30jb"&&(ce.innerHTML=js),Cl=i(e),c(de.$$.fragment,e),jl=i(e),me=o(e,"UL",{"data-svelte-h":!0}),r(me)!=="svelte-12rq95i"&&(me.innerHTML=xs),xl=i(e),c(ue.$$.fragment,e),Il=i(e),he=o(e,"UL",{"data-svelte-h":!0}),r(he)!=="svelte-1fzn2"&&(he.innerHTML=Is),Hl=i(e),c(fe.$$.fragment,e),_l=i(e),Te=o(e,"P",{"data-svelte-h":!0}),r(Te)!=="svelte-gxdqgh"&&(Te.textContent=Hs),Ll=i(e),ye=o(e,"UL",{"data-svelte-h":!0}),r(ye)!=="svelte-124jabx"&&(ye.innerHTML=_s),Zl=i(e),c(be.$$.fragment,e),Vl=i(e),Me=o(e,"P",{"data-svelte-h":!0}),r(Me)!=="svelte-kgzfey"&&(Me.textContent=Ls),Bl=i(e),b=o(e,"UL",{});var M=Pn(b);jt=o(M,"LI",{"data-svelte-h":!0}),r(jt)!=="svelte-u4hke3"&&(jt.innerHTML=Zs),Fn=i(M),xt=o(M,"LI",{"data-svelte-h":!0}),r(xt)!=="svelte-zt3xci"&&(xt.innerHTML=Vs),Yn=i(M),It=o(M,"LI",{"data-svelte-h":!0}),r(It)!=="svelte-wnkhvl"&&(It.innerHTML=Bs),zn=i(M),Ht=o(M,"LI",{"data-svelte-h":!0}),r(Ht)!=="svelte-17lju3r"&&(Ht.innerHTML=Rs),On=i(M),_t=o(M,"LI",{"data-svelte-h":!0}),r(_t)!=="svelte-1r69pen"&&(_t.innerHTML=Ns),Dn=i(M),k=o(M,"LI",{});var $=Pn(k);Lt=o($,"P",{"data-svelte-h":!0}),r(Lt)!=="svelte-120bx7y"&&(Lt.innerHTML=Ws),Kn=i($),Zt=o($,"P",{"data-svelte-h":!0}),r(Zt)!=="svelte-1tr2sth"&&(Zt.textContent=Es),es=i($),c(ke.$$.fragment,$),ts=i($),Vt=o($,"P",{"data-svelte-h":!0}),r(Vt)!=="svelte-1f5kb1u"&&(Vt.innerHTML=As),$.forEach(l),M.forEach(l),Rl=i(e),c(ge.$$.fragment,e),Nl=i(e),we=o(e,"P",{"data-svelte-h":!0}),r(we)!=="svelte-o8lm5s"&&(we.textContent=Qs),Wl=i(e),$e=o(e,"UL",{"data-svelte-h":!0}),r($e)!=="svelte-1xjqtde"&&($e.innerHTML=qs),El=i(e),c(Ue.$$.fragment,e),Al=i(e),Je=o(e,"P",{"data-svelte-h":!0}),r(Je)!=="svelte-zn9bnz"&&(Je.innerHTML=Ss),Ql=i(e),ve=o(e,"P",{"data-svelte-h":!0}),r(ve)!=="svelte-1fs9ps3"&&(ve.innerHTML=Gs),ql=i(e),Ce=o(e,"UL",{"data-svelte-h":!0}),r(Ce)!=="svelte-1oz6tus"&&(Ce.innerHTML=Xs),Sl=i(e),c(je.$$.fragment,e),Gl=i(e),xe=o(e,"P",{"data-svelte-h":!0}),r(xe)!=="svelte-1weg0gu"&&(xe.innerHTML=Ps),Xl=i(e),Ie=o(e,"P",{"data-svelte-h":!0}),r(Ie)!=="svelte-1al5myg"&&(Ie.textContent=Fs),Pl=i(e),He=o(e,"UL",{"data-svelte-h":!0}),r(He)!=="svelte-1fbzu1m"&&(He.innerHTML=Ys),Fl=i(e),_e=o(e,"P",{"data-svelte-h":!0}),r(_e)!=="svelte-1mf578x"&&(_e.textContent=zs),Yl=i(e),c(Le.$$.fragment,e),zl=i(e),Ze=o(e,"UL",{"data-svelte-h":!0}),r(Ze)!=="svelte-3vtlb2"&&(Ze.innerHTML=Os),Ol=i(e),c(Ve.$$.fragment,e),Dl=i(e),Be=o(e,"UL",{"data-svelte-h":!0}),r(Be)!=="svelte-mx7mxt"&&(Be.innerHTML=Ds),Kl=i(e),c(Re.$$.fragment,e),en=i(e),Ne=o(e,"UL",{"data-svelte-h":!0}),r(Ne)!=="svelte-1u3m3l7"&&(Ne.innerHTML=Ks),tn=i(e),c(We.$$.fragment,e),ln=i(e),Ee=o(e,"UL",{"data-svelte-h":!0}),r(Ee)!=="svelte-10okur"&&(Ee.innerHTML=ei),nn=i(e),c(Ae.$$.fragment,e),sn=i(e),c(Qe.$$.fragment,e),an=i(e),qe=o(e,"P",{"data-svelte-h":!0}),r(qe)!=="svelte-r7rot5"&&(qe.textContent=ti),on=i(e),Se=o(e,"UL",{"data-svelte-h":!0}),r(Se)!=="svelte-poxr41"&&(Se.innerHTML=li),rn=i(e),Ge=o(e,"P",{"data-svelte-h":!0}),r(Ge)!=="svelte-1ikzb58"&&(Ge.innerHTML=ni),pn=i(e),c(Xe.$$.fragment,e),cn=i(e),Pe=o(e,"P",{"data-svelte-h":!0}),r(Pe)!=="svelte-5ja9lk"&&(Pe.innerHTML=si),dn=i(e),c(Fe.$$.fragment,e),mn=i(e),Ye=o(e,"P",{"data-svelte-h":!0}),r(Ye)!=="svelte-ssih46"&&(Ye.innerHTML=ii),un=i(e),c(ze.$$.fragment,e),hn=i(e),Oe=o(e,"P",{"data-svelte-h":!0}),r(Oe)!=="svelte-1y8rjsx"&&(Oe.innerHTML=ai),fn=i(e),De=o(e,"P",{"data-svelte-h":!0}),r(De)!=="svelte-a3yu8e"&&(De.innerHTML=oi),Tn=i(e),c(Ke.$$.fragment,e),yn=i(e),c(et.$$.fragment,e),bn=i(e),tt=o(e,"P",{"data-svelte-h":!0}),r(tt)!=="svelte-xosw3t"&&(tt.innerHTML=ri),Mn=i(e),lt=o(e,"P",{"data-svelte-h":!0}),r(lt)!=="svelte-a5yx0v"&&(lt.innerHTML=pi),kn=i(e),c(nt.$$.fragment,e),gn=i(e),st=o(e,"P",{"data-svelte-h":!0}),r(st)!=="svelte-9b7ddb"&&(st.textContent=ci),wn=i(e),c(it.$$.fragment,e),$n=i(e),at=o(e,"P",{"data-svelte-h":!0}),r(at)!=="svelte-4caz4s"&&(at.innerHTML=di),Un=i(e),ot=o(e,"P",{"data-svelte-h":!0}),r(ot)!=="svelte-hkktty"&&(ot.innerHTML=mi),Jn=i(e),c(rt.$$.fragment,e),vn=i(e),c(pt.$$.fragment,e),Cn=i(e),c(ct.$$.fragment,e),jn=i(e),dt=o(e,"P",{"data-svelte-h":!0}),r(dt)!=="svelte-1ssa1lv"&&(dt.innerHTML=ui),xn=i(e),c(mt.$$.fragment,e),In=i(e),ut=o(e,"P",{"data-svelte-h":!0}),r(ut)!=="svelte-1ykkqzk"&&(ut.innerHTML=hi),Hn=i(e),c(ht.$$.fragment,e),_n=i(e),ft=o(e,"P",{"data-svelte-h":!0}),r(ft)!=="svelte-1crats4"&&(ft.innerHTML=fi),Ln=i(e),c(Tt.$$.fragment,e),Zn=i(e),yt=o(e,"P",{"data-svelte-h":!0}),r(yt)!=="svelte-1uzdod8"&&(yt.textContent=Ti),Vn=i(e),bt=o(e,"P",{"data-svelte-h":!0}),r(bt)!=="svelte-s01sgi"&&(bt.textContent=yi),Bn=i(e),c(Mt.$$.fragment,e),Rn=i(e),kt=o(e,"P",{"data-svelte-h":!0}),r(kt)!=="svelte-1ucbtrx"&&(kt.innerHTML=bi),Nn=i(e),c(gt.$$.fragment,e),Wn=i(e),wt=o(e,"P",{"data-svelte-h":!0}),r(wt)!=="svelte-gcopz4"&&(wt.innerHTML=Mi),En=i(e),c($t.$$.fragment,e),An=i(e),Ut=o(e,"P",{"data-svelte-h":!0}),r(Ut)!=="svelte-11q3n4g"&&(Ut.innerHTML=ki),Qn=i(e),Jt=o(e,"P",{"data-svelte-h":!0}),r(Jt)!=="svelte-zjr5ot"&&(Jt.innerHTML=gi),qn=i(e),vt=o(e,"P",{"data-svelte-h":!0}),r(vt)!=="svelte-rt0n0n"&&(vt.innerHTML=wi),Sn=i(e),c(Ct.$$.fragment,e),Gn=i(e),Rt=o(e,"P",{}),Pn(Rt).forEach(l),this.h()},h(){ls(g,"name","hf:doc:metadata"),ls(g,"content",_i),ls(w,"class","tip")},m(e,t){T(document.head,g),n(e,Nt,t),n(e,Bt,t),n(e,Wt,t),d(U,e,t),n(e,Et,t),d(J,e,t),n(e,At,t),d(v,e,t),n(e,Qt,t),n(e,C,t),n(e,qt,t),n(e,j,t),n(e,St,t),n(e,x,t),n(e,Gt,t),n(e,I,t),n(e,Xt,t),n(e,H,t),n(e,Pt,t),n(e,_,t),n(e,Ft,t),n(e,w,t),n(e,Yt,t),d(L,e,t),n(e,zt,t),d(Z,e,t),n(e,Ot,t),n(e,V,t),n(e,Dt,t),d(B,e,t),n(e,Kt,t),n(e,R,t),n(e,el,t),n(e,N,t),n(e,tl,t),n(e,W,t),n(e,ll,t),d(E,e,t),n(e,nl,t),n(e,A,t),n(e,sl,t),d(Q,e,t),n(e,il,t),n(e,q,t),n(e,al,t),n(e,S,t),n(e,ol,t),d(G,e,t),n(e,rl,t),n(e,X,t),n(e,pl,t),d(P,e,t),n(e,cl,t),n(e,F,t),n(e,dl,t),n(e,Y,t),n(e,ml,t),d(z,e,t),n(e,ul,t),n(e,O,t),n(e,hl,t),d(D,e,t),n(e,fl,t),n(e,K,t),n(e,Tl,t),d(ee,e,t),n(e,yl,t),n(e,te,t),n(e,bl,t),d(le,e,t),n(e,Ml,t),n(e,ne,t),n(e,kl,t),n(e,se,t),n(e,gl,t),d(ie,e,t),n(e,wl,t),n(e,ae,t),n(e,$l,t),d(oe,e,t),n(e,Ul,t),n(e,re,t),n(e,Jl,t),d(pe,e,t),n(e,vl,t),n(e,ce,t),n(e,Cl,t),d(de,e,t),n(e,jl,t),n(e,me,t),n(e,xl,t),d(ue,e,t),n(e,Il,t),n(e,he,t),n(e,Hl,t),d(fe,e,t),n(e,_l,t),n(e,Te,t),n(e,Ll,t),n(e,ye,t),n(e,Zl,t),d(be,e,t),n(e,Vl,t),n(e,Me,t),n(e,Bl,t),n(e,b,t),T(b,jt),T(b,Fn),T(b,xt),T(b,Yn),T(b,It),T(b,zn),T(b,Ht),T(b,On),T(b,_t),T(b,Dn),T(b,k),T(k,Lt),T(k,Kn),T(k,Zt),T(k,es),d(ke,k,null),T(k,ts),T(k,Vt),n(e,Rl,t),d(ge,e,t),n(e,Nl,t),n(e,we,t),n(e,Wl,t),n(e,$e,t),n(e,El,t),d(Ue,e,t),n(e,Al,t),n(e,Je,t),n(e,Ql,t),n(e,ve,t),n(e,ql,t),n(e,Ce,t),n(e,Sl,t),d(je,e,t),n(e,Gl,t),n(e,xe,t),n(e,Xl,t),n(e,Ie,t),n(e,Pl,t),n(e,He,t),n(e,Fl,t),n(e,_e,t),n(e,Yl,t),d(Le,e,t),n(e,zl,t),n(e,Ze,t),n(e,Ol,t),d(Ve,e,t),n(e,Dl,t),n(e,Be,t),n(e,Kl,t),d(Re,e,t),n(e,en,t),n(e,Ne,t),n(e,tn,t),d(We,e,t),n(e,ln,t),n(e,Ee,t),n(e,nn,t),d(Ae,e,t),n(e,sn,t),d(Qe,e,t),n(e,an,t),n(e,qe,t),n(e,on,t),n(e,Se,t),n(e,rn,t),n(e,Ge,t),n(e,pn,t),d(Xe,e,t),n(e,cn,t),n(e,Pe,t),n(e,dn,t),d(Fe,e,t),n(e,mn,t),n(e,Ye,t),n(e,un,t),d(ze,e,t),n(e,hn,t),n(e,Oe,t),n(e,fn,t),n(e,De,t),n(e,Tn,t),d(Ke,e,t),n(e,yn,t),d(et,e,t),n(e,bn,t),n(e,tt,t),n(e,Mn,t),n(e,lt,t),n(e,kn,t),d(nt,e,t),n(e,gn,t),n(e,st,t),n(e,wn,t),d(it,e,t),n(e,$n,t),n(e,at,t),n(e,Un,t),n(e,ot,t),n(e,Jn,t),d(rt,e,t),n(e,vn,t),d(pt,e,t),n(e,Cn,t),d(ct,e,t),n(e,jn,t),n(e,dt,t),n(e,xn,t),d(mt,e,t),n(e,In,t),n(e,ut,t),n(e,Hn,t),d(ht,e,t),n(e,_n,t),n(e,ft,t),n(e,Ln,t),d(Tt,e,t),n(e,Zn,t),n(e,yt,t),n(e,Vn,t),n(e,bt,t),n(e,Bn,t),d(Mt,e,t),n(e,Rn,t),n(e,kt,t),n(e,Nn,t),d(gt,e,t),n(e,Wn,t),n(e,wt,t),n(e,En,t),d($t,e,t),n(e,An,t),n(e,Ut,t),n(e,Qn,t),n(e,Jt,t),n(e,qn,t),n(e,vt,t),n(e,Sn,t),d(Ct,e,t),n(e,Gn,t),n(e,Rt,t),Xn=!0},p:Ui,i(e){Xn||(m(U.$$.fragment,e),m(J.$$.fragment,e),m(v.$$.fragment,e),m(L.$$.fragment,e),m(Z.$$.fragment,e),m(B.$$.fragment,e),m(E.$$.fragment,e),m(Q.$$.fragment,e),m(G.$$.fragment,e),m(P.$$.fragment,e),m(z.$$.fragment,e),m(D.$$.fragment,e),m(ee.$$.fragment,e),m(le.$$.fragment,e),m(ie.$$.fragment,e),m(oe.$$.fragment,e),m(pe.$$.fragment,e),m(de.$$.fragment,e),m(ue.$$.fragment,e),m(fe.$$.fragment,e),m(be.$$.fragment,e),m(ke.$$.fragment,e),m(ge.$$.fragment,e),m(Ue.$$.fragment,e),m(je.$$.fragment,e),m(Le.$$.fragment,e),m(Ve.$$.fragment,e),m(Re.$$.fragment,e),m(We.$$.fragment,e),m(Ae.$$.fragment,e),m(Qe.$$.fragment,e),m(Xe.$$.fragment,e),m(Fe.$$.fragment,e),m(ze.$$.fragment,e),m(Ke.$$.fragment,e),m(et.$$.fragment,e),m(nt.$$.fragment,e),m(it.$$.fragment,e),m(rt.$$.fragment,e),m(pt.$$.fragment,e),m(ct.$$.fragment,e),m(mt.$$.fragment,e),m(ht.$$.fragment,e),m(Tt.$$.fragment,e),m(Mt.$$.fragment,e),m(gt.$$.fragment,e),m($t.$$.fragment,e),m(Ct.$$.fragment,e),Xn=!0)},o(e){u(U.$$.fragment,e),u(J.$$.fragment,e),u(v.$$.fragment,e),u(L.$$.fragment,e),u(Z.$$.fragment,e),u(B.$$.fragment,e),u(E.$$.fragment,e),u(Q.$$.fragment,e),u(G.$$.fragment,e),u(P.$$.fragment,e),u(z.$$.fragment,e),u(D.$$.fragment,e),u(ee.$$.fragment,e),u(le.$$.fragment,e),u(ie.$$.fragment,e),u(oe.$$.fragment,e),u(pe.$$.fragment,e),u(de.$$.fragment,e),u(ue.$$.fragment,e),u(fe.$$.fragment,e),u(be.$$.fragment,e),u(ke.$$.fragment,e),u(ge.$$.fragment,e),u(Ue.$$.fragment,e),u(je.$$.fragment,e),u(Le.$$.fragment,e),u(Ve.$$.fragment,e),u(Re.$$.fragment,e),u(We.$$.fragment,e),u(Ae.$$.fragment,e),u(Qe.$$.fragment,e),u(Xe.$$.fragment,e),u(Fe.$$.fragment,e),u(ze.$$.fragment,e),u(Ke.$$.fragment,e),u(et.$$.fragment,e),u(nt.$$.fragment,e),u(it.$$.fragment,e),u(rt.$$.fragment,e),u(pt.$$.fragment,e),u(ct.$$.fragment,e),u(mt.$$.fragment,e),u(ht.$$.fragment,e),u(Tt.$$.fragment,e),u(Mt.$$.fragment,e),u(gt.$$.fragment,e),u($t.$$.fragment,e),u(Ct.$$.fragment,e),Xn=!1},d(e){e&&(l(Nt),l(Bt),l(Wt),l(Et),l(At),l(Qt),l(C),l(qt),l(j),l(St),l(x),l(Gt),l(I),l(Xt),l(H),l(Pt),l(_),l(Ft),l(w),l(Yt),l(zt),l(Ot),l(V),l(Dt),l(Kt),l(R),l(el),l(N),l(tl),l(W),l(ll),l(nl),l(A),l(sl),l(il),l(q),l(al),l(S),l(ol),l(rl),l(X),l(pl),l(cl),l(F),l(dl),l(Y),l(ml),l(ul),l(O),l(hl),l(fl),l(K),l(Tl),l(yl),l(te),l(bl),l(Ml),l(ne),l(kl),l(se),l(gl),l(wl),l(ae),l($l),l(Ul),l(re),l(Jl),l(vl),l(ce),l(Cl),l(jl),l(me),l(xl),l(Il),l(he),l(Hl),l(_l),l(Te),l(Ll),l(ye),l(Zl),l(Vl),l(Me),l(Bl),l(b),l(Rl),l(Nl),l(we),l(Wl),l($e),l(El),l(Al),l(Je),l(Ql),l(ve),l(ql),l(Ce),l(Sl),l(Gl),l(xe),l(Xl),l(Ie),l(Pl),l(He),l(Fl),l(_e),l(Yl),l(zl),l(Ze),l(Ol),l(Dl),l(Be),l(Kl),l(en),l(Ne),l(tn),l(ln),l(Ee),l(nn),l(sn),l(an),l(qe),l(on),l(Se),l(rn),l(Ge),l(pn),l(cn),l(Pe),l(dn),l(mn),l(Ye),l(un),l(hn),l(Oe),l(fn),l(De),l(Tn),l(yn),l(bn),l(tt),l(Mn),l(lt),l(kn),l(gn),l(st),l(wn),l($n),l(at),l(Un),l(ot),l(Jn),l(vn),l(Cn),l(jn),l(dt),l(xn),l(In),l(ut),l(Hn),l(_n),l(ft),l(Ln),l(Zn),l(yt),l(Vn),l(bt),l(Bn),l(Rn),l(kt),l(Nn),l(Wn),l(wt),l(En),l(An),l(Ut),l(Qn),l(Jt),l(qn),l(vt),l(Sn),l(Gn),l(Rt)),l(g),h(U,e),h(J,e),h(v,e),h(L,e),h(Z,e),h(B,e),h(E,e),h(Q,e),h(G,e),h(P,e),h(z,e),h(D,e),h(ee,e),h(le,e),h(ie,e),h(oe,e),h(pe,e),h(de,e),h(ue,e),h(fe,e),h(be,e),h(ke),h(ge,e),h(Ue,e),h(je,e),h(Le,e),h(Ve,e),h(Re,e),h(We,e),h(Ae,e),h(Qe,e),h(Xe,e),h(Fe,e),h(ze,e),h(Ke,e),h(et,e),h(nt,e),h(it,e),h(rt,e),h(pt,e),h(ct,e),h(mt,e),h(ht,e),h(Tt,e),h(Mt,e),h(gt,e),h($t,e),h(Ct,e)}}}const _i='{"title":"Write kernels","local":"write-kernels","sections":[{"title":"Introduction","local":"introduction","sections":[],"depth":2},{"title":"Setting up environment","local":"setting-up-environment","sections":[{"title":"Quick install","local":"quick-install","sections":[],"depth":3},{"title":"Cloud environment","local":"cloud-environment","sections":[],"depth":3}],"depth":2},{"title":"Starting a new kernel","local":"starting-a-new-kernel","sections":[],"depth":2},{"title":"Kernel project layout","local":"kernel-project-layout","sections":[],"depth":2},{"title":"build.toml","local":"buildtoml","sections":[{"title":"general","local":"general","sections":[],"depth":3},{"title":"general.hub","local":"generalhub","sections":[],"depth":3},{"title":"general.cuda","local":"generalcuda","sections":[],"depth":3},{"title":"Framework sections","local":"framework-sections","sections":[],"depth":3},{"title":"torch","local":"torch","sections":[],"depth":3},{"title":"tvm-ffi","local":"tvm-ffi","sections":[],"depth":3},{"title":"torch-noarch","local":"torch-noarch","sections":[],"depth":3},{"title":"kernel.<name>","local":"kernelltnamegt","sections":[{"title":"cuda","local":"cuda","sections":[],"depth":4},{"title":"rocm","local":"rocm","sections":[],"depth":4},{"title":"xpu","local":"xpu","sections":[],"depth":4}],"depth":3},{"title":"cpu","local":"cpu","sections":[],"depth":3}],"depth":2},{"title":"Torch bindings","local":"torch-bindings","sections":[{"title":"Defining bindings","local":"defining-bindings","sections":[],"depth":3}],"depth":2},{"title":"Using kernel functions from Python","local":"using-kernel-functions-from-python","sections":[],"depth":2},{"title":"Registering Torch operators","local":"registering-torch-operators","sections":[],"depth":2},{"title":"Kernel tests","local":"kernel-tests","sections":[{"title":"Use get_kernel in tests","local":"use-getkernel-in-tests","sections":[],"depth":3},{"title":"Mark CI tests","local":"mark-ci-tests","sections":[],"depth":3}],"depth":2},{"title":"Kernel docs","local":"kernel-docs","sections":[],"depth":2}],"depth":1}';function Li(ns){return Ji(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ni extends vi{constructor(g){super(),Ci(this,g,Li,Hi,$i,{})}}export{Ni as component}; | |
Xet Storage Details
- Size:
- 55.8 kB
- Xet hash:
- b3f2bacef5efe0e7afad160fc0bf28a2341df7659164077ef01c41ad858108f6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.