From 9258d91b7034eae30bfa430739433d6f4a987102 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:29:47 +0800 Subject: [PATCH] try initi rocblas before autofit --- gpttype_adapter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index cabeb005d..48bdd2879 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -46,6 +46,11 @@ #include "tools/mtmd/mtmd-audio.h" #include "common/common.h" +#if defined(GGML_USE_HIP) +// for rocblas_initialize() +#include "rocblas/rocblas.h" +#endif + //const const int extra_context_handle_fragmentation = 128; const int MEDIA_TOKEN_IDENTIFIER_A = -998; //alternate between both, changing when image changes @@ -2553,6 +2558,10 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in std::vector fit_params_target = std::vector(llama_max_devices(),1024*1024*1024); if(inputs.autofit) { + #if defined(GGML_USE_HIP) + rocblas_initialize(); + #endif // defined(GGML_USE_HIP) + common_params temp_params; size_t taxmb = inputs.autofit_tax_mb; printf("\nAttempting to use llama.cpp's automating fitting code. This will override all your layer configs, may or may not work!\n");