Instructions to use Deep-ML/flash-attention-in-cuda-from-scratch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Deep-ML/flash-attention-in-cuda-from-scratch with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("Deep-ML/flash-attention-in-cuda-from-scratch") - Notebooks
- Google Colab
- Kaggle
| // Registers `flash_attention_in_cuda_from_scratch` as a custom op so it is callable from Python as | |
| // torch.ops.flash_attention_in_cuda_from_scratch.flash_attention_in_cuda_from_scratch(...). Adjust the schema to your kernel. | |
| TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) { | |
| ops.def("flash_attention_in_cuda_from_scratch(Tensor! out, Tensor input) -> ()"); | |
| ops.impl("flash_attention_in_cuda_from_scratch", torch::kCUDA, &flash_attention_in_cuda_from_scratch); | |
| } | |
| REGISTER_EXTENSION(TORCH_EXTENSION_NAME) | |