Skip to content

Commit

Permalink
Merge pull request #2 from ring-c/main
Browse files Browse the repository at this point in the history
Cublas support from upstream
  • Loading branch information
Cyberhan123 committed Apr 12, 2024
2 parents 2c60396 + 50ff108 commit fd4a1d4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 379 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/cmake-build-release/
/cmake-build-debug-visual-studio/
/cmake-build-release-visual-studio/
/.idea
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

2 changes: 0 additions & 2 deletions .idea/stable-diffusion.cpp-build.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/vcs.xml

This file was deleted.

356 changes: 0 additions & 356 deletions .idea/workspace.xml

This file was deleted.

7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option(SD_AVX "sd: enable AVX" ON)
option(SD_AVX2 "sd: enable AVX2" ON)
option(SD_AVX512 "sd: enable AVX512" OFF)
option(SD_FMA "sd: enable FMA" ON)
option(SD_CUBLAS "sd: cuda backend" OFF)

if (SD_AVX512)
set(GGML_AVX512 ON)
Expand All @@ -41,6 +42,12 @@ if (SD_FMA)
set(GGML_FMA ON)
endif ()

if(SD_CUBLAS)
message("Use CUBLAS as backend stable-diffusion")
set(GGML_CUBLAS ON)
add_definitions(-DSD_USE_CUBLAS)
endif()

include(sd)
include_directories(${sd_SOURCE_DIR})

Expand Down

0 comments on commit fd4a1d4

Please sign in to comment.