aitune.torch.kernel_forge.kernel_provider.flash_attention4_provider
aitune.torch.kernel_forge.kernel_provider.flash_attention4_provider
FlashAttention-4 kernel provider.
Module Contents
Classes
Functions
Data
API
Bases: KernelProvider
Run FlashAttention-4 with a sample-derived argument and layout plan.
Load and validate the FlashAttention-4 runtime function lazily.
Resolve the FlashAttention-4 version once.
Human-readable provider name.
Name of the function replaced by this provider.
Restore the selected inference plan.
Run the selected FlashAttention-4 inference plan.
Load FlashAttention-4 dependencies before graph capture.
Select one inference plan for all representative samples.
Serialize the selected inference plan.
Call FlashAttention-4 after copying HND inputs to NHD layout.
Call FlashAttention-4 when HND inputs are NHD-contiguous views.
Extract query, key and value from supported SDPA arguments.
Map PyTorch SDPA HND layout to contiguous FlashAttention NHD layout.
Map HND to NHD without forcing contiguous storage.
Import and cache the optional FlashAttention-4 module.
Map FlashAttention NHD output back to PyTorch SDPA HND layout.
Normalize PyTorch SDPA arguments to FlashAttention-4 arguments.
Return how q/k/v are passed in the representative sample.
Build an inference plan for one representative sample.
Validate the subset of PyTorch SDPA inputs handled by this provider.