diff --git a/common/debug.cpp b/common/debug.cpp index 102c6924d..fff040c06 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -162,7 +162,7 @@ bool common_debug_cb_eval(struct ggml_tensor * t, bool ask, void * user_data) { } } - char src1_str[128] = { 0 }; + char src1_str[256] = { 0 }; if (src1) { snprintf(src1_str, sizeof(src1_str), "%s{%s}", src1->name, common_ggml_ne_string(src1).c_str()); } diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index b2acb7f98..77334b353 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -58,6 +58,11 @@ DispatchLoaderDynamic & ggml_vk_default_dispatcher(); #if defined(_MSC_VER) # define NOMINMAX 1 # include +// windows.h (winnt.h) defines MemoryBarrier as a macro that expands to an +// intrinsic call (e.g. __faststorefence()). That collides with vk::MemoryBarrier +// and causes MSVC C2146 syntax errors. Undefine it; nothing in this TU needs +// the Win32 MemoryBarrier intrinsic. +# undef MemoryBarrier # define YIELD() YieldProcessor() #elif defined(__clang__) || defined(__GNUC__) # if defined(__x86_64__) ||defined(__i386__) diff --git a/src/llama-adapter.h b/src/llama-adapter.h index f0b1e50f8..5c500f278 100644 --- a/src/llama-adapter.h +++ b/src/llama-adapter.h @@ -83,7 +83,7 @@ struct llama_adapter_lora { llama_adapter_lora_weight * get_weight(ggml_tensor * w); uint32_t get_n_nodes() const { - return ab_map.size() * 6u; // a, b, scale, add, 2 x mul_mat + return static_cast(ab_map.size()) * 6u; // a, b, scale, add, 2 x mul_mat } };