vulkan: compile a test shader in cmake to check for coopmat2 support (#10713)

This commit is contained in:
Jeff Bolz 2024-12-08 02:05:55 -06:00 committed by GitHub
parent 62e84d9848
commit ecc93d0558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 8 deletions

View file

@ -342,14 +342,14 @@ void process_shaders() {
matmul_shaders(true, matmul_id, true, false, false);
matmul_shaders(true, matmul_id, true, false, true);
#if defined(VK_NV_cooperative_matrix2)
#if defined(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
// Coopmat2, fp32acc and fp16acc
matmul_shaders(true, matmul_id, false, true, false);
matmul_shaders(true, matmul_id, false, true, true);
#endif
}
#if defined(VK_NV_cooperative_matrix2)
#if defined(GGML_VULKAN_COOPMAT2_GLSLC_SUPPORT)
// flash attention
for (const auto& f16acc : {false, true}) {
std::string acctype = f16acc ? "float16_t" : "float";