Skip to content

Commit 5f5e4ce

Browse files
committed
sync : leftovers (#0)
ggml-ci
1 parent f4e0e72 commit 5f5e4ce

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/ggml-cpu/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
211211
endif()
212212
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
213213
message(STATUS "PowerPC detected")
214-
execute_process(COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
215-
OUTPUT_VARIABLE POWER10_M)
216-
string(FIND ${POWER10_M} "POWER10" substring_index)
217-
if(${substring_index} GREATER_EQUAL 0)
214+
execute_process(COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1" OUTPUT_VARIABLE POWER10_M)
215+
string(FIND "${POWER10_M}" "POWER10" substring_index)
216+
if (NOT DEFINED substring_index OR "${substring_index}" STREQUAL "")
217+
set(substring_index -1)
218+
endif()
219+
220+
if (${substring_index} GREATER_EQUAL 0)
218221
list(APPEND ARCH_FLAGS -mcpu=power10)
219222
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
220223
list(APPEND ARCH_FLAGS -mcpu=powerpc64le)

src/ggml-metal/ggml-metal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3553,7 +3553,7 @@ static enum ggml_status ggml_metal_graph_compute(
35533553
dispatch_apply(n_cb, ctx->d_queue, ctx->encode_async);
35543554

35553555
// wait for completion and check status of each command buffer
3556-
// needed to detect if the device ran out-of-memory for example (llama/1881)
3556+
// needed to detect if the device ran out-of-memory for example (#1881)
35573557
{
35583558
id<MTLCommandBuffer> command_buffer = ctx->command_buffers[n_cb];
35593559
[command_buffer waitUntilCompleted];

src/ggml-vulkan/ggml-vulkan.cpp

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

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

17681769
if (props2.properties.deviceType == vk::PhysicalDeviceType::eCpu) {
17691770
std::cerr << "ggml_vulkan: Warning: Device type is CPU. This is probably not the device you want." << std::endl;
@@ -1821,8 +1822,7 @@ void ggml_vk_instance_init() {
18211822
};
18221823
validation_features.setPNext(nullptr);
18231824
instance_create_info.setPNext(&validation_features);
1824-
1825-
std::cerr << "ggml_vulkan: Validation layers enabled" << std::endl;
1825+
GGML_LOG_DEBUG("ggml_vulkan: Validation layers enabled\n");
18261826
}
18271827
vk_instance.instance = vk::createInstance(instance_create_info);
18281828

@@ -1936,8 +1936,8 @@ void ggml_vk_instance_init() {
19361936
vk_instance.device_indices.push_back(0);
19371937
}
19381938
}
1939+
GGML_LOG_DEBUG("ggml_vulkan: Found %d Vulkan devices:\n", vk_instance.device_indices.size());
19391940

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

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

0 commit comments

Comments
 (0)