Metadata-Version: 2.3
Name: hf-kernels
Version: 0.1.0
Summary: Download cuda kernels
Author: OlivierDehaene, Daniel de Kok, David Holtz, Nicolas Patry
Author-email: OlivierDehaene <olivier@huggingface.co>, Daniel de Kok <daniel@huggingface.co>, David Holtz <david@huggingface.co>, Nicolas Patry <nicolas@huggingface.co>
Description-Content-Type: text/markdown

# kernels

Make sure you have `torch==2.5.1+cu124` installed.

```python
import torch

from kernels import get_kernel

# Download optimized kernels from the Hugging Face hub
activation = get_kernel("kernels-community/activation")

# Random tensor
x = torch.randn((10, 10), dtype=torch.float16, device="cuda")

# Run the kernel
y = torch.empty_like(x)
activation.gelu_fast(y, x)

print(y)
```
