Skip to content

Commit 7175823

Browse files
authored
Document convention to use version 0 for alpha/beta kernels (#639)
1 parent 4bbdd2e commit 7175823

4 files changed

Lines changed: 22 additions & 1 deletion

File tree

docs/source/basic-usage.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ for older PyTorch versions. This ensures that your code will continue to work.
3030

3131
Hub kernels must be loaded with either a `version` or an explicit `revision`.
3232

33+
> [!NOTE]
34+
> Version `0` kernels are excluded from the API compatibility requirement,
35+
> since it is used for alpha/beta-quality kernels that may still have
36+
> rapidly changing APIs.
37+
3338
## Checking Kernel Availability
3439

3540
You can check if a particular version of a kernel supports the environment
@@ -43,7 +48,7 @@ is_available = has_kernel("kernels-community/activation", version=1)
4348
print(f"Kernel available: {is_available}")
4449
```
4550

46-
When no compatible kernel is found, [`~kernels.has_kernel`] does not say *why*.
51+
When no compatible kernel is found, [`~kernels.has_kernel`] does not say _why_.
4752
[`~kernels.get_kernel_variants`] returns the full resolution trace instead: one
4853
decision per build variant in the repository, with compatible variants listed
4954
first. Each decision is a `VariantAccepted` or a `VariantRejected`, and rejected

docs/source/kernel-requirements.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ The version **must** be bumped in the following cases:
199199
In both cases, build variants that are not updated must be removed from
200200
the new version's branch.
201201

202+
> [!NOTE]
203+
> By convention, we reserve version `0` for kernels that are still in
204+
> alpha or beta stage and are not recommended for production use (e.g.
205+
> because the API is still changing regularly or there are still too
206+
> many issues).
207+
202208
## Native Python module
203209

204210
Kernels will typically contain a native Python module with precompiled

docs/source/layers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ work.
180180
Hub-backed [`~kernels.LayerRepository`] and [`~kernels.FuncRepository`] entries must specify
181181
either a `version` or an explicit `revision`.
182182

183+
> [!NOTE]
184+
> Version `0` kernels are excluded from the API compatibility requirement,
185+
> since it is used for alpha/beta-quality kernels that may still have
186+
> rapidly changing APIs.
187+
183188
You can register a mapping, like the one above, using [`~kernels.register_kernel_mapping`]:
184189

185190
```python

docs/source/migration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ for never breaking a kernel within a major version and should bump up
1414
the major version if the kernel API changes and/or when support for
1515
older Torch versions is removed.
1616

17+
> [!NOTE]
18+
> Version `0` kernels are excluded from the API compatibility requirement,
19+
> since it is used for alpha/beta-quality kernels that may still have
20+
> rapidly changing APIs.
21+
1722
You can find the versions that are supported by a kernel using the
1823
`kernels versions command`. For example:
1924

0 commit comments

Comments
 (0)