ex42: Fused MHA imported from xFormers (#662)

* ex42: Fused MHA imported from xFormers

* Remove std:: references

* Support K>128 in the example

* Support causal option

* Support different head size for V, and different seqlength for KV

* Update FLOPS counter

* Remove bit_cast

* fix build: Replace M_LOG2E

* Add doc

* Revert "Remove bit_cast"

This reverts commit 9662fa86bb7c57c1a015ac0bf52cb52940fbbf80.

* Explicit casts to int32_t for windows build

Co-authored-by: danthe3rd <danthe3rd>
This commit is contained in:
dan_the_3rd
2022-10-17 10:49:33 -04:00
committed by GitHub
co-authored by danthe3rd <danthe3rd>
parent 3bf95e90c2
commit 4db6a6140e
21 changed files with 12415 additions and 0 deletions
+1
View File
@@ -120,6 +120,7 @@ foreach(EXAMPLE
38_syr2k_grouped
39_gemm_permute
41_multi_head_attention
42_fused_multi_head_attention
)
add_subdirectory(${EXAMPLE})