Instructions to use replicate/aiter-kernels with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/aiter-kernels with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/aiter-kernels", version=1) - Notebooks
- Google Colab
- Kaggle
Download build/torch-rocm/_aiter_compat/__init__.py from replicate/aiter-kernels: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/replicate/aiter-kernels/resolve/main/build/torch-rocm/_aiter_compat/__init__.py
- Command line
-
hf download hf://replicate/aiter-kernels/build/torch-rocm/_aiter_compat/__init__.py
-
curl -L -o __init__.py https://huggingface.co/replicate/aiter-kernels/resolve/main/build/torch-rocm/_aiter_compat/__init__.py
1.09 kB
| """Compatibility shim layer for aiter cross-tree dependencies. | |
| The upstream ``aiter/ops/triton/**`` Triton ops import a handful of helpers | |
| from outside the triton subtree: | |
| - ``aiter.dtypes`` / ``aiter.utility.dtypes`` — dtype constants keyed by GPU arch. | |
| - ``aiter.jit.utils.torch_guard.torch_compile_guard`` — torch.compile/torch.library | |
| registration helper. | |
| - ``aiter.utility.triton.triton_metadata_redirect.AOTMetadataContext`` — AOT | |
| metadata-path redirector. | |
| - ``aiter.jit.utils.chip_info.get_gfx`` — GPU arch query. | |
| In a Hub-kernel build we don't ship the rest of upstream aiter — we vendor | |
| just enough here that the Triton ops import cleanly. The runtime hot paths | |
| (the actual Triton kernels) do not rely on these helpers; they're used for | |
| torch.library schema registration, AOT caching, and dtype lookups that we | |
| re-derive from torch / Triton directly. | |
| """ | |
| from . import dtypes | |
| from . import chip_info | |
| from . import torch_guard | |
| from . import triton_metadata_redirect | |
| __all__ = [ | |
| "dtypes", | |
| "chip_info", | |
| "torch_guard", | |
| "triton_metadata_redirect", | |
| ] | |