stable-diffusion.cpp
stable-diffusion.cpp copied to clipboard
Link error when building
Hi,
I tried to build with ROCm support and it's fail.
Build output:
quentin@quentin-pc:~/Documents/stable-diffusion.cpp/build$ cmake .. -G "Ninja" -DCMAKE_C_COMPILER=$(hipconfig -l)/clang -DCMAKE_CXX_COMPILER=$(hipconfig -l)/clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1100-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/llvm17/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/llvm17/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Use HIPBLAS as backend stable-diffusion
Build static library
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- CMAKE_SYSTEM_PROCESSOR: x86_64
GNU ld version 2.41-37.fc40
-- x86 detected
-- Linux detected
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS - Failed
-- HIP and hipBLAS found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/quentin/Documents/stable-diffusion.cpp/build
quentin@quentin-pc:~/Documents/stable-diffusion.cpp/build$ cmake --build . --config Release
[3/14] Building C object thirdparty/CMakeFiles/zip.dir/zip.c.o
In file included from /home/quentin/Documents/stable-diffusion.cpp/thirdparty/zip.c:40:
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/miniz.h:4988:9: warning: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files. [-W#pragma-messages]
4988 | #pragma message( \
| ^
1 warning generated.
[4/14] Building CXX object CMakeFiles/stable-diffusion.dir/util.cpp.o
In file included from /home/quentin/Documents/stable-diffusion.cpp/util.cpp:29:
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:760:31: warning: expression result unused [-Wunused-value]
760 | STBIR__DEBUG_ASSERT(scale <= 1);
| ~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:778:31: warning: expression result unused [-Wunused-value]
778 | STBIR__DEBUG_ASSERT(scale <= 1);
| ~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1041:56: warning: expression result unused [-Wunused-value]
1041 | STBIR__DEBUG_ASSERT(in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1046:41: warning: expression result unused [-Wunused-value]
1046 | STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1064:128: warning: expression result unused [-Wunused-value]
1064 | STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1066:38: warning: expression result unused [-Wunused-value]
1066 | STBIR__DEBUG_ASSERT(total_filter > 0.9);
| ~~~~~~~~~~~~ ^ ~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1067:38: warning: expression result unused [-Wunused-value]
1067 | STBIR__DEBUG_ASSERT(total_filter < 1.1f); // Make sure it's not way off.
| ~~~~~~~~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1089:59: warning: expression result unused [-Wunused-value]
1089 | STBIR__DEBUG_ASSERT(out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1094:41: warning: expression result unused [-Wunused-value]
1094 | STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1103:133: warning: expression result unused [-Wunused-value]
1103 | STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1138:35: warning: expression result unused [-Wunused-value]
1138 | STBIR__DEBUG_ASSERT(total > 0.9f);
| ~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1139:35: warning: expression result unused [-Wunused-value]
1139 | STBIR__DEBUG_ASSERT(total < 1.1f);
| ~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1427:47: warning: expression result unused [-Wunused-value]
1427 | STBIR__DEBUG_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index);
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1459:32: warning: expression result unused [-Wunused-value]
1459 | STBIR__DEBUG_ASSERT(n1 >= n0);
| ~~ ^ ~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1460:32: warning: expression result unused [-Wunused-value]
1460 | STBIR__DEBUG_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1461:32: warning: expression result unused [-Wunused-value]
1461 | STBIR__DEBUG_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1462:32: warning: expression result unused [-Wunused-value]
1462 | STBIR__DEBUG_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1463:32: warning: expression result unused [-Wunused-value]
1463 | STBIR__DEBUG_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1471:53: warning: expression result unused [-Wunused-value]
1471 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1480:53: warning: expression result unused [-Wunused-value]
1480 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1490:53: warning: expression result unused [-Wunused-value]
1490 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1501:53: warning: expression result unused [-Wunused-value]
1501 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1514:53: warning: expression result unused [-Wunused-value]
1514 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1537:25: warning: expression result unused [-Wunused-value]
1537 | STBIR__DEBUG_ASSERT(!stbir__use_width_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1555:53: warning: expression result unused [-Wunused-value]
1555 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1576:53: warning: expression result unused [-Wunused-value]
1576 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1598:53: warning: expression result unused [-Wunused-value]
1598 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1621:53: warning: expression result unused [-Wunused-value]
1621 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1646:53: warning: expression result unused [-Wunused-value]
1646 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2005:25: warning: expression result unused [-Wunused-value]
2005 | STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2079:66: warning: expression result unused [-Wunused-value]
2079 | STBIR__DEBUG_ASSERT(in_last_scanline - in_first_scanline <= stbir_info->vertical_filter_pixel_width);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2171:25: warning: expression result unused [-Wunused-value]
2171 | STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2180:68: warning: expression result unused [-Wunused-value]
2180 | STBIR__DEBUG_ASSERT(out_last_scanline - out_first_scanline <= stbir_info->vertical_filter_pixel_width);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2382:92: warning: expression result unused [-Wunused-value]
2382 | STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->encode_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2390:90: warning: expression result unused [-Wunused-value]
2390 | STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->ring_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 warnings generated.
[6/14] Building CXX object ggml/src/CMakeFiles/ggml-rocm.dir/ggml-cuda.cu.o
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:15:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:144:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
144 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:165:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
165 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:186:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
186 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:208:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
208 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:235:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
235 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:252:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
252 | struct {
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:356:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
356 | }
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:382:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
382 | #if FP16_AVAILABLE
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:25: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:382:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:54: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:415:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
415 | #if FP16_AVAILABLE
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:25: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:415:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:54: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:1928:10: warning: variable 'any_pascal_with_slow_fp16' set but not used [-Wunused-but-set-variable]
1928 | bool any_pascal_with_slow_fp16 = false;
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:1:
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.h:3:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:564:12: warning: 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations]
564 | struct ggml_tensor {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2093:28: note: in implicit copy constructor for 'ggml_tensor' first required here
2093 | ggml_tensor src0_row = *src0;
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:567:9: note: 'backend' has been explicitly marked deprecated here
567 | GGML_DEPRECATED(enum ggml_backend_type backend, "use the buffer type to find the storage location of the tensor");
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:202:61: note: expanded from macro 'GGML_DEPRECATED'
202 | # define GGML_DEPRECATED(func, hint) func __attribute__((deprecated(hint)))
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2773:33: warning: unused variable 'cuda_ctx' [-Wunused-variable]
2773 | ggml_backend_cuda_context * cuda_ctx = (ggml_backend_cuda_context *) backend->context;
| ^~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:3047:62: warning: unused parameter 'buffer' [-Wunused-parameter]
3047 | GGML_CALL bool ggml_backend_cuda_register_host_buffer(void * buffer, size_t size) {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:3047:77: warning: unused parameter 'size' [-Wunused-parameter]
3047 | GGML_CALL bool ggml_backend_cuda_register_host_buffer(void * buffer, size_t size) {
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:333:13: warning: unused function 'fast_fp16_available' [-Wunused-function]
333 | static bool fast_fp16_available(const int cc) {
| ^~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:337:13: warning: unused function 'fp16_mma_available' [-Wunused-function]
337 | static bool fp16_mma_available(const int cc) {
| ^~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2468:13: warning: unused function 'set_ggml_graph_node_properties' [-Wunused-function]
2468 | static void set_ggml_graph_node_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2480:13: warning: unused function 'ggml_graph_node_has_matching_properties' [-Wunused-function]
2480 | static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 warnings generated when compiling for gfx1100.
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:15:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:144:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
144 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:165:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
165 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:186:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
186 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:208:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
208 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:235:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
235 | struct {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/./ggml-common.h:252:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
252 | struct {
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:356:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
356 | }
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:382:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
382 | #if FP16_AVAILABLE
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:25: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:382:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:54: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:415:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
415 | #if FP16_AVAILABLE
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:25: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:415:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:329:54: note: expanded from macro 'FP16_AVAILABLE'
329 | #define FP16_AVAILABLE (defined(GGML_USE_HIPBLAS) && defined(__HIP_PLATFORM_AMD__)) || __CUDA_ARCH__ >= CC_PASCAL
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:1928:10: warning: variable 'any_pascal_with_slow_fp16' set but not used [-Wunused-but-set-variable]
1928 | bool any_pascal_with_slow_fp16 = false;
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:1:
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.h:3:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:564:12: warning: 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations]
564 | struct ggml_tensor {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2093:28: note: in implicit copy constructor for 'ggml_tensor' first required here
2093 | ggml_tensor src0_row = *src0;
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:567:9: note: 'backend' has been explicitly marked deprecated here
567 | GGML_DEPRECATED(enum ggml_backend_type backend, "use the buffer type to find the storage location of the tensor");
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/../include/ggml/ggml.h:202:61: note: expanded from macro 'GGML_DEPRECATED'
202 | # define GGML_DEPRECATED(func, hint) func __attribute__((deprecated(hint)))
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2773:33: warning: unused variable 'cuda_ctx' [-Wunused-variable]
2773 | ggml_backend_cuda_context * cuda_ctx = (ggml_backend_cuda_context *) backend->context;
| ^~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:3047:62: warning: unused parameter 'buffer' [-Wunused-parameter]
3047 | GGML_CALL bool ggml_backend_cuda_register_host_buffer(void * buffer, size_t size) {
| ^
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:3047:77: warning: unused parameter 'size' [-Wunused-parameter]
3047 | GGML_CALL bool ggml_backend_cuda_register_host_buffer(void * buffer, size_t size) {
| ^
In file included from /home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:5:
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:333:13: warning: unused function 'fast_fp16_available' [-Wunused-function]
333 | static bool fast_fp16_available(const int cc) {
| ^~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda/common.cuh:337:13: warning: unused function 'fp16_mma_available' [-Wunused-function]
337 | static bool fp16_mma_available(const int cc) {
| ^~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2468:13: warning: unused function 'set_ggml_graph_node_properties' [-Wunused-function]
2468 | static void set_ggml_graph_node_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:2480:13: warning: unused function 'ggml_graph_node_has_matching_properties' [-Wunused-function]
2480 | static bool ggml_graph_node_has_matching_properties(ggml_tensor * node, ggml_graph_node_properties * graph_node_properties) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 warnings generated when compiling for host.
[7/14] Building CXX object examples/cli/CMakeFiles/sd.dir/main.cpp.o
In file included from /home/quentin/Documents/stable-diffusion.cpp/examples/cli/main.cpp:22:
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:760:31: warning: expression result unused [-Wunused-value]
760 | STBIR__DEBUG_ASSERT(scale <= 1);
| ~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:778:31: warning: expression result unused [-Wunused-value]
778 | STBIR__DEBUG_ASSERT(scale <= 1);
| ~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1041:56: warning: expression result unused [-Wunused-value]
1041 | STBIR__DEBUG_ASSERT(in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1046:41: warning: expression result unused [-Wunused-value]
1046 | STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1064:128: warning: expression result unused [-Wunused-value]
1064 | STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1066:38: warning: expression result unused [-Wunused-value]
1066 | STBIR__DEBUG_ASSERT(total_filter > 0.9);
| ~~~~~~~~~~~~ ^ ~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1067:38: warning: expression result unused [-Wunused-value]
1067 | STBIR__DEBUG_ASSERT(total_filter < 1.1f); // Make sure it's not way off.
| ~~~~~~~~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1089:59: warning: expression result unused [-Wunused-value]
1089 | STBIR__DEBUG_ASSERT(out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical.
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1094:41: warning: expression result unused [-Wunused-value]
1094 | STBIR__DEBUG_ASSERT(contributor->n1 >= contributor->n0);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1103:133: warning: expression result unused [-Wunused-value]
1103 | STBIR__DEBUG_ASSERT(stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1138:35: warning: expression result unused [-Wunused-value]
1138 | STBIR__DEBUG_ASSERT(total > 0.9f);
| ~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1139:35: warning: expression result unused [-Wunused-value]
1139 | STBIR__DEBUG_ASSERT(total < 1.1f);
| ~~~~~ ^ ~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1427:47: warning: expression result unused [-Wunused-value]
1427 | STBIR__DEBUG_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index);
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1459:32: warning: expression result unused [-Wunused-value]
1459 | STBIR__DEBUG_ASSERT(n1 >= n0);
| ~~ ^ ~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1460:32: warning: expression result unused [-Wunused-value]
1460 | STBIR__DEBUG_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1461:32: warning: expression result unused [-Wunused-value]
1461 | STBIR__DEBUG_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1462:32: warning: expression result unused [-Wunused-value]
1462 | STBIR__DEBUG_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1463:32: warning: expression result unused [-Wunused-value]
1463 | STBIR__DEBUG_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);
| ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1471:53: warning: expression result unused [-Wunused-value]
1471 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1480:53: warning: expression result unused [-Wunused-value]
1480 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1490:53: warning: expression result unused [-Wunused-value]
1490 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1501:53: warning: expression result unused [-Wunused-value]
1501 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1514:53: warning: expression result unused [-Wunused-value]
1514 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1537:25: warning: expression result unused [-Wunused-value]
1537 | STBIR__DEBUG_ASSERT(!stbir__use_width_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1555:53: warning: expression result unused [-Wunused-value]
1555 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1576:53: warning: expression result unused [-Wunused-value]
1576 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1598:53: warning: expression result unused [-Wunused-value]
1598 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1621:53: warning: expression result unused [-Wunused-value]
1621 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:1646:53: warning: expression result unused [-Wunused-value]
1646 | STBIR__DEBUG_ASSERT(coefficient != 0);
| ~~~~~~~~~~~ ^ ~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2005:25: warning: expression result unused [-Wunused-value]
2005 | STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2079:66: warning: expression result unused [-Wunused-value]
2079 | STBIR__DEBUG_ASSERT(in_last_scanline - in_first_scanline <= stbir_info->vertical_filter_pixel_width);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2171:25: warning: expression result unused [-Wunused-value]
2171 | STBIR__DEBUG_ASSERT(!stbir__use_height_upsampling(stbir_info));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2180:68: warning: expression result unused [-Wunused-value]
2180 | STBIR__DEBUG_ASSERT(out_last_scanline - out_first_scanline <= stbir_info->vertical_filter_pixel_width);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2382:92: warning: expression result unused [-Wunused-value]
2382 | STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->encode_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/quentin/Documents/stable-diffusion.cpp/thirdparty/stb_image_resize.h:2390:90: warning: expression result unused [-Wunused-value]
2390 | STBIR__DEBUG_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->ring_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 warnings generated.
[12/14] Building CXX object CMakeFiles/stable-diffusion.dir/stable-diffusion.cpp.o
In file included from /home/quentin/Documents/stable-diffusion.cpp/stable-diffusion.cpp:15:
/home/quentin/Documents/stable-diffusion.cpp/tae.hpp:194:17: warning: field 'decode_only' is uninitialized when used here [-Wuninitialized]
194 | taesd(decode_only),
| ^
1 warning generated.
[14/14] Linking CXX executable bin/sd
FAILED: bin/sd
: && /usr/lib64/llvm17/bin/clang++ -O3 -DNDEBUG examples/cli/CMakeFiles/sd.dir/main.cpp.o -o bin/sd libstable-diffusion.a ggml/src/libggml.a -lm --hip-link --offload-arch=gfx1100 /usr/lib64/libhipblas.so.2.0 /usr/lib64/librocblas.so.4.0 /usr/lib64/llvm17/bin/../../../lib/clang/17/lib/x86_64-redhat-linux-gnu/libclang_rt.builtins.a /usr/lib64/libamdhip64.so.6.0.32831 && :
/usr/bin/ld: ggml/src/libggml.a(ggml-cuda.cu.o) : dans la fonction « ggml_backend_cuda_graph_compute(ggml_backend*, ggml_cgraph*) » :
ggml-cuda.cu:(.text+0x32af): undefined reference to `ggml_cuda_op_diag_mask_inf(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x362e): undefined reference to `ggml_cuda_flash_attn_ext(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3640): undefined reference to `ggml_cuda_op_leaky_relu(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x366d): undefined reference to `ggml_cuda_op_tanh(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x367f): undefined reference to `ggml_cuda_op_sum_rows(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x369c): undefined reference to `ggml_cuda_cpy(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x36ae): undefined reference to `ggml_cuda_op_div(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x36c0): undefined reference to `ggml_cuda_op_argsort(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x36d2): undefined reference to `ggml_cuda_op_scale(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x36e4): undefined reference to `ggml_cuda_op_repeat(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x36f6): undefined reference to `ggml_cuda_op_sqr(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3708): undefined reference to `ggml_cuda_op_add(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x371a): undefined reference to `ggml_cuda_op_mul(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x372c): undefined reference to `ggml_cuda_op_concat(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x376f): undefined reference to `ggml_cuda_dup(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3781): undefined reference to `ggml_cuda_op_norm(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3793): undefined reference to `ggml_cuda_op_group_norm(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37a5): undefined reference to `ggml_cuda_op_rms_norm(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37b7): undefined reference to `ggml_cuda_op_clamp(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37c9): undefined reference to `ggml_cuda_op_pad(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37db): undefined reference to `ggml_cuda_op_arange(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37ed): undefined reference to `ggml_cuda_op_acc(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x37ff): undefined reference to `ggml_cuda_op_pool2d(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3811): undefined reference to `ggml_cuda_op_upscale(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3823): undefined reference to `ggml_cuda_op_timestep_embedding(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3963): undefined reference to `ggml_cuda_op_soft_max(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3975): undefined reference to `ggml_cuda_op_get_rows(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3987): undefined reference to `ggml_cuda_op_im2col(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x3999): undefined reference to `ggml_cuda_op_rope(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x4437): undefined reference to `ggml_cuda_op_gelu_quick(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x4449): undefined reference to `ggml_cuda_op_silu(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x445b): undefined reference to `ggml_cuda_op_sigmoid(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x446d): undefined reference to `ggml_cuda_op_hardsigmoid(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x447f): undefined reference to `ggml_cuda_op_gelu(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x4491): undefined reference to `ggml_cuda_op_relu(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x44a3): undefined reference to `ggml_cuda_op_hardswish(ggml_backend_cuda_context&, ggml_tensor*)'
/usr/bin/ld: ggml/src/libggml.a(ggml-cuda.cu.o) : dans la fonction « ggml_cuda_mul_mat(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*) » :
ggml-cuda.cu:(.text+0x500a): undefined reference to `ggml_cuda_supports_mmq(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x5068): undefined reference to `ggml_cuda_supports_mmq(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x55ba): undefined reference to `ggml_cuda_op_mul_mat_vec_q(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, char const*, float const*, char const*, float*, long, long, long, long, ihipStream_t*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x55c7): undefined reference to `ggml_cuda_op_dequantize_mul_mat_vec(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, char const*, float const*, char const*, float*, long, long, long, long, ihipStream_t*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x55eb): undefined reference to `ggml_cuda_op_mul_mat_q(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, char const*, float const*, char const*, float*, long, long, long, long, ihipStream_t*)'
/usr/bin/ld: ggml/src/libggml.a(ggml-cuda.cu.o) : dans la fonction « ggml_cuda_mul_mat_batched_cublas(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*) » :
ggml-cuda.cu:(.text+0x5bad): undefined reference to `ggml_get_to_fp16_cuda(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x6393): undefined reference to `ggml_get_to_fp32_cuda(ggml_type)'
/usr/bin/ld: ggml/src/libggml.a(ggml-cuda.cu.o) : dans la fonction « ggml_cuda_op_mul_mat(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, void (*)(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, char const*, float const*, char const*, float*, long, long, long, long, ihipStream_t*), bool) » :
ggml-cuda.cu:(.text+0x74ab): undefined reference to `quantize_row_q8_1_cuda(float const*, void*, long, long, long, ihipStream_t*)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x7cf9): undefined reference to `quantize_row_q8_1_cuda(float const*, void*, long, long, long, ihipStream_t*)'
/usr/bin/ld: ggml/src/libggml.a(ggml-cuda.cu.o) : dans la fonction « ggml_cuda_op_mul_mat_cublas(ggml_backend_cuda_context&, ggml_tensor const*, ggml_tensor const*, ggml_tensor*, char const*, float const*, char const*, float*, long, long, long, long, ihipStream_t*) » :
ggml-cuda.cu:(.text+0x895c): undefined reference to `ggml_get_to_fp32_cuda(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x89a8): undefined reference to `ggml_get_to_fp32_cuda(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x8bd3): undefined reference to `ggml_get_to_fp16_cuda(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x8c8a): undefined reference to `ggml_get_to_fp16_cuda(ggml_type)'
/usr/bin/ld: ggml-cuda.cu:(.text+0x8e60): undefined reference to `ggml_get_to_fp32_cuda(ggml_type)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
ROCm config:
quentin@quentin-pc:~/Documents/stable-diffusion.cpp/build$ hipconfig
HIP version : 6.0.32831-
== hipconfig
HIP_PATH : /usr
ROCM_PATH : /usr
HIP_COMPILER : clang
HIP_PLATFORM : amd
HIP_RUNTIME : rocclr
CPP_CONFIG : -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/usr/include -I/usr/lib64/llvm17/bin/../../../lib/clang/17
== hip-clang
HIP_CLANG_PATH : /usr/lib64/llvm17/bin
clang version 17.0.6 (Fedora 17.0.6-7.fc40)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/lib64/llvm17/bin
LLVM (http://llvm.org/):
LLVM version 17.0.6
Optimized build.
Default target: x86_64-redhat-linux-gnu
Host CPU: znver4
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
amdgcn - AMD GCN GPUs
arm - ARM
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
armeb - ARM (big endian)
avr - Atmel AVR Microcontroller
bpf - BPF (host endian)
bpfeb - BPF (big endian)
bpfel - BPF (little endian)
hexagon - Hexagon
lanai - Lanai
loongarch32 - 32-bit LoongArch
loongarch64 - 64-bit LoongArch
mips - MIPS (32-bit big endian)
mips64 - MIPS (64-bit big endian)
mips64el - MIPS (64-bit little endian)
mipsel - MIPS (32-bit little endian)
msp430 - MSP430 [experimental]
nvptx - NVIDIA PTX 32-bit
nvptx64 - NVIDIA PTX 64-bit
ppc32 - PowerPC 32
ppc32le - PowerPC 32 LE
ppc64 - PowerPC 64
ppc64le - PowerPC 64 LE
r600 - AMD GPUs HD2XXX-HD6XXX
riscv32 - 32-bit RISC-V
riscv64 - 64-bit RISC-V
sparc - Sparc
sparcel - Sparc LE
sparcv9 - Sparc V9
systemz - SystemZ
thumb - Thumb
thumbeb - Thumb (big endian)
ve - VE
wasm32 - WebAssembly 32-bit
wasm64 - WebAssembly 64-bit
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
xcore - XCore
hip-clang-cxxflags : -O3
hip-clang-ldflags : --driver-mode=g++ -O3 --hip-link --rtlib=compiler-rt -unwindlib=libgcc
=== Environment Variables
PATH=/home/quentin/.local/bin:/home/quentin/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
egrep: warning: egrep is obsolescent; using grep -E
== Linux Kernel
Hostname : quentin-pc
Linux quentin-pc 6.8.11-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024 x86_64 GNU/Linux
LSB Version: n/a
Distributor ID: Fedora
Description: Fedora Linux 40 (KDE Plasma)
Release: 40
Codename: n/a
Something appears to have fallen through the cracks with ggml's new CUDA build flag. I wound up reverting it back to the last known good version to build with until I have more time.
git submodule update --init
git -C ggml/ checkout -f 57869ad3b7b
git revert be6cd1a
There is an issue with ggml's CMakeLists.txt. This has been fixed in ggml, and I have also synced the upstream changes. You can pull the latest code and try again.
Thanks, it's no longer an issue for me