Skip to content

Commit fd4a1d4

Browse files
authored
Merge pull request #2 from ring-c/main
Cublas support from upstream
2 parents 2c60396 + 50ff108 commit fd4a1d4

8 files changed

+8
-379
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/cmake-build-release/
66
/cmake-build-debug-visual-studio/
77
/cmake-build-release-visual-studio/
8+
/.idea

.idea/.name

-1
This file was deleted.

.idea/misc.xml

-4
This file was deleted.

.idea/modules.xml

-8
This file was deleted.

.idea/stable-diffusion.cpp-build.iml

-2
This file was deleted.

.idea/vcs.xml

-8
This file was deleted.

.idea/workspace.xml

-356
This file was deleted.

CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ option(SD_AVX "sd: enable AVX" ON)
2929
option(SD_AVX2 "sd: enable AVX2" ON)
3030
option(SD_AVX512 "sd: enable AVX512" OFF)
3131
option(SD_FMA "sd: enable FMA" ON)
32+
option(SD_CUBLAS "sd: cuda backend" OFF)
3233

3334
if (SD_AVX512)
3435
set(GGML_AVX512 ON)
@@ -41,6 +42,12 @@ if (SD_FMA)
4142
set(GGML_FMA ON)
4243
endif ()
4344

45+
if(SD_CUBLAS)
46+
message("Use CUBLAS as backend stable-diffusion")
47+
set(GGML_CUBLAS ON)
48+
add_definitions(-DSD_USE_CUBLAS)
49+
endif()
50+
4451
include(sd)
4552
include_directories(${sd_SOURCE_DIR})
4653

0 commit comments

Comments
 (0)