Skip to content

Commit 5b9d89a

Browse files
0cc4mMinh141120
authored andcommitted
Vulkan: Don't default to CPU device (like llvmpipe), even if no other device is available, to allow fallback to CPU backend (ggml-org#14099)
1 parent 2a09e26 commit 5b9d89a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3679,14 +3679,13 @@ static void ggml_vk_instance_init() {
36793679

36803680
}
36813681

3682-
size_t num_available_devices = vk_instance.instance.enumeratePhysicalDevices().size();
3683-
vk_perf_logger_enabled = getenv("GGML_VK_PERF_LOGGER") != nullptr;
3684-
36853682
// Emulate behavior of CUDA_VISIBLE_DEVICES for Vulkan
36863683
char * devices_env = getenv("GGML_VK_VISIBLE_DEVICES");
36873684
if (devices_env != nullptr) {
36883685
size_t num_available_devices = vk_instance.instance.enumeratePhysicalDevices().size();
36893686

3687+
size_t num_available_devices = vk_instance.instance.enumeratePhysicalDevices().size();
3688+
36903689
std::string devices(devices_env);
36913690
std::replace(devices.begin(), devices.end(), ',', ' ');
36923691

0 commit comments

Comments
 (0)