Download ggml/src/ggml-sycl/fattn-tile.cpp from Brunobkr/llama.cpp_AlgMor24_github: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/ggml/src/ggml-sycl/fattn-tile.cpp
- Command line
-
hf download hf://datasets/Brunobkr/llama.cpp_AlgMor24_github/ggml/src/ggml-sycl/fattn-tile.cpp
-
curl -L -o fattn-tile.cpp https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/ggml/src/ggml-sycl/fattn-tile.cpp
2.07 kB
| namespace syclex = sycl::ext::oneapi::experimental; | |
| void ggml_sycl_flash_attn_ext_tile(ggml_backend_sycl_context & ctx, ggml_tensor * dst) { | |
| const ggml_tensor * K = dst->src[1]; | |
| const ggml_tensor * V = dst->src[2]; | |
| switch (K->ne[0]) { | |
| case 40: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case< 40, 40>(ctx, dst); | |
| } break; | |
| case 64: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case< 64, 64>(ctx, dst); | |
| } break; | |
| case 72: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case< 72, 72>(ctx, dst); | |
| } break; | |
| case 80: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case< 80, 80>(ctx, dst); | |
| } break; | |
| case 96: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case< 96, 96>(ctx, dst); | |
| } break; | |
| case 112: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case<112, 112>(ctx, dst); | |
| } break; | |
| case 128: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case<128, 128>(ctx, dst); | |
| } break; | |
| case 256: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case<256, 256>(ctx, dst); | |
| } break; | |
| case 512: { | |
| GGML_ASSERT(V->ne[0] == K->ne[0]); | |
| ggml_sycl_flash_attn_ext_tile_case<512, 512>(ctx, dst); | |
| } break; | |
| case 576: { | |
| GGML_ASSERT(V->ne[0] == 512); | |
| ggml_sycl_flash_attn_ext_tile_case<576, 512>(ctx, dst); | |
| } break; | |
| default: { | |
| GGML_ABORT("Unsupported head size"); | |
| } break; | |
| } | |
| } | |