[cpu][performance] CPU Paged Attention NEON BFMMLA BF16 Implementation (#32263)

Signed-off-by: Gassan <gassan.salama@arm.com>
This commit is contained in:
Gassan Salama
2026-02-06 15:01:48 +08:00
committed by GitHub
parent 965525667b
commit 1363e3d6d5
4 changed files with 704 additions and 4 deletions
+3 -1
View File
@@ -487,10 +487,12 @@ def _get_attn_isa(
if head_size is not None and head_size % 32 != 0 and head_size % 16 == 0:
return "vec16"
supports_amx = torch._C._cpu._is_amx_tile_supported()
supports_arm = current_platform.get_cpu_architecture() == CpuArchEnum.ARM
if supports_amx and dtype in (torch.bfloat16,) and block_size % 32 == 0:
return "amx"
elif block_size % 32 == 0:
if current_platform.get_cpu_architecture() == CpuArchEnum.ARM:
if supports_arm:
# support ARM NEON FMLA and BFMMLA (bf16) for block size 32
return "neon"
else:
return "vec"