mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	vulkan: add workaround for iterator boundary check to fix clang-cl debug build (#7426)
This commit is contained in:
		| @@ -505,6 +505,12 @@ if (LLAMA_VULKAN) | |||||||
|  |  | ||||||
|         add_compile_definitions(GGML_USE_VULKAN) |         add_compile_definitions(GGML_USE_VULKAN) | ||||||
|  |  | ||||||
|  |         # Workaround to the "can't dereference invalidated vector iterator" bug in clang-cl debug build | ||||||
|  |         # Posssibly relevant: https://stackoverflow.com/questions/74748276/visual-studio-no-displays-the-correct-length-of-stdvector | ||||||
|  |         if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||||
|  |             add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0) | ||||||
|  |         endif() | ||||||
|  |  | ||||||
|         if (LLAMA_VULKAN_CHECK_RESULTS) |         if (LLAMA_VULKAN_CHECK_RESULTS) | ||||||
|             add_compile_definitions(GGML_VULKAN_CHECK_RESULTS) |             add_compile_definitions(GGML_VULKAN_CHECK_RESULTS) | ||||||
|         endif() |         endif() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 k.h.lai
					k.h.lai