Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-sycl/fattn-tile.cpp # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-sycl / fattn-tile.cpp` 59 lines ยท 2062 bytes Raw Blame History 1 #include 2 #include 3 #include "dpct/helper.hpp" 4 #include "common.hpp" 5 #include "fattn-common.hpp" 6 #include "fattn-tile.hpp" 7 #include 8 #include 9 namespace syclex = sycl::ext::oneapi::experimental; 10 11 void ggml_sycl_flash_attn_ext_tile(ggml_backend_sycl_context & ctx, ggml_tensor * dst) { 12 const ggml_tensor * K = dst->src[1]; 13 const ggml_tensor * V = dst->src[2]; 14 switch (K->ne[0]) { 15 case 40: { 16 GGML_ASSERT(V->ne[0] == K->ne[0]); 17 ggml_sycl_flash_attn_ext_tile_case< 40, 40>(ctx, dst); 18 } break; 19 case 64: { 20 GGML_ASSERT(V->ne[0] == K->ne[0]); 21 ggml_sycl_flash_attn_ext_tile_case< 64, 64>(ctx, dst); 22 } break; 23 case 72: { 24 GGML_ASSERT(V->ne[0] == K->ne[0]); 25 ggml_sycl_flash_attn_ext_tile_case< 72, 72>(ctx, dst); 26 } break; 27 case 80: { 28 GGML_ASSERT(V->ne[0] == K->ne[0]); 29 ggml_sycl_flash_attn_ext_tile_case< 80, 80>(ctx, dst); 30 } break; 31 case 96: { 32 GGML_ASSERT(V->ne[0] == K->ne[0]); 33 ggml_sycl_flash_attn_ext_tile_case< 96, 96>(ctx, dst); 34 } break; 35 case 112: { 36 GGML_ASSERT(V->ne[0] == K->ne[0]); 37 ggml_sycl_flash_attn_ext_tile_case<112, 112>(ctx, dst); 38 } break; 39 case 128: { 40 GGML_ASSERT(V->ne[0] == K->ne[0]); 41 ggml_sycl_flash_attn_ext_tile_case<128, 128>(ctx, dst); 42 } break; 43 case 256: { 44 GGML_ASSERT(V->ne[0] == K->ne[0]); 45 ggml_sycl_flash_attn_ext_tile_case<256, 256>(ctx, dst); 46 } break; 47 case 512: { 48 GGML_ASSERT(V->ne[0] == K->ne[0]); 49 ggml_sycl_flash_attn_ext_tile_case<512, 512>(ctx, dst); 50 } break; 51 case 576: { 52 GGML_ASSERT(V->ne[0] == 512); 53 ggml_sycl_flash_attn_ext_tile_case<576, 512>(ctx, dst); 54 } break; 55 default: { 56 GGML_ABORT("Unsupported head size"); 57 } 58 } 59 }