mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 03:24:30 +00:00
feat: add Metal INT8 ConvRot support (#2297)
This commit is contained in:
1 parent
b43af40461
commit
3d315c47d4
13 files changed
+561
-2
No files matched your search
@@ -111,6 +111,12 @@ if(SD_CUDA)
|
||||
endif()
|
||||
|
||||
if(SD_METAL)
|
||||
if(NOT SD_USE_UPSTREAM_GGML)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.16)
|
||||
message(FATAL_ERROR "SD_METAL with SD_USE_UPSTREAM_GGML=OFF requires CMake 3.16 or later for OBJC and OBJCXX support")
|
||||
endif()
|
||||
enable_language(OBJC OBJCXX)
|
||||
endif()
|
||||
message("-- Use Metal as backend stable-diffusion")
|
||||
set(GGML_METAL ON)
|
||||
endif()
|
||||
@@ -364,6 +370,11 @@ if (SD_CUDA)
|
||||
endif()
|
||||
endif()
|
||||
set(SD_BACKEND_REGISTRATIONS)
|
||||
if (SD_METAL AND NOT SD_USE_UPSTREAM_GGML)
|
||||
add_subdirectory(src/core/metal)
|
||||
target_link_libraries(${SD_LIB} PRIVATE "-framework Foundation" "-framework Metal")
|
||||
list(APPEND SD_BACKEND_REGISTRATIONS sd_ggml_register_metal_i8)
|
||||
endif()
|
||||
if (NOT SD_USE_UPSTREAM_GGML AND (SD_CUDA OR SD_HIPBLAS OR SD_MUSA))
|
||||
if(SD_HIPBLAS)
|
||||
include(cmake/hip.cmake)
|
||||
|
||||
Reference in new issue
Block a user