|
@@ -206,10 +206,13 @@ void string_to_spv_func(const std::string& _name, const std::string& in_fname, c
|
|
|
|
|
|
|
|
std::string target_env = (name.find("_cm2") != std::string::npos) ? "--target-env=vulkan1.3" : "--target-env=vulkan1.2";
|
|
std::string target_env = (name.find("_cm2") != std::string::npos) ? "--target-env=vulkan1.3" : "--target-env=vulkan1.2";
|
|
|
|
|
|
|
|
|
|
+ // disable spirv-opt for coopmat shaders for https://github.com/ggerganov/llama.cpp/issues/10734
|
|
|
|
|
+ std::string opt_level = coopmat ? "" : "-O";
|
|
|
|
|
+
|
|
|
#ifdef _WIN32
|
|
#ifdef _WIN32
|
|
|
- std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", target_env, "-O", "\"" + in_path + "\"", "-o", "\"" + out_fname + "\""};
|
|
|
|
|
|
|
+ std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", target_env, opt_level, "\"" + in_path + "\"", "-o", "\"" + out_fname + "\""};
|
|
|
#else
|
|
#else
|
|
|
- std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", target_env, "-O", in_path, "-o", out_fname};
|
|
|
|
|
|
|
+ std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", target_env, opt_level, in_path, "-o", out_fname};
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef GGML_VULKAN_SHADER_DEBUG_INFO
|
|
#ifdef GGML_VULKAN_SHADER_DEBUG_INFO
|