Skip to content

Commit 9b75f03

Browse files
authored
Vulkan: Fix device info output format specifiers (#10366)
* Vulkan: Fix device info output format specifiers * Vulkan: Use zu printf specifier for size_t instead of ld
1 parent 75207b3 commit 9b75f03

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,11 +1764,11 @@ static void ggml_vk_print_gpu_info(size_t idx) {
17641764
fp16 = fp16 && vk12_features.shaderFloat16;
17651765

17661766
std::string device_name = props2.properties.deviceName.data();
1767-
GGML_LOG_DEBUG("ggml_vulkan: %d = %s (%s) | uma: %d | fp16: %d | warp size: %d\n",
1768-
idx, device_name.c_str(), driver_props.driverName, uma, fp16, subgroup_size);
1767+
GGML_LOG_DEBUG("ggml_vulkan: %zu = %s (%s) | uma: %d | fp16: %d | warp size: %zu\n",
1768+
idx, device_name.c_str(), driver_props.driverName.data(), uma, fp16, subgroup_size);
17691769

17701770
if (props2.properties.deviceType == vk::PhysicalDeviceType::eCpu) {
1771-
std::cerr << "ggml_vulkan: Warning: Device type is CPU. This is probably not the device you want." << std::endl;
1771+
GGML_LOG_DEBUG("ggml_vulkan: Warning: Device type is CPU. This is probably not the device you want.\n");
17721772
}
17731773
}
17741774

@@ -1937,8 +1937,7 @@ void ggml_vk_instance_init() {
19371937
vk_instance.device_indices.push_back(0);
19381938
}
19391939
}
1940-
GGML_LOG_DEBUG("ggml_vulkan: Found %d Vulkan devices:\n", vk_instance.device_indices.size());
1941-
1940+
GGML_LOG_DEBUG("ggml_vulkan: Found %zu Vulkan devices:\n", vk_instance.device_indices.size());
19421941

19431942
for (size_t i = 0; i < vk_instance.device_indices.size(); i++) {
19441943
ggml_vk_print_gpu_info(i);

0 commit comments

Comments
 (0)