From 987335ea0a384c5242de549f6a9cd899f4137562 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 25 Jan 2024 11:09:18 -0500 Subject: [PATCH] kompute : fix algorithm names --- ggml-kompute.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ggml-kompute.cpp b/ggml-kompute.cpp index b3ca984b4..f45902e36 100644 --- a/ggml-kompute.cpp +++ b/ggml-kompute.cpp @@ -700,7 +700,7 @@ static void ggml_vk_scale(kp::Sequence& seq, std::shared_ptr s_algo = nullptr; if (!komputeManager()->hasAlgorithm(name)) { - s_algo = komputeManager()->algorithm(__func__, s_kompute_context->pool.get(), {in, out}, *spirv, {size}, {}, {pushConsts}); + s_algo = komputeManager()->algorithm(name, s_kompute_context->pool.get(), {in, out}, *spirv, {size}, {}, {pushConsts}); } else { s_algo = komputeManager()->getAlgorithm(name); s_algo->setTensors({in, out}); @@ -727,7 +727,7 @@ static void ggml_vk_xxlu( auto name = std::string(__func__) + "_" + suffix; std::shared_ptr s_algo = nullptr; if (!komputeManager()->hasAlgorithm(name)) { - s_algo = komputeManager()->algorithm(__func__, s_kompute_context->pool.get(), {in, out}, spirv, {size}, {}, {pushConsts}); + s_algo = komputeManager()->algorithm(name, s_kompute_context->pool.get(), {in, out}, spirv, {size}, {}, {pushConsts}); } else { s_algo = komputeManager()->getAlgorithm(name); s_algo->setTensors({in, out}); @@ -826,7 +826,7 @@ static void ggml_vk_norm_( auto name = std::string(__func__) + "_" + suffix; std::shared_ptr s_algo = nullptr; if (!komputeManager()->hasAlgorithm(name)) { - s_algo = komputeManager()->algorithm(__func__, s_kompute_context->pool.get(), {in, out}, spirv, {(uint32_t)nrows}, {}, {pushConsts}); + s_algo = komputeManager()->algorithm(name, s_kompute_context->pool.get(), {in, out}, spirv, {(uint32_t)nrows}, {}, {pushConsts}); } else { s_algo = komputeManager()->getAlgorithm(name); s_algo->setTensors({in, out}); @@ -1052,7 +1052,7 @@ static void ggml_vk_mul_mat_impl( std::shared_ptr s_algo = nullptr; if (!komputeManager()->hasAlgorithm(name)) { const uint32_t local_x = ggml_vk_current_device().subgroupSize * 2; - s_algo = komputeManager()->algorithm(__func__, s_kompute_context->pool.get(), {inA, inB, out}, spirv, {unsigned((ne01 + 7)/8), unsigned(ne11), unsigned(ne12*ne13)}, {local_x}, {pushConsts}); + s_algo = komputeManager()->algorithm(name, s_kompute_context->pool.get(), {inA, inB, out}, spirv, {unsigned((ne01 + 7)/8), unsigned(ne11), unsigned(ne12*ne13)}, {local_x}, {pushConsts}); } else { s_algo = komputeManager()->getAlgorithm(name); s_algo->setTensors({inA, inB, out}); @@ -1140,7 +1140,7 @@ static void ggml_vk_get_rows( auto name = std::string(__func__) + "_" + suffix; std::shared_ptr s_algo = nullptr; if (!komputeManager()->hasAlgorithm(name)) { - s_algo = komputeManager()->algorithm(__func__, s_kompute_context->pool.get(), {inA, inB, out}, spirv, {size}, {}, {pushConsts}); + s_algo = komputeManager()->algorithm(name, s_kompute_context->pool.get(), {inA, inB, out}, spirv, {size}, {}, {pushConsts}); } else { s_algo = komputeManager()->getAlgorithm(name); s_algo->setTensors({inA, inB, out});