Metadata-Version: 2.4
Name: aule-attention
Version: 0.2.0
Summary: FlashAttention that just works. No compilation. Any GPU. AMD ROCm, NVIDIA CUDA, Intel, Apple via Vulkan.
Author-email: Aule Technologies <contact@aule.dev>
License: MIT
Project-URL: Homepage, https://github.com/xenn0010/Aule-Attention
Project-URL: Documentation, https://github.com/xenn0010/Aule-Attention#readme
Project-URL: Repository, https://github.com/xenn0010/Aule-Attention
Project-URL: Issues, https://github.com/xenn0010/Aule-Attention/issues
Keywords: attention,flashattention,flash-attention,transformer,deep-learning,gpu,amd,rocm,nvidia,cuda,intel,vulkan,triton,llm,gqa,mqa
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.19.0
Provides-Extra: triton
Requires-Dist: triton>=2.0.0; extra == "triton"
Provides-Extra: torch
Requires-Dist: torch>=2.0.0; extra == "torch"
Provides-Extra: full
Requires-Dist: torch>=2.0.0; extra == "full"
Requires-Dist: triton>=2.0.0; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-benchmark; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: torch>=2.0.0; extra == "dev"

# aule-attention

**Hardware-agnostic FlashAttention implementation. No compilation required. Works on any GPU.**

Version: 0.2.0

## Installation

```bash
pip install aule-attention
```

## Quick Start

```python
from aule import flash_attention
import torch

q = torch.randn(1, 8, 512, 64, device='cuda')
k = torch.randn(1, 8, 512, 64, device='cuda')
v = torch.randn(1, 8, 512, 64, device='cuda')

output = flash_attention(q, k, v, causal=True)
```

## Features

- No compilation at install time
- Works on AMD, NVIDIA, Intel, and Apple GPUs
- Training support with backward pass (Triton backend)
- Grouped Query Attention (GQA) and Multi-Query Attention (MQA) support
- O(N) memory complexity

## Backends

| Backend | Hardware | Features |
|---------|----------|----------|
| Triton | AMD ROCm, NVIDIA CUDA | Training and Inference |
| Vulkan | Any Vulkan 1.2+ GPU | Inference |
| CPU | NumPy | Fallback |

## API

```python
from aule import flash_attention, get_available_backends, print_backend_info

# Compute attention
output = flash_attention(query, key, value, causal=True, scale=None)

# Check available backends
backends = get_available_backends()

# Display backend information
print_backend_info()
```

## Supported Hardware

### Triton Backend (Training + Inference)

- AMD Instinct: MI300X, MI300A, MI250X, MI250, MI210, MI100
- NVIDIA Datacenter: H100, A100, A10, L40S
- NVIDIA Consumer: RTX 4090, 4080, 3090, 3080

### Vulkan Backend (Inference)

- AMD RDNA3: RX 7900 XTX, 7900 XT, 7800 XT
- AMD RDNA2: RX 6900 XT, 6800 XT, 6700 XT
- Intel Arc: A770, A750, A580
- Intel Integrated: 12th/13th/14th Gen
- Apple Silicon: M1, M2, M3 (via MoltenVK)

## License

MIT License - Aule Technologies

## Links

- [GitHub Repository](https://github.com/aule-dev/aule-attention)
- [Documentation](https://github.com/aule-dev/aule-attention#readme)
