Skip to content

Commit 7fd3d07

Browse files
committed
Move card filling to Nix
This ensures that filled cards are in `result` as well (not just `build`) and keeps people that use Nix directly (i.e. me :-)) happy.
1 parent f91c9d4 commit 7fd3d07

30 files changed

Lines changed: 668 additions & 27 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
library_name: kernels
3+
{% if license %}license: {{ license }}
4+
{% endif %}---
5+
6+
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
7+
8+
## How to use
9+
{% if functions %}
10+
11+
```python
12+
# make sure `kernels` is installed: `pip install -U kernels`
13+
from kernels import get_kernel
14+
15+
kernel_module = get_kernel("{{ repo_id }}")
16+
{{ functions[0] }} = kernel_module.{{ functions[0] }}
17+
18+
{{ functions[0] }}(...)
19+
```
20+
{% else %}
21+
22+
Usage example not available.
23+
{% endif %}
24+
25+
## Available functions
26+
{% if functions %}
27+
{% for func in functions %}
28+
- `{{ func }}`
29+
{% endfor %}
30+
{% else %}
31+
32+
Function list not available.
33+
{% endif %}
34+
35+
## Benchmarks
36+
{% if has_benchmark %}
37+
38+
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
39+
{% else %}
40+
41+
No benchmark available yet.
42+
{% endif %}
43+
{% if upstream %}
44+
45+
## Source code
46+
47+
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with `kernels`.
48+
{% endif %}

examples/kernels/cutlass-gemm-tvm-ffi/build.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ backends = [
55
"xpu",
66
]
77

8+
[general.hub]
9+
repo-id = "kernels-test/cutlass-gemm-tvm-ffi"
10+
811
[tvm-ffi]
912
src = [
1013
"tvm-ffi-ext/tvm_ffi_binding.cpp",
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
library_name: kernels
3+
{% if license %}license: {{ license }}
4+
{% endif %}---
5+
6+
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
7+
8+
## How to use
9+
{% if functions %}
10+
11+
```python
12+
# make sure `kernels` is installed: `pip install -U kernels`
13+
from kernels import get_kernel
14+
15+
kernel_module = get_kernel("{{ repo_id }}")
16+
{{ functions[0] }} = kernel_module.{{ functions[0] }}
17+
18+
{{ functions[0] }}(...)
19+
```
20+
{% else %}
21+
22+
Usage example not available.
23+
{% endif %}
24+
25+
## Available functions
26+
{% if functions %}
27+
{% for func in functions %}
28+
- `{{ func }}`
29+
{% endfor %}
30+
{% else %}
31+
32+
Function list not available.
33+
{% endif %}
34+
35+
## Benchmarks
36+
{% if has_benchmark %}
37+
38+
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
39+
{% else %}
40+
41+
No benchmark available yet.
42+
{% endif %}
43+
{% if upstream %}
44+
45+
## Source code
46+
47+
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with `kernels`.
48+
{% endif %}

examples/kernels/cutlass-gemm/build.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ backends = [
55
"xpu",
66
]
77

8+
[general.hub]
9+
repo-id = "kernels-test/cutlass-gemm"
10+
811
[torch]
912
src = [
1013
"torch-ext/torch_binding.cpp",
@@ -26,4 +29,3 @@ depends = [
2629
"sycl_tla",
2730
]
2831
src = ["gemm_sycl.cpp"]
29-
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
library_name: kernels
3+
{% if license %}license: {{ license }}
4+
{% endif %}---
5+
6+
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
7+
8+
## How to use
9+
{% if functions %}
10+
11+
```python
12+
# make sure `kernels` is installed: `pip install -U kernels`
13+
from kernels import get_kernel
14+
15+
kernel_module = get_kernel("{{ repo_id }}")
16+
{{ functions[0] }} = kernel_module.{{ functions[0] }}
17+
18+
{{ functions[0] }}(...)
19+
```
20+
{% else %}
21+
22+
Usage example not available.
23+
{% endif %}
24+
25+
## Available functions
26+
{% if functions %}
27+
{% for func in functions %}
28+
- `{{ func }}`
29+
{% endfor %}
30+
{% else %}
31+
32+
Function list not available.
33+
{% endif %}
34+
35+
## Benchmarks
36+
{% if has_benchmark %}
37+
38+
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
39+
{% else %}
40+
41+
No benchmark available yet.
42+
{% endif %}
43+
{% if upstream %}
44+
45+
## Source code
46+
47+
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with `kernels`.
48+
{% endif %}

examples/kernels/extra-data/build.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ backends = [
88
"xpu",
99
]
1010

11+
[general.hub]
12+
repo-id = "kernels-test/extra-data"
13+
1114
[torch]
1215
src = [
1316
"torch-ext/torch_binding.cpp",
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
library_name: kernels
3+
{% if license %}license: {{ license }}
4+
{% endif %}---
5+
6+
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
7+
8+
## How to use
9+
{% if functions %}
10+
11+
```python
12+
# make sure `kernels` is installed: `pip install -U kernels`
13+
from kernels import get_kernel
14+
15+
kernel_module = get_kernel("{{ repo_id }}")
16+
{{ functions[0] }} = kernel_module.{{ functions[0] }}
17+
18+
{{ functions[0] }}(...)
19+
```
20+
{% else %}
21+
22+
Usage example not available.
23+
{% endif %}
24+
25+
## Available functions
26+
{% if functions %}
27+
{% for func in functions %}
28+
- `{{ func }}`
29+
{% endfor %}
30+
{% else %}
31+
32+
Function list not available.
33+
{% endif %}
34+
35+
## Benchmarks
36+
{% if has_benchmark %}
37+
38+
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
39+
{% else %}
40+
41+
No benchmark available yet.
42+
{% endif %}
43+
{% if upstream %}
44+
45+
## Source code
46+
47+
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with `kernels`.
48+
{% endif %}

examples/kernels/relu-backprop-compile/build.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ backends = [
55
"rocm",
66
]
77

8+
[general.hub]
9+
repo-id = "kernels-test/relu-backprop-compile"
10+
811
[torch]
912
src = [
1013
"torch-ext/torch_binding.cpp",
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
library_name: kernels
3+
{% if license %}license: {{ license }}
4+
{% endif %}---
5+
6+
This is the repository card of {{ repo_id }} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
7+
8+
## How to use
9+
{% if functions %}
10+
11+
```python
12+
# make sure `kernels` is installed: `pip install -U kernels`
13+
from kernels import get_kernel
14+
15+
kernel_module = get_kernel("{{ repo_id }}")
16+
{{ functions[0] }} = kernel_module.{{ functions[0] }}
17+
18+
{{ functions[0] }}(...)
19+
```
20+
{% else %}
21+
22+
Usage example not available.
23+
{% endif %}
24+
25+
## Available functions
26+
{% if functions %}
27+
{% for func in functions %}
28+
- `{{ func }}`
29+
{% endfor %}
30+
{% else %}
31+
32+
Function list not available.
33+
{% endif %}
34+
35+
## Benchmarks
36+
{% if has_benchmark %}
37+
38+
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
39+
{% else %}
40+
41+
No benchmark available yet.
42+
{% endif %}
43+
{% if upstream %}
44+
45+
## Source code
46+
47+
Source code of this kernel originally comes from {{ upstream }} and it was repurposed for compatibility with `kernels`.
48+
{% endif %}

examples/kernels/relu-compiler-flags/build.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ backends = [
66
"xpu",
77
]
88

9+
[general.hub]
10+
repo-id = "kernels-test/relu-compiler-flags"
11+
912
[torch]
1013
src = ["torch-ext/torch_binding.cpp", "torch-ext/torch_binding.h"]
1114

0 commit comments

Comments
 (0)