vitoplantamura / OnnxStream

Lightweight inference library for ONNX files, written in C++. It can run Stable Diffusion XL 1.0 on a RPI Zero 2 (or in 298MB of RAM) but also Mistral 7B on desktops and servers. ARM, x86, WASM, RISC-V supported. Accelerated by XNNPACK.
https://yolo.vitoplantamura.com/
Other
1.86k stars 84 forks source link

error doing OnnxStream build #27

Open TheJohnHanson1 opened 1 year ago

TheJohnHanson1 commented 1 year ago

I made it through cmake install, and XNNPACK build without errors, but the OnnxStream build bombs out -- 100%] Built target cpuinfo_internals pi@PI64bit:~/XNNPACK/build $ cd /home/pi pi@PI64bit:~ $ cd OnnxStream cd src pi@PI64bit:~/OnnxStream/src $ cd build pi@PI64bit:~/OnnxStream/src/build $ cmake -DMAX_SPEED=ON -DXNNPACK_DIR=/home/pi/ XNNPACK .. -- Configuring done -- Generating done -- Build files have been written to: /home/pi/OnnxStream/src/build pi@PI64bit:~/OnnxStream/src/build $ cmake --build . --config Release [ 33%] Building CXX object CMakeFiles/sd.dir/onnxstream.cpp.o In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/vector:60, from /home/pi/OnnxStream/src/onnxstream.h:4, from /home/pi/OnnxStream/src/onnxstream.cpp:1: /usr/include/c++/10/bits/stl_pair.h: In i

-- the usual pages of errors, ending in --- home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scop e_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax ::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] gmake[2]: [CMakeFiles/sd.dir/build.make:95: CMakeFiles/sd.dir/onnxstream.cpp .o] Error 1 gmake[1]: [CMakeFiles/Makefile2:95: CMakeFiles/sd.dir/all] Error 2 gmake: *** [Makefile:103: all] Error 2 pi@PI64bit:~/OnnxStream/src/build $

Darn! almost made it! Bard is stumped. Ruinning pi zero 2 W 64 bit tiny raspbian.

vitoplantamura commented 1 year ago

hi,

can you post the entire output of the command, with all the errors?

Thanks, Vito

TheJohnHanson1 commented 1 year ago

Hi Vito Thanks so much for responding - I was so happy making it through everything, but, as usual, the last step was the cliff-

Linux PI64bit 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Oct 9 15:24:54 2023 from 192.168.86.5 pi@PI64bit:~ $ cd OnnxStream pi@PI64bit:~/OnnxStream $ cd src pi@PI64bit:~/OnnxStream/src $ cd build pi@PI64bit:~/OnnxStream/src/build $ cmake -DMAX_SPEED=ON -DXNNPACK_DIR=/home/pi/XNNPACK .. -- Configuring done -- Generating done -- Build files have been written to: /home/pi/OnnxStream/src/build pi@PI64bit:~/OnnxStream/src/build $ cmake --build . --config Release [ 33%] Building CXX object CMakeFiles/sd.dir/onnxstream.cpp.o In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/vector:60, from /home/pi/OnnxStream/src/onnxstream.h:4, from /home/pi/OnnxStream/src/onnxstream.cpp:1: /usr/include/c++/10/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type, typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type> std::make_pair(_T1&&, _T2&&) [with _T1 = float&; _T2 = float&; typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type = float; typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:2085:60: required from here /usr/include/c++/10/bits/stl_pair.h:567:5: note: parameter passing for argument of type ‘std::pair<float, float>’ when C++17 is enabled changed to match C++14 in GCC 10.1 567 make_pair(_T1&& __x, _T2&& __y) ^~~~~ /home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = float; onnxstream::tensor_vector = std::vector<float, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1786:96: required from here /home/pi/OnnxStream/src/onnxstream.cpp:837:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 837 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x32; ^~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = short unsigned int; onnxstream::tensor_vector = std::vector<short unsigned int, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1792:99: required from here /home/pi/OnnxStream/src/onnxstream.cpp:842:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 842 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x16; ^~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = unsigned char; onnxstream::tensor_vector = std::vector<unsigned char, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1798:98: required from here /home/pi/OnnxStream/src/onnxstream.cpp:847:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 847 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x8; ^~~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = float; U = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:2951:179: required from here /home/pi/OnnxStream/src/onnxstream.cpp:372:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const float, float)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const float, float, pthreadpool*)’} [-fpermissive] 372 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, const float, float) {aka xnn_status ()(xnn_operator, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = short unsigned int; U = short unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:2968:185: required from here /home/pi/OnnxStream/src/onnxstream.cpp:377:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const void, void, pthreadpool*)’} [-fpermissive] 377 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = float; U = float; onnxstream::tensor_vector = std::vector<float, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3154:66: required from here /home/pi/OnnxStream/src/onnxstream.cpp:591:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 591 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_f32; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:592:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const float, float)’ {aka ‘xnn_status ()(xnn_operator, void, const float, float)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} [-fpermissive] 592 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const float, float) {aka xnn_status ()(xnn_operator, void, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = short unsigned int; U = short unsigned int; onnxstream::tensor_vector = std::vector<short unsigned int, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3174:66: required from here /home/pi/OnnxStream/src/onnxstream.cpp:597:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 597 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_f16; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:598:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const void, void)’ {aka ‘xnn_status ()(xnn_operator, void, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} [-fpermissive] 598 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const void, void) {aka xnn_status ()(xnn_operator, void, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = unsigned char; U = int; onnxstream::tensor_vector = std::vector<unsigned char, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3228:30: required from here /home/pi/OnnxStream/src/onnxstream.cpp:603:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 603 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_qu8; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:604:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, void, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} [-fpermissive] 604 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, void, const unsigned char, unsigned char*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = unsigned char; U = int]’: /home/pi/OnnxStream/src/onnxstream.cpp:4301:34: required from here /home/pi/OnnxStream/src/onnxstream.cpp:382:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const unsigned char, unsigned char, pthreadpool*)’} [-fpermissive] 382 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, const unsigned char, unsigned char*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:4365:86: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1097:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const float, float)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const float, float, pthreadpool)’} [-fpermissive] 1097 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, const float, float) {aka xnn_status ()(xnn_operator, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = short unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:4378:86: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1102:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const void, void, pthreadpool)’} [-fpermissive] 1102 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = unsigned char]’: /home/pi/OnnxStream/src/onnxstream.cpp:4397:115: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1107:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const unsigned char, unsigned char, pthreadpool)’} [-fpermissive] 1107 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, const unsigned char, unsigned char*)}

In file included from /home/pi/OnnxStream/src/onnxstream.cpp:1: /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] 79 | scope_guard(Callable&& undo_func) : f(std::forward(undo_func)) { } | ^~~ /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<float, float>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<float, float>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<float, float>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<float, float>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<unsigned char, int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<unsigned char, int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<unsigned char, int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<unsigned char, int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] gmake[2]: [CMakeFiles/sd.dir/build.make:95: CMakeFiles/sd.dir/onnxstream.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:95: CMakeFiles/sd.dir/all] Error 2 gmake: *** [Makefile:103: all] Error 2 pi@PI64bit:~/OnnxStream/src/build $

Very strange! Running 64 bity lite, pi zero 2 W. I came to this point from trying e-paper-slow-generative-art project (https://github.com/rvdveen/epaper-slow-generative-art/tree/main) which looks like fun. Thanks again! John Hanson

vitoplantamura commented 1 year ago

I didn't know about this project that uses OnnxStream! Really cute!

Regarding the build error, it seems that you are compiling against the wrong version of XnnPack.

Make sure to run the "git checkout" command before building XnnPack, as in the instructions in the main README.

Vito

TheJohnHanson1 commented 1 year ago

Hey Vito- Thanks again for the tip, I thought I found my stupid error ( remove comment from git checkout - Duh!) and it looked like it was successful, but it looks like the same error -

Linux PI64bit 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Oct 10 10:22:48 2023 from 192.168.86.5 pi@PI64bit:~ $ cd XNNPACK pi@PI64bit:~/XNNPACK $ git rev-list -n 1 --before="2023-06-27 00:00" master 79dd4bd459185ca2224f4415df61cbc18926f9b6 pi@PI64bit:~/XNNPACK $ git checkout -bash: syntax error near unexpected token `newline' pi@PI64bit:~/XNNPACK $ git checkout Your branch is up to date with 'origin/master'. pi@PI64bit:~/XNNPACK $ cd build pi@PI64bit:~/XNNPACK/build $ cmake -DXNNPACK_BUILD_TESTS=OFF -DXNNPACK_BUILD_BENCHMARKS=OFF .. -- Configuring done -- Generating done -- Build files have been written to: /home/pi/XNNPACK/build pi@PI64bit:~/XNNPACK/build $ cmake --build . --config Release [ 0%] Built target pthreadpool [ 0%] Built target normalization [ 0%] Built target allocator [ 0%] Built target packing [ 0%] Built target microkernel-utils [ 0%] Built target logging [ 0%] Built target operator-utils [ 0%] Built target indirection [ 0%] Built target post-operation [ 0%] Built target operators [ 0%] Built target microparams-init [ 0%] Built target memory [ 0%] Built target cache [ 1%] Built target cpuinfo [ 1%] Built target hardware-config [ 8%] Built target microkernels-prod [ 9%] Built target jit [ 9%] Built target mutex [ 9%] Built target operator-run [ 11%] Built target subgraph [ 11%] Built target XNNPACK [ 11%] Built target convolution-test-helpers [100%] Built target microkernels-all [100%] Built target cpuinfo_internals pi@PI64bit:~/XNNPACK/build $ cd /home/OnnxStream -bash: cd: /home/OnnxStream: No such file or directory pi@PI64bit:~/XNNPACK/build $ cd.. -bash: cd..: command not found pi@PI64bit:~/XNNPACK/build $ cd .. pi@PI64bit:~/XNNPACK $ cd .. pi@PI64bit:~ $ cd OnnxStream pi@PI64bit:~/OnnxStream $ cd src pi@PI64bit:~/OnnxStream/src $ cd build pi@PI64bit:~/OnnxStream/src/build $ cmake -DMAX_SPEED=ON -DXNNPACK_DIR=/home/pi/XNNPACK .. -- Configuring done -- Generating done -- Build files have been written to: /home/pi/OnnxStream/src/build pi@PI64bit:~/OnnxStream/src/build $ cmake --build . --config Release [ 33%] Building CXX object CMakeFiles/sd.dir/onnxstream.cpp.o In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/vector:60, from /home/pi/OnnxStream/src/onnxstream.h:4, from /home/pi/OnnxStream/src/onnxstream.cpp:1: /usr/include/c++/10/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type, typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type> std::make_pair(_T1&&, _T2&&) [with _T1 = float&; _T2 = float&; typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type = float; typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:2085:60: required from here /usr/include/c++/10/bits/stl_pair.h:567:5: note: parameter passing for argument of type ‘std::pair<float, float>’ when C++17 is enabled changed to match C++14 in GCC 10.1 567 make_pair(_T1&& __x, _T2&& __y) ^~~~~ /home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = float; onnxstream::tensor_vector = std::vector<float, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1786:96: required from here /home/pi/OnnxStream/src/onnxstream.cpp:837:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 837 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x32; ^~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = short unsigned int; onnxstream::tensor_vector = std::vector<short unsigned int, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1792:99: required from here /home/pi/OnnxStream/src/onnxstream.cpp:842:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 842 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x16; ^~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::transpose(std::vector&, onnxstream::tensor_vector&, const std::vector&) [with T = unsigned char; onnxstream::tensor_vector = std::vector<unsigned char, onnxstream::Mallocator >]’: /home/pi/OnnxStream/src/onnxstream.cpp:1798:98: required from here /home/pi/OnnxStream/src/onnxstream.cpp:847:43: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const void, void, size_t, const size_t, const size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, const void, void, long unsigned int, const long unsigned int, const long unsigned int, pthreadpool*)’} [-fpermissive] 847 xnn_setup_transpose_nd_xxx = &xnn_setup_transpose_nd_x8; ^~~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = float; U = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:2951:179: required from here /home/pi/OnnxStream/src/onnxstream.cpp:372:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const float, float)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const float, float, pthreadpool*)’} [-fpermissive] 372 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, const float, float) {aka xnn_status ()(xnn_operator, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = short unsigned int; U = short unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:2968:185: required from here /home/pi/OnnxStream/src/onnxstream.cpp:377:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const void, void, pthreadpool*)’} [-fpermissive] 377 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = float; U = float; onnxstream::tensor_vector = std::vector<float, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3154:66: required from here /home/pi/OnnxStream/src/onnxstream.cpp:591:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 591 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_f32; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:592:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const float, float)’ {aka ‘xnn_status ()(xnn_operator, void, const float, float)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} [-fpermissive] 592 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const float, float) {aka xnn_status ()(xnn_operator, void, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = short unsigned int; U = short unsigned int; onnxstream::tensor_vector = std::vector<short unsigned int, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3174:66: required from here /home/pi/OnnxStream/src/onnxstream.cpp:597:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 597 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_f16; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:598:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const void, void)’ {aka ‘xnn_status ()(xnn_operator, void, const void, void)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} [-fpermissive] 598 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const void, void) {aka xnn_status ()(xnn_operator, void, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::convolution_nhwc(std::vector&, onnxstream::tensor_vector&, std::vector&, onnxstream::tensor_vector&, std::vector&, U, size_t, std::vector&, std::vector&, std::vector&, std::vector&, int, onnxstream::XnnPack::Qu8ConvData) [with T = unsigned char; U = int; onnxstream::tensor_vector = std::vector<unsigned char, onnxstream::Mallocator >; size_t = long unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:3228:30: required from here /home/pi/OnnxStream/src/onnxstream.cpp:603:51: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} to ‘xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)’} [-fpermissive] 603 xnn_reshape_convolution2d_nhwc_xxx = &xnn_reshape_convolution2d_nhwc_qu8; ^~~~~~~~~~
xnn_status ()(xnn_operator_t, size_t, size_t, size_t, size_t, size_t, size_t, size_t, pthreadpool_t) {aka xnn_status ()(xnn_operator, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, pthreadpool)}
/home/pi/OnnxStream/src/onnxstream.cpp:604:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, void, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, void, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, const xnn_ptr_type, xnn_ptr_type)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} [-fpermissive] 604 xnn_setup_convolution2d_nhwc_xxx = &xnn_setup_convolution2d_nhwc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, void, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, void, const unsigned char, unsigned char*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::matrix_multiply(const std::vector&, T, const std::vector&, T, std::vector, U, T, onnxstream::XnnPack::Qu8MatMulData) [with T = unsigned char; U = int]’: /home/pi/OnnxStream/src/onnxstream.cpp:4301:34: required from here /home/pi/OnnxStream/src/onnxstream.cpp:382:49: error: invalid conversion from ‘xnn_status ()(xnn_operator_t, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const unsigned char, unsigned char, pthreadpool*)’} [-fpermissive] 382 xnn_setup_fully_connected_nc_xxx = &xnn_setup_fully_connected_nc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, const unsigned char, unsigned char*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:4365:86: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1097:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const float, float)’ {aka ‘xnn_status ()(xnn_operator, const float, float)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const float, float, pthreadpool)’} [-fpermissive] 1097 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_f32; ^~~~~~~~
xnn_status ()(xnn_operator_t, const float, float) {aka xnn_status ()(xnn_operator, const float, float*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = short unsigned int]’: /home/pi/OnnxStream/src/onnxstream.cpp:4378:86: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1102:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const void, void)’ {aka ‘xnn_status ()(xnn_operator, const void, void)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const void, void, pthreadpool)’} [-fpermissive] 1102 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_f16; ^~~~~~~~
xnn_status ()(xnn_operator_t, const void, void) {aka xnn_status ()(xnn_operator, const void, void*)}
/home/pi/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector, std::vector<T, onnxstream::Mallocator > > onnxstream::XnnPack::softmax(std::vector&, T, T, onnxstream::XnnPack::Qu8SoftmaxData) [with T = unsigned char]’: /home/pi/OnnxStream/src/onnxstream.cpp:4397:115: required from here /home/pi/OnnxStream/src/onnxstream.cpp:1107:41: error: invalid conversion from xnn_status ()(xnn_operator_t, const uint8_t, uint8_t)’ {aka ‘xnn_status ()(xnn_operator, const unsigned char, unsigned char)’} to ‘xnn_status ()(xnn_operator_t, size_t, const xnn_ptr_type, xnn_ptr_type, pthreadpool_t)’ {aka ‘xnn_status ()(xnn_operator, long unsigned int, const unsigned char, unsigned char, pthreadpool)’} [-fpermissive] 1107 xnn_setup_softmax_nc_xxx = &xnn_setup_softmax_nc_qu8; ^~~~~~~~
xnn_status ()(xnn_operator_t, const uint8_t, uint8_t) {aka xnn_status ()(xnn_operator, const unsigned char, unsigned char*)}

In file included from /home/pi/OnnxStream/src/onnxstream.cpp:1: /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] 79 | scope_guard(Callable&& undo_func) : f(std::forward(undo_func)) { } | ^~~ /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<float, float>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<float, float>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<float, float>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<float, float>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<unsigned char, int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<unsigned char, int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<unsigned char, int>::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<unsigned char, int>::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] /home/pi/OnnxStream/src/onnxstream.h:79:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax::<lambda()>’, is used but never defined [-fpermissive] gmake[2]: [CMakeFiles/sd.dir/build.make:95: CMakeFiles/sd.dir/onnxstream.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:95: CMakeFiles/sd.dir/all] Error 2 gmake: *** [Makefile:103: all] Error 2 pi@PI64bit:~/OnnxStream/src/build $

I hate bugging you with my stupid errors, but this project does look like fun! Thanks! John

vitoplantamura commented 1 year ago

No problem :-)

Instead of "git checkout" without parameters, you should type "git checkout 79dd4bd459185ca2224f4415df61cbc18926f9b6".

Vito

TheJohnHanson1 commented 1 year ago

Hi Vito Almost!! I ran the correct git checkout and it looked like a successful compile - ran a long time, no errors. Then the OnnxStream build started differently, looked like it might run , but----- [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/arm/linux/midr.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/arm/linux/hwcap.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/arm/linux/aarch64-isa.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/linux/smallfile.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/linux/multiline.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/linux/cpulist.c.o [100%] Building C object cpuinfo/CMakeFiles/cpuinfo_internals.dir/src/linux/processors.c.o [100%] Linking C static library libcpuinfo_internals.a [100%] Built target cpuinfo_internals pi@PI64bit:~/XNNPACK/build $ cd OnnxStream -bash: cd: OnnxStream: No such file or directory pi@PI64bit:~/XNNPACK/build $ cd /OnnxStream -bash: cd: /OnnxStream: No such file or directory pi@PI64bit:~/XNNPACK/build $ cd /home/pi pi@PI64bit:~ $ cd /OnnxStream -bash: cd: /OnnxStream: No such file or directory pi@PI64bit:~ $ ls epaper-slow-generative-art OnnxStream XNNPACK pi@PI64bit:~ $ cd OnnxStream pi@PI64bit:~/OnnxStream $ cd src pi@PI64bit:~/OnnxStream/src $ cd build pi@PI64bit:~/OnnxStream/src/build $ cmake -DMAX_SPEED=ON -DXNNPACK_DIR=/home/pi/XNNPACK .. -- Configuring done -- Generating done -- Build files have been written to: /home/pi/OnnxStream/src/build pi@PI64bit:~/OnnxStream/src/build $ cmake --build . --config Release [ 33%] Building CXX object CMakeFiles/sd.dir/onnxstream.cpp.o In file included from /usr/include/c++/10/bits/stl_algobase.h:64, from /usr/include/c++/10/vector:60, from /home/pi/OnnxStream/src/onnxstream.h:4, from /home/pi/OnnxStream/src/onnxstream.cpp:1: /usr/include/c++/10/bits/stl_pair.h: In instantiation of ‘constexpr std::pair<typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type, typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type> std::make_pair(_T1&&, _T2&&) [with _T1 = float&; _T2 = float&; typename std::strip_reference_wrapper<typename std::decay<_Tp2>::type>::type = float; typename std::strip_reference_wrapper<typename std::decay<_Tp>::type>::type = float]’: /home/pi/OnnxStream/src/onnxstream.cpp:2085:60: required from here /usr/include/c++/10/bits/stl_pair.h:567:5: note: parameter passing for argument of type ‘std::pair<float, float>’ when C++17 is enabled changed to match C++14 in GCC 10.1 567 | make_pair(_T1&& __x, _T2&& __y) | ^~~~~ c++: fatal error: Killed signal terminated program cc1plus compilation terminated. gmake[2]: [CMakeFiles/sd.dir/build.make:95: CMakeFiles/sd.dir/onnxstream.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:95: CMakeFiles/sd.dir/all] Error 2 gmake: *** [Makefile:103: all] Error 2 pi@PI64bit:~/OnnxStream/src/build $

Very strange. Should I change -DMAX_SPEED=ON - ? Would I have better luck on a Pi 4 ? Sorry to be such a pest! John

vitoplantamura commented 1 year ago

It happens to me too with the RPI Zero 2 :-)

Try rebooting and if it keeps happening, try increasing the swap space.

Vito

TheJohnHanson1 commented 1 year ago

Hi Vito- Yaay! That was it - brought swap file to 1024 and all is well. The https://github.com/rvdveen/epaper-slow-generative-art/tree/main page said Put the weights from https://github.com/vitoplantamura/OnnxStream/releases in /weights

so now I have this content (sd.exe etc.) in /home/pi/weights and I cloned the hugging face weights ok.

What is the correct syntax for starting the example on pi zero 2? Do I need to worry about --rpi or --rpi-lowmem ?

After I get it to run I will head back to https://github.com/rvdveen/epaper-slow-generative-art/tree/main and try to decipher his commands (55 5 * reboot ??? PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

0 6,11,16,21 * cd epaper-slow-generative-art && /usr/bin/flock -w 0 ./loop-once.sh ./loop-once.sh >> /tmp/generate.log 2>&1 ???) Thanks again for your help! Someday I might know 1% of what you know in this field! If I get it going I will send you a pic. John

vitoplantamura commented 1 year ago

just use "--rpi" :-)

Vito