Only show GPU when we're actually using it.

This commit is contained in:
Adam Treat
2023-09-14 09:59:19 -04:00
parent 1fa67a585c
commit 3076e0bf26
6 changed files with 29 additions and 3 deletions

View File

@@ -337,6 +337,16 @@ bool LLamaModel::hasGPUDevice()
#endif
}
bool LLamaModel::usingGPUDevice()
{
#if defined(GGML_USE_KOMPUTE)
return ggml_vk_using_vulkan();
#elif defined(GGML_USE_METAL)
return true;
#endif
return false;
}
#if defined(_WIN32)
#define DLL_EXPORT __declspec(dllexport)
#else