diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-07-15 08:03:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-15 08:03:13 +0200 |
commit | 2081b3fccb9923699bf4d5e926d8719fc1d12c39 (patch) | |
tree | 61b3665214941b4857466fdea8220159d81a609e /ggml/src/ggml-impl.h | |
parent | 45fae1a14444622478774f9a417e1d417af1ca46 (diff) |
Vulkan: a fresh start (#608)
* It compiles
* Seems to be working with coopmat
* Vulkan needs f32 precision for flash attention
* Vulkan: fix u_batch > 4096/n_active_experts
for coopmat1. Without this fix we get an assert.
We get the same assert in mainline too.
---------
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-impl.h')
-rw-r--r-- | ggml/src/ggml-impl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ggml/src/ggml-impl.h b/ggml/src/ggml-impl.h index 190af081..e4e36860 100644 --- a/ggml/src/ggml-impl.h +++ b/ggml/src/ggml-impl.h @@ -748,6 +748,16 @@ static size_t ggml_hash_find_or_insert(struct ggml_hash_set * hash_set, struct g GGML_ABORT("fatal error"); } +static int32_t ggml_get_op_params_i32(const struct ggml_tensor * tensor, uint32_t i) { + assert(i < GGML_MAX_OP_PARAMS / sizeof(int32_t)); + return ((const int32_t *)(tensor->op_params))[i]; +} + +static float ggml_get_op_params_f32(const struct ggml_tensor * tensor, uint32_t i) { + assert(i < GGML_MAX_OP_PARAMS / sizeof(float)); + return ((const float *)(tensor->op_params))[i]; +} + #ifdef __cplusplus } #endif |