mirror of
https://github.com/huggingface/kernels.git
synced 2025-10-20 21:10:02 +08:00
Small markup fixes of the local kernel repo example (#127)
This commit is contained in:
@ -265,6 +265,7 @@ Capabilities behave as follows:
|
|||||||
an existing kernel, the new kernel will replace the old kernel.
|
an existing kernel, the new kernel will replace the old kernel.
|
||||||
- When there are multiple kernels that support a capability, the kernel
|
- When there are multiple kernels that support a capability, the kernel
|
||||||
with the smaller capability interval will be used. E.g. given:
|
with the smaller capability interval will be used. E.g. given:
|
||||||
|
|
||||||
- `KernelA` with `min_capability=80` and `max_capability=89`;
|
- `KernelA` with `min_capability=80` and `max_capability=89`;
|
||||||
- `KernelB` with `min_capability=75` and `max_capability=89`;
|
- `KernelB` with `min_capability=75` and `max_capability=89`;
|
||||||
- `kernelize` runs on a system with capability 8.6.
|
- `kernelize` runs on a system with capability 8.6.
|
||||||
@ -285,12 +286,11 @@ a kernel to a range of ROCm capabilities.
|
|||||||
The `LocalLayerRepository` class is provided to load a repository from
|
The `LocalLayerRepository` class is provided to load a repository from
|
||||||
a local directory. For example:
|
a local directory. For example:
|
||||||
|
|
||||||
```
|
```python
|
||||||
with use_kernel_mapping(
|
with use_kernel_mapping(
|
||||||
{
|
{
|
||||||
"SiluAndMul": {
|
"SiluAndMul": {
|
||||||
"cuda": LocalLayerRepository(
|
"cuda": LocalLayerRepository(
|
||||||
# install_kernel will give the fully-resolved path.
|
|
||||||
repo_path="/home/daniel/kernels/activation",
|
repo_path="/home/daniel/kernels/activation",
|
||||||
package_name="activation",
|
package_name="activation",
|
||||||
layer_name="SiluAndMul",
|
layer_name="SiluAndMul",
|
||||||
|
Reference in New Issue
Block a user