Skip to content

Commit 5ccca19

Browse files
authored
ggml : vulkan logs (#2547)
1 parent 300c07b commit 5ccca19

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ggml/src/ggml-vulkan.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,8 @@ static void ggml_vk_print_gpu_info(size_t idx) {
20492049
fp16 = fp16 && vk12_features.shaderFloat16;
20502050

20512051
std::string device_name = props2.properties.deviceName.data();
2052-
std::cerr << GGML_VK_NAME << idx << ": " << device_name << " (" << driver_props.driverName << ") | uma: " << uma << " | fp16: " << fp16 << " | warp size: " << subgroup_size << std::endl;
2052+
GGML_LOG_DEBUG("ggml_vulkan: %d = %s (%s) | uma: %d | fp16: %d | warp size: %d\n",
2053+
idx, device_name.c_str(), driver_props.driverName, uma, fp16, subgroup_size);
20532054

20542055
if (props2.properties.deviceType == vk::PhysicalDeviceType::eCpu) {
20552056
std::cerr << "ggml_vulkan: Warning: Device type is CPU. This is probably not the device you want." << std::endl;
@@ -2107,8 +2108,7 @@ void ggml_vk_instance_init() {
21072108
};
21082109
validation_features.setPNext(nullptr);
21092110
instance_create_info.setPNext(&validation_features);
2110-
2111-
std::cerr << "ggml_vulkan: Validation layers enabled" << std::endl;
2111+
GGML_LOG_DEBUG("ggml_vulkan: Validation layers enabled\n");
21122112
}
21132113
vk_instance.instance = vk::createInstance(instance_create_info);
21142114

@@ -2222,8 +2222,8 @@ void ggml_vk_instance_init() {
22222222
vk_instance.device_indices.push_back(0);
22232223
}
22242224
}
2225+
GGML_LOG_DEBUG("ggml_vulkan: Found %d Vulkan devices:\n", vk_instance.device_indices.size());
22252226

2226-
std::cerr << "ggml_vulkan: Found " << vk_instance.device_indices.size() << " Vulkan devices:" << std::endl;
22272227

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

src/whisper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7391,6 +7391,7 @@ static void whisper_exp_compute_token_level_timestamps_dtw(
73917391
void whisper_log_set(ggml_log_callback log_callback, void * user_data) {
73927392
g_state.log_callback = log_callback ? log_callback : whisper_log_callback_default;
73937393
g_state.log_callback_user_data = user_data;
7394+
ggml_log_set(g_state.log_callback, g_state.log_callback_user_data);
73947395
}
73957396

73967397
GGML_ATTRIBUTE_FORMAT(2, 3)

0 commit comments

Comments
 (0)