Skip to content

Commit 6501203

Browse files
committed
Enable the FORCE_GGML_VK_PERF_LOGGER flag through an option
1 parent a4c329b commit 6501203

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ option(LLAMA_MTMD "llama: multimodal support" ${LLAMA_BUILD_TOOLS})
9090
option(LLAMA_CURL "llama: use libcurl to download model from an URL" ON)
9191
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
9292

93+
# profiling
94+
option(FORCE_GGML_VK_PERF_LOGGER "Force vk performance logging in ggml" OFF)
95+
9396
# Required for relocatable CMake package
9497
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
9598
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/common.cmake)

ggml/src/ggml-vulkan/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ if (Vulkan_FOUND)
9292
target_include_directories(ggml-vulkan PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
9393
target_include_directories(ggml-vulkan PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/vulkan_cpp_wrapper/include")
9494

95+
if (FORCE_GGML_VK_PERF_LOGGER)
96+
add_compile_definitions(FORCE_GGML_VK_PERF_LOGGER)
97+
endif()
9598
# Workaround to the "can't dereference invalidated vector iterator" bug in clang-cl debug build
9699
# Posssibly relevant: https://stackoverflow.com/questions/74748276/visual-studio-no-displays-the-correct-length-of-stdvector
97100
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

0 commit comments

Comments
 (0)