File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
backend/go/image/stablediffusion-ggml Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ LIBRARY_PATH := $(abspath ./)
4
4
AR? =ar
5
5
CMAKE_ARGS? =
6
6
BUILD_TYPE? =
7
+ ONEAPI_VARS? =/opt/intel/oneapi/setvars.sh
7
8
# keep standard at C11 and C++11
8
9
CXXFLAGS = -I. -I$(INCLUDE_PATH ) /../../../../sources/stablediffusion-ggml.cpp/thirdparty -I$(INCLUDE_PATH ) /../../../../sources/stablediffusion-ggml.cpp/ggml/include -I$(INCLUDE_PATH ) /../../../../sources/stablediffusion-ggml.cpp -O3 -DNDEBUG -std=c++17 -fPIC
9
10
@@ -69,10 +70,19 @@ $(COMBINED_LIB): $(ALL_ARCHIVES)
69
70
rm -rf merge-tmp
70
71
71
72
build/libstable-diffusion.a :
73
+ @echo " Building SD with $( BUILD_TYPE) build type and $( CMAKE_ARGS) "
74
+ ifneq (,$(findstring sycl,$(BUILD_TYPE ) ) )
75
+ +bash -c "source $(ONEAPI_VARS); \
76
+ mkdir -p build && \
77
+ cd build && \
78
+ cmake $(CMAKE_ARGS) ../../../../../sources/stablediffusion-ggml.cpp && \
79
+ cmake --build . --config Release"
80
+ else
72
81
mkdir -p build && \
73
82
cd build && \
74
83
cmake $(CMAKE_ARGS) ../../../../../sources/stablediffusion-ggml.cpp && \
75
84
cmake --build . --config Release
85
+ endif
76
86
$(MAKE) $(COMBINED_LIB)
77
87
78
88
gosd.o :
You can’t perform that action at this time.
0 commit comments