GithubHelp home page GithubHelp logo

vitoplantamura / onnxstream Goto Github PK

View Code? Open in Web Editor NEW
1.7K 25.0 75.0 15.05 MB

Lightweight inference library for ONNX files, written in C++. It can run SDXL on a RPI Zero 2 but also Mistral 7B on desktops and servers.

License: Other

Jupyter Notebook 2.66% CMake 0.57% C++ 96.76%
machine-learning onnx raspberry-pi stable-diffusion llama mistral tinyml

onnxstream's People

Contributors

aerox2 avatar gaelicthunder avatar vitoplantamura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onnxstream's Issues

How open are you to code-refactoring Pull Requests?

Hi there @vitoplantamura , love your project a lot! 😄

As titled, I wanted to contribute and send some Pull Requests, however I am slightly unsure due to the unique design of your codebase.

Most of my Pull Requests are about standardising C++ projects. To list some examples, creating some more defined translation units, so header files and source files. This means extracting code-fragments and elements into a more modular translation-unit design instead of maybe currently "onnxstream.{cpp,h}" hoarding all-the-things 🥲 . This more modular aim would help a lot in compile times of the project, as well as making the line-border between "library code" / "application-client" code much more clearer + cleaner. This will also mean Pull Requests will be adding more "functions" to break up and clearer define some longer pieces of your code, as well as adding some extra namespacing, data types and use of already-in-the-standard C++ library code to reduce the size of the OnnxStream codebase quite a bit.

You have done a lot @vitoplantamura to create and maintain OnnxStream and it seems that you have a really awesome development flow right now! I can kinda see how this codebase grew and was built into its unique form currently, and as I am a fan of the project, I don't want to slow your flow down, yet want to make OnnxStream more standardised for other C++ / software developer fans (like me!) of your project!

Do you have any restrictions or issues with any codebase refactoring to OnnxStream? Or any suggestions before filing any Pull Requests to refactor some of your project's code?

Thanks for reading @vitoplantamura and to all your upcoming updates, cheers! 🥳

vocab.txt

Not sure how I should execute sd. Just tried below.
Couldn't find vocab.txt in anything that I brought down via git.
Not sure what I did wrong.

Warm regards, Anthony

./sd --rpi 
----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 10
----------------[prompt]------------------
=== ERROR === unable to open file: ./tokenizer/vocab.txt

compiling on rpi zero 2

i'm following the instrcutions trying to compile xnnpack on raspberry pi zero 2 and running into issues am i missing something else i need to install?

`Scanning dependencies of target microkernels-prod
[ 5%] Building C object CMakeFiles/microkernels-prod.dir/src/amalgam/gen/scalar.c.o
[ 5%] Building C object CMakeFiles/microkernels-prod.dir/src/amalgam/gen/scalar-aarch32.c.o
[ 5%] Building C object CMakeFiles/microkernels-prod.dir/src/amalgam/gen/armsimd32.c.o
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c: In function ‘xnn_qs8_gemm_minmax_fp32_ukernel_1x2c4__armsimd32’:
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:48:13: error: unknown type name ‘int8x4_t’
const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
^~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:48:29: error: ‘int8x4_t’ undeclared (first use in this function); did you mean ‘int64_t’?
const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
^~~~~~~~
int64_t

make[2]: *** [CMakeFiles/microkernels-prod.dir/build.make:89: CMakeFiles/microkernels-prod.dir/src/amalgam/gen/armsimd32.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:468: CMakeFiles/microkernels-prod.dir/all] Error 2
make: *** [Makefile:130: all] Error 2`

build error with latest Cpp

There are many build errors on Windows with latest C++

C:\SD\OnnxStream\src\build>cmake -DMAX_SPEED=ON -DXNNPACK_DIR=C:\SD\XNNPACK ..
-- Building for: Visual Studio 17 2022
-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - 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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (7.3s)
-- Generating done (0.1s)
-- Build files have been written to: C:/SD/OnnxStream/src/build

C:\SD\OnnxStream\src\build>cmake --build . --config Release
MSBuild version 17.7.2+d6990bcfa for .NET Framework

  1>Checking Build System
  Building Custom Rule C:/SD/OnnxStream/src/CMakeLists.txt
  sd.cpp
C:\SD\OnnxStream\src\onnxstream.h(366,36): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible l
oss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(185,38): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of dat
a [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(269,89): warning C4244: 'return': conversion from '_Rep' to 'double', possible loss of data
 [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Rep=__int64
          ]
C:\SD\OnnxStream\src\sd.cpp(295,16): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fo
pen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\SD\OnnxStream\src\
build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(681,17): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(682,16): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(911,17): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(912,21): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of
data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(913,22): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of
data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(932,33): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible lo
ss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(966,44): warning C4305: 'initializing': truncation from 'double' to 'float' [C:\SD\OnnxStre
am\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(967,47): warning C4305: 'initializing': truncation from 'double' to 'float' [C:\SD\OnnxStre
am\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(999,41): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of dat
a [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1004,42): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of da
ta [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1078,14): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss o
f data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1095,17): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\
SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1142,52): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\
SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1152,32): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss o
f data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1153,29): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss o
f data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1158,59): warning C4244: 'argument': conversion from 'float' to 'const _Ty', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=int
          ]
C:\SD\OnnxStream\src\sd.cpp(1170,34): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss o
f data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1171,27): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss o
f data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1174,57): warning C4244: 'argument': conversion from 'float' to 'const _Ty', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=int
          ]
C:\SD\OnnxStream\src\sd.cpp(1197,54): warning C4244: 'argument': conversion from 'float' to 'const _Ty', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=int
          ]
C:\SD\OnnxStream\src\sd.cpp(1275,35): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss
 of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\utility(270,61): warning C424
4: 'initializing': conversion from '_Ty' to '_Ty2', possible loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=double
          ]
          and
          [
              _Ty2=float
          ]
C:\SD\OnnxStream\src\sd.cpp(1029,36): message : see reference to function template instantiation 'std::pair<std::string
,float>::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,double,0>(std::pair<std::basic_string
<char,std::char_traits<char>,std::allocator<char>>,double> &&) noexcept' being compiled [C:\SD\OnnxStream\src\build\sd.
vcxproj]
C:\SD\OnnxStream\src\sd.cpp(1029,26): message : see the first reference to 'std::pair<std::string,float>::pair' in 'par
se_prompt_attention' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xutility(240,54): warning C42
44: 'initializing': conversion from 'int' to '_Ty', possible loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xmemory(717,14): message : se
e reference to function template instantiation '_Ty *std::construct_at<_Objty,int&,0x0>(_Ty *const ,int &) noexcept(<ex
pr>)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float,
              _Objty=float
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xmemory(1802,35): message : s
ee reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,int&>(_Allo
c &,_Objty *const ,int &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Alloc=std::allocator<float>,
              _Ty=float,
              _Objty=float
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xmemory(1888,17): message : s
ee reference to function template instantiation 'void std::_Uninitialized_backout_al<std::allocator<float>>::_Emplace_b
ack<int&>(int &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\vector(1140,13): message : se
e reference to function template instantiation 'float *std::_Uninitialized_copy_n<int*,std::allocator<float>>(_InIt,siz
e_t,float *,_Alloc &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _InIt=int *,
              _Alloc=std::allocator<float>
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\vector(1243,13): message : se
e reference to function template instantiation 'void std::vector<float,std::allocator<float>>::_Insert_counted_range<in
t*>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,_Iter,const unsigned __int64)' being compile
d [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float,
              _Iter=int *
          ]
C:\SD\OnnxStream\src\sd.cpp(1159,34): message : see reference to function template instantiation 'std::_Vector_iterator
<std::_Vector_val<std::_Simple_types<_Ty>>> std::vector<_Ty,std::allocator<_Ty>>::insert<std::_Vector_iterator<std::_Ve
ctor_val<std::_Simple_types<int>>>,0>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,_Iter,_Ite
r)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float,
              _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<int>>>
          ]
C:\SD\OnnxStream\src\sd.cpp(1159,41): message : see the first reference to 'std::vector<float,std::allocator<float>>::i
nsert' in 'prompt_solve' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xutility(241,69): warning C42
44: 'initializing': conversion from 'int' to '_Objty', possible loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Objty=float
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xmemory(717,14): message : se
e reference to function template instantiation '_Ty *std::construct_at<_Objty,int&,0x0>(_Ty *const ,int &) noexcept' be
ing compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float,
              _Objty=float
          ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\xmemory(1802,35): message : s
ee reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,int&>(_Allo
c &,_Objty *const ,int &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Alloc=std::allocator<float>,
              _Ty=float,
              _Objty=float
          ]
  onnxstream.cpp
C:\SD\OnnxStream\src\onnxstream.h(366,36): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible l
oss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1265,1): warning C4554: '<<': check operator precedence for possible error; use par
entheses to clarify precedence [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1270,1): warning C4554: '<<': check operator precedence for possible error; use par
entheses to clarify precedence [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1274,1): warning C4554: '<<': check operator precedence for possible error; use par
entheses to clarify precedence [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1535,34): warning C4244: '=': conversion from 'double' to 'float', possible loss of
 data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1728,23): warning C4267: '*=': conversion from 'size_t' to 'int', possible loss of
data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1813,46): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1813,39): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1854,36): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1854,29): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1905,15): warning C4267: 'initializing': conversion from 'size_t' to 'int', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2024,101): warning C4244: 'argument': conversion from 'float' to 'size_t', possible
 loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2024,83): warning C4244: 'argument': conversion from 'float' to 'size_t', possible
loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2060,101): warning C4244: 'argument': conversion from 'float' to 'size_t', possible
 loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2060,83): warning C4244: 'argument': conversion from 'float' to 'size_t', possible
loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2095,17): warning C4244: 'initializing': conversion from 'double' to 'float', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2096,24): warning C4244: 'initializing': conversion from 'float' to 'uint8_t', poss
ible loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2477,48): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2477,41): warning C4305: 'argument': truncation from 'double' to 'float' [C:\SD\Onn
xStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2503,22): warning C4267: 'initializing': conversion from 'size_t' to 'int', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2523,23): warning C4018: '>': signed/unsigned mismatch [C:\SD\OnnxStream\src\build\
sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2782,22): warning C4267: 'initializing': conversion from 'size_t' to 'int', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3334,27): warning C4305: 'initializing': truncation from 'double' to 'float' [C:\SD
\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3456,35): warning C4244: 'initializing': conversion from 'double' to 'float', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3463,65): warning C4244: '=': conversion from 'double' to 'float', possible loss of
 data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3501,39): warning C4244: 'initializing': conversion from 'double' to 'float', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3517,73): warning C4244: '=': conversion from 'double' to 'float', possible loss of
 data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3561,39): warning C4244: 'initializing': conversion from 'double' to 'float', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3577,73): warning C4244: '=': conversion from 'double' to 'float', possible loss of
 data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3834,32): warning C4244: '=': conversion from 'double' to 'float', possible loss of
 data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3864,34): warning C4244: 'initializing': conversion from 'double' to 'float', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4567,57): warning C4244: 'argument': conversion from '_Ty' to '_Ty', possible loss
of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float
          ]
          and
          [
              _Ty=size_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(4658,40): warning C4244: 'initializing': conversion from 'float' to 'size_t', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4659,40): warning C4244: 'initializing': conversion from 'float' to 'size_t', possi
ble loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4830,26): warning C4267: 'initializing': conversion from 'size_t' to 'int', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(5224,39): warning C4018: '<': signed/unsigned mismatch [C:\SD\OnnxStream\src\build\
sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(837,42): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const void *,void *,size_t,const size_t *,const size
_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(837,42): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1786,36): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<float,onnxstream::Mallocator<float>>> onnxstream::XnnPack::transpos
e<float>(std::vector<size_t,std::allocator<size_t>> &,std::vector<float,onnxstream::Mallocator<float>> &,const std::vec
tor<size_t,std::allocator<size_t>> &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(842,42): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const void *,void *,size_t,const size_t *,const size
_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(842,42): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1792,36): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>>> onnxstream::XnnPack::tr
anspose<uint16_t>(std::vector<size_t,std::allocator<size_t>> &,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>> &
,const std::vector<size_t,std::allocator<size_t>> &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(847,42): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const void *,void *,size_t,const size_t *,const size
_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(847,42): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1798,36): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>>> onnxstream::XnnPack::tran
spose<uint8_t>(std::vector<size_t,std::allocator<size_t>> &,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>> &,cons
t std::vector<size_t,std::allocator<size_t>> &)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1333,66): warning C4244: 'argument': conversion from '__int64' to 'int', possible l
oss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2024,60): message : see reference to function template instantiation 'std::optional
<std::pair<uint32_t,uint32_t>> onnxstream::FloatAsUInt::get_percentiles<uint32_t>(T *,T *,size_t,size_t)' being compile
d [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              T=uint32_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(1339,58): warning C4244: 'argument': conversion from '__int64' to 'int', possible l
oss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1342,88): warning C4244: 'argument': conversion from '__int64' to 'int', possible l
oss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(372,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const float *,float *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pthread
pool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(372,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2951,40): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<float,onnxstream::Mallocator<float>>> onnxstream::XnnPack::matrix_m
ultiply<float,float>(const std::vector<size_t,std::allocator<size_t>> &,T *,const std::vector<size_t,std::allocator<siz
e_t>> &,T *,std::vector<size_t,std::allocator<size_t>> *,U *,T *,onnxstream::XnnPack::Qu8MatMulData *)' being compiled
[C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              T=float,
              U=float
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(377,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pthreadpo
ol_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(377,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(2968,40): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>>> onnxstream::XnnPack::ma
trix_multiply<uint16_t,uint16_t>(const std::vector<size_t,std::allocator<size_t>> &,T *,const std::vector<size_t,std::a
llocator<size_t>> &,T *,std::vector<size_t,std::allocator<size_t>> *,U *,T *,onnxstream::XnnPack::Qu8MatMulData *)' bei
ng compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              T=uint16_t,
              U=uint16_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(591,50): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,size_t,size_t,size_t,size_t *,size_t *,size_t *,size_t *,pthreadpool_t)' to 'xnn_status (__cdecl *)(xnn_operator_t,s
ize_t,size_t,size_t,size_t *,size_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(591,50): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3150,40): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<float,onnxstream::Mallocator<float>>> onnxstream::XnnPack::convolut
ion_nhwc<float,float>(std::vector<size_t,std::allocator<size_t>> &,std::vector<float,onnxstream::Mallocator<float>> &,s
td::vector<size_t,std::allocator<size_t>> &,std::vector<float,onnxstream::Mallocator<float>> &,std::vector<size_t,std::
allocator<size_t>> &,U *,size_t,std::vector<int,std::allocator<int>> &,std::vector<int,std::allocator<int>> &,std::vect
or<int,std::allocator<int>> &,std::vector<int,std::allocator<int>> &,int,onnxstream::XnnPack::Qu8ConvData *)' being com
piled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              U=float
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(592,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,void *,const float *,float *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const xnn_ptr_type *,xnn_ptr_type *)' [C:\S
D\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(592,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(616,27): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(616,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(615,30): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(615,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(614,32): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(614,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(613,61): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(613,45): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(613,30): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(613,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(597,50): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,size_t,size_t,size_t,size_t *,size_t *,size_t *,size_t *,pthreadpool_t)' to 'xnn_status (__cdecl *)(xnn_operator_t,s
ize_t,size_t,size_t,size_t *,size_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(597,50): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3170,40): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>>> onnxstream::XnnPack::co
nvolution_nhwc<uint16_t,uint16_t>(std::vector<size_t,std::allocator<size_t>> &,std::vector<uint16_t,onnxstream::Malloca
tor<uint16_t>> &,std::vector<size_t,std::allocator<size_t>> &,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>> &,
std::vector<size_t,std::allocator<size_t>> &,U *,size_t,std::vector<int,std::allocator<int>> &,std::vector<int,std::all
ocator<int>> &,std::vector<int,std::allocator<int>> &,std::vector<int,std::allocator<int>> &,int,onnxstream::XnnPack::Q
u8ConvData *)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              U=uint16_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(598,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,void *,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const xnn_ptr_type *,xnn_ptr_type *)' [C:\SD\
OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(598,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(603,50): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,size_t,size_t,size_t,size_t *,size_t *,size_t *,size_t *,pthreadpool_t)' to 'xnn_status (__cdecl *)(xnn_operator_t,s
ize_t,size_t,size_t,size_t *,size_t *,pthreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(603,50): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(3223,40): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>>> onnxstream::XnnPack::conv
olution_nhwc<uint8_t,int32_t>(std::vector<size_t,std::allocator<size_t>> &,std::vector<uint8_t,onnxstream::Mallocator<u
int8_t>> &,std::vector<size_t,std::allocator<size_t>> &,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>> &,std::vec
tor<size_t,std::allocator<size_t>> &,U *,size_t,std::vector<int,std::allocator<int>> &,std::vector<int,std::allocator<i
nt>> &,std::vector<int,std::allocator<int>> &,std::vector<int,std::allocator<int>> &,int,onnxstream::XnnPack::Qu8ConvDa
ta *)' being compiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              U=int32_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(604,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,void *,const uint8_t *,uint8_t *)' to 'xnn_status (__cdecl *)(xnn_operator_t,const xnn_ptr_type *,xnn_ptr_type *)' [
C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(604,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(629,27): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(629,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(628,30): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(628,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(627,32): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(627,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(626,61): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(626,45): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(626,30): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(626,17): warning C4267: 'argument': conversion from 'size_t' to 'uint32_t', possibl
e loss of data [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(382,48): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operator
_t,const uint8_t *,uint8_t *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pth
readpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(382,48): message : This conversion requires a reinterpret_cast, a C-style cast or p
arenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4294,44): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>>> onnxstream::XnnPack::matr
ix_multiply<uint8_t,int32_t>(const std::vector<size_t,std::allocator<size_t>> &,T *,const std::vector<size_t,std::alloc
ator<size_t>> &,T *,std::vector<size_t,std::allocator<size_t>> *,U *,T *,onnxstream::XnnPack::Qu8MatMulData *)' being c
ompiled [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              T=uint8_t,
              U=int32_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(1097,40): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operato
r_t,const float *,float *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pthrea
dpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1097,40): message : This conversion requires a reinterpret_cast, a C-style cast or
parenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4365,44): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<float,onnxstream::Mallocator<float>>> onnxstream::XnnPack::softmax<
_Ty>(std::vector<size_t,std::allocator<size_t>> &,T *,T *,onnxstream::XnnPack::Qu8SoftmaxData *)' being compiled [C:\SD
\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=float,
              T=float
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(1102,40): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operato
r_t,const void *,void *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pthreadp
ool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1102,40): message : This conversion requires a reinterpret_cast, a C-style cast or
parenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4378,44): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint16_t,onnxstream::Mallocator<uint16_t>>> onnxstream::XnnPack::so
ftmax<_Ty>(std::vector<size_t,std::allocator<size_t>> &,T *,T *,onnxstream::XnnPack::Qu8SoftmaxData *)' being compiled
[C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              _Ty=uint16_t,
              T=uint16_t
          ]
C:\SD\OnnxStream\src\onnxstream.cpp(1107,40): error C2440: '=': cannot convert from 'xnn_status (__cdecl *)(xnn_operato
r_t,const uint8_t *,uint8_t *)' to 'xnn_status (__cdecl *)(xnn_operator_t,size_t,const xnn_ptr_type *,xnn_ptr_type *,pt
hreadpool_t)' [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(1107,40): message : This conversion requires a reinterpret_cast, a C-style cast or
parenthesized function-style cast [C:\SD\OnnxStream\src\build\sd.vcxproj]
C:\SD\OnnxStream\src\onnxstream.cpp(4397,44): message : see reference to function template instantiation 'std::pair<std
::vector<size_t,std::allocator<size_t>>,std::vector<uint8_t,onnxstream::Mallocator<uint8_t>>> onnxstream::XnnPack::soft
max<uint8_t>(std::vector<size_t,std::allocator<size_t>> &,T *,T *,onnxstream::XnnPack::Qu8SoftmaxData *)' being compile
d [C:\SD\OnnxStream\src\build\sd.vcxproj]
          with
          [
              T=uint8_t
          ]

C:\SD\OnnxStream\src\build>

Unable to run cmake

Hi,

I am following your instruction on README to set up the code on Ubuntu 2022 using WSL. I am getting the below error. Can you please help?

/XNNPACK/OnnxStream/src/build# cmake -DMAX_SPEED=ON -DXNNPACK_DIR=/root/XNNPACK/
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

CMake Error: The source directory "/root/XNNPACK/OnnxStream/src/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

~/XNNPACK/OnnxStream/src/build# cmake --build . --config Release
Error: could not load cache

Warm Regards
Ganesh

How to work with stable diffusion 1.5?

Hi,

Thanks for the repo. I have successfully completed the build on a windows machine using WSL - Ubuntu 2020. Can you please help with what are the next steps to run SD 1.5?

Regards
Ganesh

changing image size

I am tryint to change images sizes.

I am running SD on a RPI 5 and everything seems working fine.
Need to refine the text description for an image.
Is there a way to change the images size?
Did not find an option.

On SD repo I found there are --H and --W.

Do I need to change this:
std::string m_seed = std::to_string(std::time(0) % 1024 * 1024);

and recompile?

"failed to create multiply operation"

Built and running on Ubuntu 22.04, Intel Core i3 CPU M 330 @ 2.13GHz with 8GB of RAM.
Instructions followed exactly, and when it didn't work, I cleaned up and tried fresh again, still no luck.

$ ./sd --models-path SD/ --steps 3
----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 3
----------------[prompt]------------------
----------------[diffusion]---------------
step:0          === ERROR === failed to create multiply operation
$

FP16 mode is always enabled.

I think sd.cpp line 714 should be:

        model.m_use_fp16_arithmetic = false;

So that that the --fp16 flag can enable it (sd.cpp line 599)

Is it possible to utilize VRAM instead of RAM for OnnxStream?

Hello,

I am inquiring about the possibility of utilizing VRAM instead of RAM when OnnxStream. This inquiry stems from the consideration that enabling VRAM usage could potentially allow individuals with graphics cards having lesser VRAM (specifically, below 8GB) to generate SDXL models effectively.

If this is feasible, it could significantly broaden the usability of the system for a wider audience with varying hardware capabilities.

I appreciate any insights or guidance on this matter.

Thank you.

Help converting and using custom models

Hi, i tried following the instructions, but im kinda ignorant and lost... Can i ask for help?
I tried to get a (SD 1.5) custom model .safetensors > converting it to onnx using the stable-diffusion-webui-tensorrt > cleaning it with ONNX Simplifier > using the notebook provided (onnx2txt.ipynb) and i end up a bunch of files (the .bins and .txt).

Now, when i try to run SD it gives me a bunch of errors === ERROR === unable to open file: ./tokenizer/vocab.txt
I tried to fix it like it was suggested in the issue, but i end up having much more errors like that:
=== ERROR === read_file: unable to open file (/home/d00l1n/Desktop/Converted_A0/text_encoder_fp32/model.txt).

=== ERROR === read_file: unable to open file (/home/d00l1n/Desktop/Converted_A0/unet_fp16/model.txt).
I tried to fix them in the same way as the issue number 20 and it kinda worked?

Then i tried to put the converted files into the unet folder but i get this:
=== ERROR === Model::parse_tensor_string: invalid shape.

Im sure i've done a lot of things wrong, and i would like to know (or better, to understand) what im doing wrong
Thanks for the help in advance!

error doing OnnxStream build

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.

Work with Jetson Nano?

Do you know/think it would work on something like a Jetson Nano? I have one running Bionic 18.04 with CUDA 10.2 and would be curious if it could be adapted to this.

=== ERROR === Model::get_tensor_data: input tensor not found: input_5F_ids

I'm getting tensor errors after the build is completed. Not sure I do things right, as I had to create a symbolic link text_encoder_fp32 -> stable-diffusion-xl-base-1.0-onnxstream/sdxl_text_encoder_1_fp32 to do so.

./sd
----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 10
----------------[prompt]------------------
=== ERROR === Model::get_tensor_data: input tensor not found: input_5F_ids

[feature request] image 2 image?

I am having so much fun with this - such a cool project! "Image to Image" functionality would be the icing on the cake. Is this something that could be added, or is it simply too resource intensive? I would love to set up a little picture frame that provides a variation on an image over and over.

Very slow performance on Ryzen 7 4700u + more features and command line options needed

Hi. Thank you for this perfect SD implementation. I downloaded a Windows version from releases and ran it on Ryzen 7 4700u, 16gb ram. 1 step needs 42 seconds to be done. Is it supposed to be so slow? Maybe it doesn't use all cpu threads? How can i enable qu8 vae decoder? What sampling method uses OnnxStream? Could you add ddim sampling method, please? It's also needed to add possibility to set image's height, width and number of cpu threads that will be used to generate image.

=== ERROR === read_file: unable to open file errors...

Just built the project on my raspberry pi 3b+, but everytime I launch it I get "unable to open file" error.

First I tried:
./sd --models-path /home/pi/ai-projects/stable_diffusion_models_onnxstream/ --rpi
where /home/pi/ai-projects/stable_diffusion_models_onnxstream/ is a directory created by myself in which I put the .rar downloaded from github Releases page (win-x64-with-weights)
but it gave me:
=== ERROR === unable to open file: ./tokenizer/vocab.txt like #20

So i created tokenizer directory and copied the vocab.txt from the models directory but then it gave me:
=== ERROR === read_file: unable to open file (./text_encoder_fp32/model.txt).

Am I doing something wrong? Does the models directory have some strict requirements?

Thanks

Compiler Optimizations Flags in Makefile

Hi, I asked ChatGPT about some optimization flags for the 'CMakeLists.txt' and it came up with this, to append at the EOF:

target_compile_options(sd PRIVATE -O3 -march=native -mtune=native -funroll-loops -finline-functions -ffast-math -flto -ftree-vectorize)

On my Raspberry Pi 400, now a diffusion step takes ~210000ms. (was before: ~630000)

I think the -O3 did the most, and I haven't really tested with all the others incrementally.

Yea, now it takes down the system, if I overclock it, so 1.9ghz it is for passive cooling.

Unfortunately I haven't got a Zero for experiments, just thought this may be of interest.

BTW someone care to tell me how to set a seed for random generation?

Happy diffusing!

edit; typo, and wanted to add my thx for this nice little software

[feature request] Whisper with openblas

First of all thanks for this cool project. Now since you have started adding support for models other than stable diffusion, please also add support for whisper with W8A8 quantization.
Also, seems xnnpack is for speeding up float operations. So does that mean for W8A8 inference xnnpack is not required?
Also, consider adding openblas as a drop-in replacement for cublas so that gpu acceleration can also be used on intel and AMD CPUs with integrated graphics.

[question] why to convert model from ONNX to TXT format?

Hello

The models to be used by OnnxStream have to be first converted to ONNX format and then to TXT - that's as per the description. But if you are able to get the models in ONNX format, why not to use onnxruntime library as 3rd party to do the work? Is there a special reason?

SDXL moire/dither effect - picture quality

Hello, I love OnnxStream and I think its a great project! Unbelievable that this is made possible!

I just want to ask about the SDXL picture quality - i know that this is not the main point for OnnxStream - but I've noticed in all my generated SDXL images some kind of moire, dither, scanline effect in details, while the rest of the image seems soft.
Can this be improved with someting? (parameter, prompts, compiling with different options)

Odroid N2+

This isn't really an "issue" per se, but ... I have an Odroid N2+ that isn't currently being used for anything. Would you (Vito?) find it useful if I attempted to install OnnxStream on the Odroid and reported on the results? Is there a standard benchmark you'd like me to run, assuming the install works?

N2+ specs: Cortex A-73 (4 cores) + Cortex A-53 (2 cores) + ARM Mali G-52. I have the version with 4GB of RAM.

Worth a try? It's certainly more powerful than the RPi Zero 2! From what you've written in other responses here, OnnxStream would use all six cores, correct?

This looks like a really cool project. Thanks for creating it.

Segmentation Fault

Hi, I'm getting a segmentation fault when attempting to run. I'm using a SweetPotato (Raspberry Pi clone), running Raspbian Bullseye 64-bit OS. This device has 2GB of DDR4 memory.

I was able to compile XNNPACK successfully and without errors following your instructions

I was able to compile your OnnxStream code - this gives an information/warning by appears to compile:
$ cmake --build . --config Release [ 33%] Building CXX object CMakeFiles/sd.dir/sd.cpp.o [ 66%] 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/frenchfry/projects/XNNPACK/OnnxStream/src/onnxstream.h:4, from /home/frenchfry/projects/XNNPACK/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/frenchfry/projects/XNNPACK/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) | ^~~~~~~~~ [100%] Linking CXX executable sd [100%] Built target sd

But, when I run, I get a segmentation fault within a few seconds:
$ ./sd --rpi --steps 3 --rpi-lowmem ----------------[start]------------------ positive_prompt: a photo of an astronaut riding a horse on mars negative_prompt: ugly, blurry output_png_path: ./result.png steps: 3 ----------------[prompt]------------------ Segmentation fault

I added the command line switch to print operations and it shows the following:
$ ./sd --rpi --steps 3 --rpi-lowmem --ops-printf ----------------[start]------------------ positive_prompt: a photo of an astronaut riding a horse on mars negative_prompt: ugly, blurry output_png_path: ./result.png steps: 3 ----------------[prompt]------------------ #0) Reshape (Reshape_113) #1) Gather (Gather_114) #2) Add (Add_116) #3) ReduceMean (ReduceMean_123) #4) Sub (Sub_124) #5) Pow (Pow_126) #6) ReduceMean (ReduceMean_127) #7) Add (Add_129) #8) Sqrt (Sqrt_130) #9) Div (Div_131) #10) Mul (Mul_132) #11) Add (Add_133) #12) MatMul (MatMul_134) #13) Add (Add_135) #14) Mul (Mul_137) #15) MatMul (MatMul_138) #16) Add (Add_139) #17) Reshape (Reshape_140) #18) Transpose (Transpose_141) #19) MatMul (MatMul_142) #20) Add (Add_143) #21) Reshape (Reshape_144) #22) Transpose (Transpose_145) #23) Reshape (Reshape_146) #24) Transpose (Transpose_147) #25) Reshape (Reshape_148) #26) Reshape (Reshape_149) #27) Reshape (Reshape_150) #28) Transpose (Transpose_151) #29) MatMul (MatMul_152) #30) Reshape (Reshape_153) #31) Add (Add_154) #32) Reshape (Reshape_155) #33) Softmax (Softmax_156) #34) MatMul (MatMul_157) #35) Reshape (Reshape_158) #36) Transpose (Transpose_159) #37) Reshape (Reshape_160) #38) MatMul (MatMul_161) #39) Add (Add_162) #40) Add (Add_163) #41) ReduceMean (ReduceMean_164) #42) Sub (Sub_165) #43) Pow (Pow_167) #44) ReduceMean (ReduceMean_168) #45) Add (Add_170) #46) Sqrt (Sqrt_171) #47) Div (Div_172) #48) Mul (Mul_173) #49) Add (Add_174) #50) MatMul (MatMul_175) #51) Add (Add_176) #52) Mul (Mul_178) #53) Sigmoid (Sigmoid_179) #54) Mul (Mul_180) #55) MatMul (MatMul_181) Segmentation fault

I have tried with --rpi-lowmem set and unset (same results). I know --lowmem was meant to be <500MB, but not sure how much memory is required if this switch is not set.

I have tried re-compiling OnnxStream with -DMAX_SPEED=ON and -DMAX_SPEED=OFF (same results).

Any ideas on how do debug?

SDXL turbo/SDXL importing

Hello,

I've been recently trying to import SDXL turbo into OnnxStream, as far as I understand the model architecture is the same just the training weights are different.

I've been trying a few different things to just import just the normal SDXL model just to confirm everything works (optimum export, torch.onnx.export, different python versions, modifying onnx2txt, etc) however a different error each time and no luck so far.

Would you be able to provide a script or the method you took to convert a SDXL model to Onnx? Also the Python version and the versions of the libraries used would also greatly help.

Thanks

failed to create multiply operation

----------------[start]------------------
positive_prompt: An astronaut riding a horse on Mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 5
----------------[prompt]------------------
----------------[diffusion]---------------
step:0 === ERROR === failed to create multiply operation

This is the error I receive when running the command
./sd --models-path /home/chace/Desktop/onnxstream/SD --prompt "An astronaut riding a horse on Mars"
on Ubuntu 22.04.3 in a proxmox vm

UPDATE
I am able to get it to run on a clean install of Ubuntu 22.04.3 on physical hardware. Still not able to get it to work in proxmox.

Feature Proposal: Integration of OnnxStream with Automatic1111webui using RAM instead of VRAM

Dear OnnxStream Developers,

I am reaching out to propose an enhancement to integrate OnnxStream as an additional extension with the Automatic1111webui, utilizing RAM rather than VRAM. The rationale behind this suggestion aligns with the previous discussions regarding VRAM usage. By enabling this integration, individuals utilizing Redion, as well as those with GPUs possessing lower VRAM, which currently falls outside the supported specifications, would gain the ability to generate AI outputs.

Moreover, this integration could potentially lead to a performance boost when compared to standard CPU and RAM usage scenarios. Further, if a feature for model conversion is incorporated, it could potentially facilitate easier usage on various devices, including smartphones.

I believe this enhancement could significantly broaden the accessibility and usability of OnnxStream, especially for individuals with hardware constraints. I am eagerly looking forward to any considerations or discussions regarding this proposal.

Thank you for your time and consideration.

Username and password required?

Hey I'm so close to installing this on my s20+ but when I try to clone onnxstream termux ask me for the username and password of the github page y did u lock it behind a password?

issues with provided xnnpack build

Hi,
I have a build issue on Raspberry Pi4 with XNNPACK building, despite I followed the attached guidance.

These error messages appeared. Wondering if anybody else faced with the same...

/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c: In function ‘cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo’:
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:14:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_AES’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_AES’?
14 | if (features & CPUINFO_ARM_LINUX_FEATURE_AES) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_AES
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:17:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_PMULL’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_PMULL’?
17 | if (features & CPUINFO_ARM_LINUX_FEATURE_PMULL) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_PMULL
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:20:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_SHA1’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_SHA1’?
20 | if (features & CPUINFO_ARM_LINUX_FEATURE_SHA1) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_SHA1
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:23:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_SHA2’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_SHA2’?
23 | if (features & CPUINFO_ARM_LINUX_FEATURE_SHA2) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_SHA2
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:26:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_CRC32’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_CRC32’?
26 | if (features & CPUINFO_ARM_LINUX_FEATURE_CRC32) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_CRC32
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:29:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_ATOMICS’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_TLS’?
29 | if (features & CPUINFO_ARM_LINUX_FEATURE_ATOMICS) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_TLS
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:30:6: error: ‘struct cpuinfo_arm_isa’ has no member named ‘atomics’
30 | isa->atomics = true;
| ^~
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:51:35: error: ‘CPUINFO_ARM_LINUX_FEATURE_FPHP’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_FPA’?
51 | const uint32_t fp16arith_mask = CPUINFO_ARM_LINUX_FEATURE_FPHP | CPUINFO_ARM_LINUX_FEATURE_ASIMDHP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_FPA
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:51:68: error: ‘CPUINFO_ARM_LINUX_FEATURE_ASIMDHP’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_EDSP’?
51 | uint32_t fp16arith_mask = CPUINFO_ARM_LINUX_FEATURE_FPHP | CPUINFO_ARM_LINUX_FEATURE_ASIMDHP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_EDSP
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:80:20: error: ‘CPUINFO_ARM_LINUX_FEATURE_ASIMDRDM’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_IDIVT’?
80 | if (features & CPUINFO_ARM_LINUX_FEATURE_ASIMDRDM) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_IDIVT
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:86:18: error: ‘CPUINFO_ARM_LINUX_FEATURE2_I8MM’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_IWMMXT’?
86 | if (features2 & CPUINFO_ARM_LINUX_FEATURE2_I8MM) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_IWMMXT
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:87:6: error: ‘struct cpuinfo_arm_isa’ has no member named ‘i8mm’
87 | isa->i8mm = true;
| ^~
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:117:19: error: ‘CPUINFO_ARM_LINUX_FEATURE_ASIMDDP’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_EDSP’?
117 | if (features & CPUINFO_ARM_LINUX_FEATURE_ASIMDDP) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_EDSP
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:122:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_JSCVT’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_IDIVT’?
122 | if (features & CPUINFO_ARM_LINUX_FEATURE_JSCVT) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_IDIVT
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:128:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_FCMA’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_FPA’?
128 | if (features & CPUINFO_ARM_LINUX_FEATURE_FCMA) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_FPA
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:131:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_SVE’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_SWP’?
131 | if (features & CPUINFO_ARM_LINUX_FEATURE_SVE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_SWP
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:132:6: error: ‘struct cpuinfo_arm_isa’ has no member named ‘sve’
132 | isa->sve = true;
| ^~
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:134:18: error: ‘CPUINFO_ARM_LINUX_FEATURE2_SVE2’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_SHA2’?
134 | if (features2 & CPUINFO_ARM_LINUX_FEATURE2_SVE2) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_SHA2
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:135:6: error: ‘struct cpuinfo_arm_isa’ has no member named ‘sve2’
135 | isa->sve2 = true;
| ^~
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:139:19: error: ‘CPUINFO_ARM_LINUX_FEATURE2_BF16’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_FPA’?
139 | if (features2 & (CPUINFO_ARM_LINUX_FEATURE2_BF16 | CPUINFO_ARM_LINUX_FEATURE2_SVEBF16)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_FPA
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:139:53: error: ‘CPUINFO_ARM_LINUX_FEATURE2_SVEBF16’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE2_SHA1’?
139 | if (features2 & (CPUINFO_ARM_LINUX_FEATURE2_BF16 | CPUINFO_ARM_LINUX_FEATURE2_SVEBF16)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE2_SHA1
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:140:6: error: ‘struct cpuinfo_arm_isa’ has no member named ‘bf16’
140 | isa->bf16 = true;
| ^~
/home/thomace/XNNPACK/build/cpuinfo-source/src/arm/linux/aarch64-isa.c:142:17: error: ‘CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM’ undeclared (first use in this function); did you mean ‘CPUINFO_ARM_LINUX_FEATURE_IDIVT’?
142 | if (features & CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CPUINFO_ARM_LINUX_FEATURE_IDIVT
gmake[2]: *** [cpuinfo/CMakeFiles/cpuinfo.dir/build.make:238: cpuinfo/CMakeFiles/cpuinfo.dir/src/arm/linux/aarch64-isa.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:880: cpuinfo/CMakeFiles/cpuinfo.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

Errors build XNNPACK

Using a PI 400 Rev 1.0 with 4GB RAM and Twister OS 2.1.2
Kernel 5.10.103-v8+
64bit operating mode

Try alternative checkout like in the other ticket
Try 32bit and 64bit mode
Try apt-get update und upgrade

cmake --build . --config Release

.
.
.
.
.
.
.

/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1490:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0’
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1490:24: error: ‘vb0’ undeclared (first use in this function); did you mean ‘va0’?
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1490:38: error: expected ‘)’ before ‘int8x4_t’
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
~ ^~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1490:24: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1490:30: error: invalid type argument of unary ‘’ (have ‘int’)
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t
) w + 4;
^~~~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1491:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0c02’
const int16x2_t vb0c02 = __uxtab16(vb_minus_zero_point, vb0);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1491:25: error: ‘vb0c02’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1495:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0c13’
const int16x2_t vb0c13 = __uxtab16(vb_minus_zero_point, __ror(vb0, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1495:25: error: ‘vb0c13’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1497:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1’
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1497:24: error: ‘vb1’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1497:38: error: expected ‘)’ before ‘int8x4_t’
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
~ ^~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1497:24: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1497:30: error: invalid type argument of unary ‘’ (have ‘int’)
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t
) w + 4;
^~~~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1498:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1c02’
const int16x2_t vb1c02 = __uxtab16(vb_minus_zero_point, vb1);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1498:25: error: ‘vb1c02’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1502:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1c13’
const int16x2_t vb1c13 = __uxtab16(vb_minus_zero_point, __ror(vb1, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1502:25: error: ‘vb1c13’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1533:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘voutput_min’
const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
^~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1533:20: error: ‘voutput_min’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1533:44: error: expected ‘;’ before ‘params’
const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
^~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1534:23: error: expected ‘)’ before ‘vout’
__usub8((int8x4_t) vout, voutput_min);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1535:30: error: ‘uint8x4_t’ undeclared (first use in this function); did you mean ‘uint64_t’?
vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
^~~~~~~~~
uint64_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1535:40: error: expected ‘)’ before ‘vout’
vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1537:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘voutput_max’
const int8x4_t voutput_max = (int8x4_t) params->fp32_armsimd32.output_max;
^~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1537:20: error: ‘voutput_max’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1537:44: error: expected ‘;’ before ‘params’
const int8x4_t voutput_max = (int8x4_t) params->fp32_armsimd32.output_max;
^~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1538:23: error: expected ‘)’ before ‘vout’
__usub8((int8x4_t) vout, voutput_max);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1539:40: error: expected ‘)’ before ‘voutput_max’
vout = (uint32_t) __sel((uint8x4_t) voutput_max, (uint8x4_t) vout);
^~~~~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c: In function ‘xnn_qu8_igemm_minmax_fp32_ukernel_2x2c4__armsimd32’:
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1587:9: error: unknown type name ‘int16x2_t’
const int16x2_t vb_minus_zero_point = (int16x2_t) params->fp32_armsimd32.minus_kernel_zero_point;
^~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1587:42: error: ‘int16x2_t’ undeclared (first use in this function); did you mean ‘int16_t’?
const int16x2_t vb_minus_zero_point = (int16x2_t) params->fp32_armsimd32.minus_kernel_zero_point;
^~~~~~~~~
int16_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1587:53: error: expected ‘,’ or ‘;’ before ‘params’
const int16x2_t vb_minus_zero_point = (int16x2_t) params->fp32_armsimd32.minus_kernel_zero_point;
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1613:15: error: unknown type name ‘int8x4_t’
const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
^~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1613:31: error: ‘int8x4_t’ undeclared (first use in this function); did you mean ‘int64_t’?
const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
^~~~~~~~
int64_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1613:41: error: expected ‘,’ or ‘;’ before ‘unaligned_load_s32’
const int8x4_t va0 = (int8x4_t) unaligned_load_s32(a0); a0 += 4;
^~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1614:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘va1’
const int8x4_t va1 = (int8x4_t) unaligned_load_s32(a1); a1 += 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1614:24: error: ‘va1’ undeclared (first use in this function); did you mean ‘va0’?
const int8x4_t va1 = (int8x4_t) unaligned_load_s32(a1); a1 += 4;
^~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1614:40: error: expected ‘;’ before ‘unaligned_load_s32’
const int8x4_t va1 = (int8x4_t) unaligned_load_s32(a1); a1 += 4;
^~~~~~~~~~~~~~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1616:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘va0c02’
const int16x2_t va0c02 = __uxtb16(va0);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1616:25: error: ‘va0c02’ undeclared (first use in this function); did you mean ‘va0’?
const int16x2_t va0c02 = __uxtb16(va0);
^~~~~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1617:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘va0c13’
const int16x2_t va0c13 = __uxtb16(__ror(va0, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1617:25: error: ‘va0c13’ undeclared (first use in this function); did you mean ‘va0’?
const int16x2_t va0c13 = __uxtb16(__ror(va0, 8));
^~~~~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1618:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘va1c02’
const int16x2_t va1c02 = __uxtb16(va1);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1618:25: error: ‘va1c02’ undeclared (first use in this function); did you mean ‘va0’?
const int16x2_t va1c02 = __uxtb16(va1);
^~~~~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1619:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘va1c13’
const int16x2_t va1c13 = __uxtb16(__ror(va1, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1619:25: error: ‘va1c13’ undeclared (first use in this function); did you mean ‘vacc1x1’?
const int16x2_t va1c13 = __uxtb16(__ror(va1, 8));
^~~~~~
vacc1x1
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1621:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0’
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1621:24: error: ‘vb0’ undeclared (first use in this function); did you mean ‘va0’?
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
va0
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1621:38: error: expected ‘)’ before ‘int8x4_t’
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
~ ^~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1621:24: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1621:30: error: invalid type argument of unary ‘’ (have ‘int’)
const int8x4_t vb0 = ((const int8x4_t) w); w = (const int8_t
) w + 4;
^~~~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1622:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0c02’
const int16x2_t vb0c02 = __uxtab16(vb_minus_zero_point, vb0);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1622:25: error: ‘vb0c02’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1627:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb0c13’
const int16x2_t vb0c13 = __uxtab16(vb_minus_zero_point, __ror(vb0, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1627:25: error: ‘vb0c13’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1630:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1’
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1630:24: error: ‘vb1’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1630:38: error: expected ‘)’ before ‘int8x4_t’
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
~ ^~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1630:24: warning: type defaults to ‘int’ in type name [-Wimplicit-int]
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t*) w + 4;
^~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1630:30: error: invalid type argument of unary ‘’ (have ‘int’)
const int8x4_t vb1 = ((const int8x4_t) w); w = (const int8_t
) w + 4;
^~~~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1631:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1c02’
const int16x2_t vb1c02 = __uxtab16(vb_minus_zero_point, vb1);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1631:25: error: ‘vb1c02’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1636:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vb1c13’
const int16x2_t vb1c13 = __uxtab16(vb_minus_zero_point, __ror(vb1, 8));
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1636:25: error: ‘vb1c13’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1681:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘voutput_min’
const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
^~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1681:20: error: ‘voutput_min’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1681:44: error: expected ‘;’ before ‘params’
const int8x4_t voutput_min = (int8x4_t) params->fp32_armsimd32.output_min;
^~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1682:23: error: expected ‘)’ before ‘vout’
__usub8((int8x4_t) vout, voutput_min);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1683:30: error: ‘uint8x4_t’ undeclared (first use in this function); did you mean ‘uint64_t’?
vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
^~~~~~~~~
uint64_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1683:40: error: expected ‘)’ before ‘vout’
vout = (uint32_t) __sel((uint8x4_t) vout, (uint8x4_t) voutput_min);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1685:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘voutput_max’
const int8x4_t voutput_max = (int8x4_t) params->fp32_armsimd32.output_max;
^~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1685:20: error: ‘voutput_max’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1685:44: error: expected ‘;’ before ‘params’
const int8x4_t voutput_max = (int8x4_t) params->fp32_armsimd32.output_max;
^~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1686:23: error: expected ‘)’ before ‘vout’
__usub8((int8x4_t) vout, voutput_max);
^~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1687:40: error: expected ‘)’ before ‘voutput_max’
vout = (uint32_t) __sel((uint8x4_t) voutput_max, (uint8x4_t) vout);
^~~~~~~~~~~~
)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c: In function ‘xnn_qu8_vcvt_ukernel__armsimd32_x8’:
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1720:9: error: unknown type name ‘uint16x2_t’
const uint16x2_t vminus_input_zero_point = (uint16x2_t) params->armsimd32.minus_input_zero_point;
^~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1720:47: error: ‘uint16x2_t’ undeclared (first use in this function); did you mean ‘uint16_t’?
const uint16x2_t vminus_input_zero_point = (uint16x2_t) params->armsimd32.minus_input_zero_point;
^~~~~~~~~~
uint16_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1720:59: error: expected ‘,’ or ‘;’ before ‘params’
const uint16x2_t vminus_input_zero_point = (uint16x2_t) params->armsimd32.minus_input_zero_point;
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1724:11: error: unknown type name ‘uint8x4_t’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_indexed_load_u32(input, 0);
^~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1724:31: error: ‘uint8x4_t’ undeclared (first use in this function); did you mean ‘uint64_t’?
const uint8x4_t vx0123 = (uint8x4_t) unaligned_indexed_load_u32(input, 0);
^~~~~~~~~
uint64_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1724:42: error: expected ‘,’ or ‘;’ before ‘unaligned_indexed_load_u32’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_indexed_load_u32(input, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1725:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx4567’
const uint8x4_t vx4567 = (uint8x4_t) unaligned_indexed_load_u32(input, 1);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1725:21: error: ‘vx4567’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1725:41: error: expected ‘;’ before ‘unaligned_indexed_load_u32’
const uint8x4_t vx4567 = (uint8x4_t) unaligned_indexed_load_u32(input, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1728:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx02’
const uint16x2_t vx02 = __uxtab16(vminus_input_zero_point, vx0123);
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1728:22: error: ‘vx02’ undeclared (first use in this function); did you mean ‘vx0123’?
const uint16x2_t vx02 = __uxtab16(vminus_input_zero_point, vx0123);
^~~~
vx0123
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1729:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx13’
const uint16x2_t vx13 = __uxtab16(vminus_input_zero_point, __ror(vx0123, 8));
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1729:22: error: ‘vx13’ undeclared (first use in this function); did you mean ‘vx0123’?
const uint16x2_t vx13 = __uxtab16(vminus_input_zero_point, __ror(vx0123, 8));
^~~~
vx0123
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1730:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx46’
const uint16x2_t vx46 = __uxtab16(vminus_input_zero_point, vx4567);
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1730:22: error: ‘vx46’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1731:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx57’
const uint16x2_t vx57 = __uxtab16(vminus_input_zero_point, __ror(vx4567, 8));
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1731:22: error: ‘vx57’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1762:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx0123’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1762:21: error: ‘vx0123’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1762:41: error: expected ‘;’ before ‘unaligned_load_u32’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~~~~~~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1765:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx02’
const uint16x2_t vx02 = __uxtab16(vminus_input_zero_point, vx0123);
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1766:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx13’
const uint16x2_t vx13 = __uxtab16(vminus_input_zero_point, __ror(vx0123, 8));
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1785:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx0123’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1785:41: error: expected ‘;’ before ‘unaligned_load_u32’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~~~~~~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1787:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx02’
const uint16x2_t vx02 = __uxtab16(vminus_input_zero_point, vx0123);
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1788:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx13’
const uint16x2_t vx13 = __uxtab16(vminus_input_zero_point, __ror(vx0123, 8));
^~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c: In function ‘xnn_qu8_vlrelu_ukernel__armsimd32_x4’:
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1820:9: error: unknown type name ‘uint16x2_t’
const uint16x2_t vinput_zero_point = (uint16x2_t) params->armsimd32.input_zero_point;
^~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1820:41: error: ‘uint16x2_t’ undeclared (first use in this function); did you mean ‘uint16_t’?
const uint16x2_t vinput_zero_point = (uint16x2_t) params->armsimd32.input_zero_point;
^~~~~~~~~~
uint16_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1820:53: error: expected ‘,’ or ‘;’ before ‘params’
const uint16x2_t vinput_zero_point = (uint16x2_t) params->armsimd32.input_zero_point;
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1821:9: error: unknown type name ‘int16x2_t’
const int16x2_t vpositive_multiplier = (int16x2_t) params->armsimd32.positive_multiplier;
^~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1821:43: error: ‘int16x2_t’ undeclared (first use in this function); did you mean ‘int16_t’?
const int16x2_t vpositive_multiplier = (int16x2_t) params->armsimd32.positive_multiplier;
^~~~~~~~~
int16_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1821:54: error: expected ‘,’ or ‘;’ before ‘params’
const int16x2_t vpositive_multiplier = (int16x2_t) params->armsimd32.positive_multiplier;
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1822:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vnegative_multiplier’
const int16x2_t vnegative_multiplier = (int16x2_t) params->armsimd32.negative_multiplier;
^~~~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1822:19: error: ‘vnegative_multiplier’ undeclared (first use in this function); did you mean ‘vpositive_multiplier’?
const int16x2_t vnegative_multiplier = (int16x2_t) params->armsimd32.negative_multiplier;
^~~~~~~~~~~~~~~~~~~~
vpositive_multiplier
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1822:53: error: expected ‘;’ before ‘params’
const int16x2_t vnegative_multiplier = (int16x2_t) params->armsimd32.negative_multiplier;
^~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1825:11: error: unknown type name ‘uint8x4_t’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1825:31: error: ‘uint8x4_t’ undeclared (first use in this function); did you mean ‘uint64_t’?
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~
uint64_t
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1825:42: error: expected ‘,’ or ‘;’ before ‘unaligned_load_u32’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1828:15: error: expected ‘;’ before ‘vx02’
uint16x2_t vx02 = __uxtb16(vx0123);
^~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1829:15: error: expected ‘;’ before ‘vx13’
uint16x2_t vx13 = __uxtb16(__ror(vx0123, 8));
^~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1831:5: error: ‘vx02’ undeclared (first use in this function); did you mean ‘vx0123’?
vx02 = __usub16(vinput_zero_point, vx02);
^~~~
vx0123
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1831:12: warning: implicit declaration of function ‘__usub16’ [-Wimplicit-function-declaration]
vx02 = __usub16(vinput_zero_point, vx02);
^~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1832:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vmultiplier02’
const int16x2_t vmultiplier02 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1832:21: error: ‘vmultiplier02’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1832:48: error: expected ‘;’ before ‘__sel’
const int16x2_t vmultiplier02 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1833:5: error: ‘vx13’ undeclared (first use in this function); did you mean ‘vx0123’?
vx13 = __usub16(vinput_zero_point, vx13);
^~~~
vx0123
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1834:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vmultiplier13’
const int16x2_t vmultiplier13 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1834:21: error: ‘vmultiplier13’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1834:48: error: expected ‘;’ before ‘__sel’
const int16x2_t vmultiplier13 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1853:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vx0123’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1853:21: error: ‘vx0123’ undeclared (first use in this function)
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1853:41: error: expected ‘;’ before ‘unaligned_load_u32’
const uint8x4_t vx0123 = (uint8x4_t) unaligned_load_u32(input);
^~~~~~~~~~~~~~~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1855:15: error: expected ‘;’ before ‘vx02’
uint16x2_t vx02 = __uxtb16(vx0123);
^~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1856:15: error: expected ‘;’ before ‘vx13’
uint16x2_t vx13 = __uxtb16(__ror(vx0123, 8));
^~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1859:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vmultiplier02’
const int16x2_t vmultiplier02 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1859:48: error: expected ‘;’ before ‘__sel’
const int16x2_t vmultiplier02 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~
;
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1861:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘vmultiplier13’
const int16x2_t vmultiplier13 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~~~~~~~~
/home/pi/XNNPACK/src/amalgam/gen/armsimd32.c:1861:48: error: expected ‘;’ before ‘__sel’
const int16x2_t vmultiplier13 = (int16x2_t) __sel((uint8x4_t) vnegative_multiplier, (uint8x4_t) vpositive_multiplier);
^~~~~~
;
make[2]: *** [CMakeFiles/microkernels-prod.dir/build.make:89: CMakeFiles/microkernels-prod.dir/src/amalgam/gen/armsimd32.c.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:468: CMakeFiles/microkernels-prod.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2

Can we working on solution to save every steps into separated / same PNG files?

To see how the diffusion is progressing, it would be good to see diffused image stages in - for example - every single steps. The user could use paramter to show it or not. When showing like --showsteps without any extra parameter would show diffused image from every single steps. I know it would cause some extra cpu overhead, but would be really entertaining on more powerful systems than RPi.

I already started to thinking about how to achieve this, but other more talented developers might know this already.

Update:

I found the way to achieve it.

Raspberry Pi build.

Please could you write down the Raspberry Pi build instructions because the supplied ones result in a runtime failure.
Thanks.

Logging needed

Hi,

My idea is to implement some sort of logging mechanism.
I added my own taste of course, but would be benefitial to implement a light logging. Would you consider to add it, @vitoplantamura ?

Main purpose of the logging:
I can save automagically what I have been executed, created. This helped me in case of a previous kernel panic in RPi to "re-generate" the image.

void writeLog(std::string lines)
{
	try
	{
		std::ofstream fw("log.txt", std::ofstream::app);

		if (fw.is_open())
		{
			fw << lines << "\n";
			fw.close();
		}
		else std::cout << "Problem with opening file" << std::endl;
	}
	catch (char const* msg)
	{
		std::cout << msg << std::endl;
	}
}

in main:

std::cout << "----------------[start]------------------" << std::endl;
    writeLog("----------------[start]------------------");
    std::cout << "positive_prompt: " << positive_prompt << std::endl;
    writeLog("positive_prompt: " + positive_prompt);
    std::cout << "negative_prompt: " << negative_prompt << std::endl;
    writeLog("negative_prompt: " + negative_prompt);
    std::cout << "output_png_path: " << output_png_path << std::endl;
    writeLog("output_png_path: " + output_png_path);
    std::cout << "steps: " << steps << std::endl;
    writeLog("steps: " + std::to_string(steps));
    std::cout << "seed: " << seed << std::endl;
    writeLog("seed: " + std::to_string(seed));

    std::cout << "----------------[prompt]------------------" << std::endl;

    std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();

    auto [cond, uncond] = prompt_solver(positive_prompt, negative_prompt);

    std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();

    std::cout << "DONE!		" + std::to_string(std::chrono::duration_cast<std::chrono::seconds>(end - begin).count()) + + "s" << std::endl;

    std::cout << "----------------[diffusion]---------------" << std::endl;
    ncnn::Mat sample = diffusion_solver(seed, steps, cond, uncond);
    std::cout << "----------------[decode]------------------" << std::endl;

Seed option feature request and a question about onnx with custom sd model + lora

Hello.

I can't believe how this was achieved... Not like I am capable of understanding it either. Congrats!!!
I have a few questions:

1 - Will there be an option like --seed for being able to generate the same image given the same prompts in the future?

2 - At the moment, I have to first grab AUTOMATIC's webui, install https://github.com/AUTOMATIC1111/stable-diffusion-webui-tensorrt and the zip file it wants by finding out the pytorch version the webui uses somehow and then I have to generate a picture with all the lora's I want to use. Only after that image is generated can I generate the ONNX file.

After this file is made, I am not sure if I also have to "Convert ONNX to TensorRT" as stated in readme and possibly run out of VRAM (I don't know, it was not specified. They only said it would be huge. 4 GB VRAM is so little these days that I guess I can't do this one - but given the project name "OnnxStream" maybe I won't have to do this and I really hope I don't have to...)

And then, I have a model "more" compatible with onnxstream but now I need to use the notebook file (https://github.com/vitoplantamura/OnnxStream/blob/master/onnx2txt/onnx2txt.ipynb) to convert this ONNX file to txt and then I get the really compatible thing, right?

And then, this "thing" is model and the loras I used in the model all in one, with no chance to disable, change or enable or combine with other loras... It is basically merged and finalized. Right?

3 - So, will it become easier and more flexible eventually or are we just constrained with hardware? I plan to run this on my hopefully gonna arrive Zero 2 W.

4 - Will you eventually provide binaries for rpi, windows etc. up to date with each commit or a way to update? This may be a trivial question.

I have also checked #29 and I got scared lol. I may eventually try it or just wait in hopes of things getting easier but I don't know if they will ever be... I have never compiled something in my life, this would be my first attempt.

Sorry for this wall of text... This project seems so exciting.

Things I want to ask

can I run it on intel cpus??

OS: Debian GNU/Linux 12 (bookworm) x86_64
Kernel: 6.1.0-12-amd64
Uptime: 16 hours, 6 mins
CPU: Intel i3-8130U (4) @ 3.400GHz
GPU: Intel UHD Graphics 620
Memory: 7851MiB

If yes, How much time it may take while generating
and can i use it with auto1111?

OnnxStream and TinyLlama?

I was just wondering but would the methods used in OnnxStream further benefit a tiny language model like TinyLlama?. Just wanted to know how far resource usage could be brought down (I know it's not SD model but just wondering if the same could be applied on other types of models). TinyLlama uses about 550MB ram with the 4bit-quantized TinyLlama-1.1B's weight which seems quite enticing for lower end devices.

[question] your Mistral-to-ONNX export script

Here is how a dummy input data is prepared in the script:

dummy_input = (torch.tensor([[1, 2, 3]], dtype=torch.int64), # input_ids
              torch.tensor([[1, 1, 1, 1, 1, 1]], dtype=torch.int64),   # attention_mask
              torch.tensor([[3, 4, 5]], dtype=torch.int64))              #position_ids

I wonder

  1. why is attention_mask of size 6? Should not it be of the same size as input_ids'?
  2. why does position_ids point to position 3, 4, and 5 while there are only input_ids elements# 0, 1, 2?

Thank you

Docker image

Is there a docker image available for building SD and running OnnxStream?

=== ERROR === unable to open file: ./tokenizer/vocab.txt

./sd
----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 10
----------------[prompt]------------------
=== ERROR === unable to open file: ./tokenizer/vocab.txt

Implement text-to-video using onnx stream

Please consider implementing text-to-video using onnxstream. Text2Video-Zero does not run out of the box on CPU but can be made to run on CPU by changing 4 files and installing the appropriate version(and not the pinned version) of python dependencies. On my machine image generation took around 4GB RAM whereas video generation took around 6GB RAM(both case had only CPU, no GPU present). So, I guess you will be able to fit video generation in ~450MB on RaspberryPi.

Error build

I'm try build OnnxSteam on Ubuntu 22.04 arm64
comand: cmake --build . --config Release
output:

Consolidate compiler generated dependencies of target sd
[ 33%] Building CXX object CMakeFiles/sd.dir/sd.cpp.o
/media/usb_hard_drive/genimage/OnnxStream/src/sd.cpp: In function ‘int main(int, char**)’:
/media/usb_hard_drive/genimage/OnnxStream/src/sd.cpp:1876:19: warning: format not a string literal and no format arguments [-Wformat-security]
 1876 |             printf(("Invalid command line argument: \"" + arg + "\".\n\n").c_str());
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/usb_hard_drive/genimage/OnnxStream/src/sd.cpp:1902:23: warning: format not a string literal and no format arguments [-Wformat-security]
 1902 |                 printf(("Argument \"" + arg + "\" should be followed by a string.").c_str());
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 66%] Building CXX object CMakeFiles/sd.dir/onnxstream.cpp.o
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
                 from /usr/include/c++/11/vector:60,
                 from /media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:4,
                 from /media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1:
/usr/include/c++/11/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::decay<_Tp2>::type = float; typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type = float; typename std::decay<_Tp>::type = float]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:2085:30:   required from here
/usr/include/c++/11/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)
      |     ^~~~~~~~~
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘onnxstream::tensor_vector<T> onnxstream::XnnPack::convert(onnxstream::tensor_vector<T>&) [with U = short unsigned int; T = float; onnxstream::tensor_vector<T> = std::vector<float, onnxstream::Mallocator<float> >; onnxstream::tensor_vector<T> = std::vector<short unsigned int, onnxstream::Mallocator<short unsigned int> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1754:65:   required from here
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:84:46: error: invalid conversion from ‘xnn_status (*)(uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(unsigned int, xnn_operator**)’} to ‘xnn_status (*)(size_t, size_t, size_t, uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(long unsigned int, long unsigned int, long unsigned int, unsigned int, xnn_operator**)’} [-fpermissive]
   84 |             xnn_create_convert_nc_fxx_fxx = &xnn_create_convert_nc_f16_f32;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              |
      |                                              xnn_status (*)(uint32_t, xnn_operator**) {aka xnn_status (*)(unsigned int, xnn_operator**)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:85:47: error: invalid conversion from ‘xnn_status (*)(xnn_operator_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, pthreadpool*)’} to ‘xnn_status (*)(xnn_operator_t, size_t, pthreadpool_t)’ {aka ‘xnn_status (*)(xnn_operator*, long unsigned int, pthreadpool*)’} [-fpermissive]
   85 |             xnn_reshape_convert_nc_fxx_fxx = &xnn_reshape_convert_nc_f16_f32;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               xnn_status (*)(xnn_operator_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, pthreadpool*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘onnxstream::tensor_vector<T> onnxstream::XnnPack::convert(onnxstream::tensor_vector<T>&) [with U = float; T = short unsigned int; onnxstream::tensor_vector<T> = std::vector<short unsigned int, onnxstream::Mallocator<short unsigned int> >; onnxstream::tensor_vector<T> = std::vector<float, onnxstream::Mallocator<float> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1763:65:   required from here
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:90:46: error: invalid conversion from ‘xnn_status (*)(uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(unsigned int, xnn_operator**)’} to ‘xnn_status (*)(size_t, size_t, size_t, uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(long unsigned int, long unsigned int, long unsigned int, unsigned int, xnn_operator**)’} [-fpermissive]
   90 |             xnn_create_convert_nc_fxx_fxx = &xnn_create_convert_nc_f32_f16;
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              |
      |                                              xnn_status (*)(uint32_t, xnn_operator**) {aka xnn_status (*)(unsigned int, xnn_operator**)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:91:47: error: invalid conversion from ‘xnn_status (*)(xnn_operator_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, pthreadpool*)’} to ‘xnn_status (*)(xnn_operator_t, size_t, pthreadpool_t)’ {aka ‘xnn_status (*)(xnn_operator*, long unsigned int, pthreadpool*)’} [-fpermissive]
   91 |             xnn_reshape_convert_nc_fxx_fxx = &xnn_reshape_convert_nc_f32_f16;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               xnn_status (*)(xnn_operator_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, pthreadpool*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::transpose(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, const std::vector<long unsigned int>&) [with T = float; onnxstream::tensor_vector<T> = std::vector<float, onnxstream::Mallocator<float> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1786:47:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::transpose(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, const std::vector<long unsigned int>&) [with T = short unsigned int; onnxstream::tensor_vector<T> = std::vector<short unsigned int, onnxstream::Mallocator<short unsigned int> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1792:47:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::transpose(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, const std::vector<long unsigned int>&) [with T = unsigned char; onnxstream::tensor_vector<T> = std::vector<unsigned char, onnxstream::Mallocator<unsigned char> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1798:47:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::matrix_multiply(const std::vector<long unsigned int>&, T*, const std::vector<long unsigned int>&, T*, std::vector<long unsigned int>*, U*, T*, onnxstream::XnnPack::Qu8MatMulData*) [with T = float; U = float]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:2964:71:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::matrix_multiply(const std::vector<long unsigned int>&, T*, const std::vector<long unsigned int>&, T*, std::vector<long unsigned int>*, U*, T*, onnxstream::XnnPack::Qu8MatMulData*) [with T = short unsigned int; U = short unsigned int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:2981:77:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::sigmoid(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&) [with T = float; onnxstream::tensor_vector<T> = std::vector<float, onnxstream::Mallocator<float> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:3007:49:   required from here
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:471:42: error: invalid conversion from ‘xnn_status (*)(uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(unsigned int, xnn_operator**)’} to ‘xnn_status (*)(size_t, size_t, size_t, uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(long unsigned int, long unsigned int, long unsigned int, unsigned int, xnn_operator**)’} [-fpermissive]
  471 |             xnn_create_sigmoid_nc_xxx = &xnn_create_sigmoid_nc_f32;
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          xnn_status (*)(uint32_t, xnn_operator**) {aka xnn_status (*)(unsigned int, xnn_operator**)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:472:43: error: invalid conversion from ‘xnn_status (*)(xnn_operator_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, pthreadpool*)’} to ‘xnn_status (*)(xnn_operator_t, size_t, pthreadpool_t)’ {aka ‘xnn_status (*)(xnn_operator*, long unsigned int, pthreadpool*)’} [-fpermissive]
  472 |             xnn_reshape_sigmoid_nc_xxx = &xnn_reshape_sigmoid_nc_f32;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                           |
      |                                           xnn_status (*)(xnn_operator_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, pthreadpool*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::sigmoid(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&) [with T = short unsigned int; onnxstream::tensor_vector<T> = std::vector<short unsigned int, onnxstream::Mallocator<short unsigned int> >]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:3020:49:   required from here
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:477:42: error: invalid conversion from ‘xnn_status (*)(uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(unsigned int, xnn_operator**)’} to ‘xnn_status (*)(size_t, size_t, size_t, uint32_t, xnn_operator**)’ {aka ‘xnn_status (*)(long unsigned int, long unsigned int, long unsigned int, unsigned int, xnn_operator**)’} [-fpermissive]
  477 |             xnn_create_sigmoid_nc_xxx = &xnn_create_sigmoid_nc_f16;
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          xnn_status (*)(uint32_t, xnn_operator**) {aka xnn_status (*)(unsigned int, xnn_operator**)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:478:43: error: invalid conversion from ‘xnn_status (*)(xnn_operator_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, pthreadpool*)’} to ‘xnn_status (*)(xnn_operator_t, size_t, pthreadpool_t)’ {aka ‘xnn_status (*)(xnn_operator*, long unsigned int, pthreadpool*)’} [-fpermissive]
  478 |             xnn_reshape_sigmoid_nc_xxx = &xnn_reshape_sigmoid_nc_f16;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                           |
      |                                           xnn_status (*)(xnn_operator_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, pthreadpool*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::convolution_nhwc(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, U*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*) [with T = float; U = float; onnxstream::tensor_vector<T> = std::vector<float, onnxstream::Mallocator<float> >; size_t = long unsigned int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:3163:72:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::convolution_nhwc(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, U*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*) [with T = short unsigned int; U = short unsigned int; onnxstream::tensor_vector<T> = std::vector<short unsigned int, onnxstream::Mallocator<short unsigned int> >; size_t = long unsigned int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:3183:78:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::convolution_nhwc(std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<T>&, std::vector<long unsigned int>&, U*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*) [with T = unsigned char; U = int; onnxstream::tensor_vector<T> = std::vector<unsigned char, onnxstream::Mallocator<unsigned char> >; size_t = long unsigned int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:3236:76:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::matrix_multiply(const std::vector<long unsigned int>&, T*, const std::vector<long unsigned int>&, T*, std::vector<long unsigned int>*, U*, T*, onnxstream::XnnPack::Qu8MatMulData*) [with T = unsigned char; U = int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:4307:79:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::softmax(std::vector<long unsigned int>&, T*, T*, onnxstream::XnnPack::Qu8SoftmaxData*) [with T = float]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:4378:53:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::softmax(std::vector<long unsigned int>&, T*, T*, onnxstream::XnnPack::Qu8SoftmaxData*) [with T = short unsigned int]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:4391:53:   required from here
/media/usb_hard_drive/genimage/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*)}
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp: In instantiation of ‘std::pair<std::vector<long unsigned int>, std::vector<T, onnxstream::Mallocator<T> > > onnxstream::XnnPack::softmax(std::vector<long unsigned int>&, T*, T*, onnxstream::XnnPack::Qu8SoftmaxData*) [with T = unsigned char]’:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:4410:62:   required from here
/media/usb_hard_drive/genimage/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 /media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.cpp:1:
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convert<short unsigned int, float>(onnxstream::tensor_vector<short unsigned int>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convert<short unsigned int, float>(onnxstream::tensor_vector<short unsigned int>&)::<lambda()>’, is used but never defined [-fpermissive]
   80 |     scope_guard(Callable&& undo_func) : f(std::forward<Callable>(undo_func)) { }
      |     ^~~~~~~~~~~
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convert<float, short unsigned int>(onnxstream::tensor_vector<float>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convert<float, short unsigned int>(onnxstream::tensor_vector<float>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose<float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, const std::vector<long unsigned int>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose<float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, const std::vector<long unsigned int>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose<short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, const std::vector<long unsigned int>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose<short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, const std::vector<long unsigned int>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::transpose<unsigned char>(std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, const std::vector<long unsigned int>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::transpose<unsigned char>(std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, const std::vector<long unsigned int>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<float, float>(const std::vector<long unsigned int>&, float*, const std::vector<long unsigned int>&, float*, std::vector<long unsigned int>*, float*, float*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<float, float>(const std::vector<long unsigned int>&, float*, const std::vector<long unsigned int>&, float*, std::vector<long unsigned int>*, float*, float*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>(const std::vector<long unsigned int>&, short unsigned int*, const std::vector<long unsigned int>&, short unsigned int*, std::vector<long unsigned int>*, short unsigned int*, short unsigned int*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<short unsigned int, short unsigned int>(const std::vector<long unsigned int>&, short unsigned int*, const std::vector<long unsigned int>&, short unsigned int*, std::vector<long unsigned int>*, short unsigned int*, short unsigned int*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::sigmoid<float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::sigmoid<float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::sigmoid<short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::sigmoid<short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<float, float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, std::vector<long unsigned int>&, float*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<float, float>(std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<float>&, std::vector<long unsigned int>&, float*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, std::vector<long unsigned int>&, short unsigned int*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<short unsigned int, short unsigned int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<short unsigned int>&, std::vector<long unsigned int>&, short unsigned int*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::convolution_nhwc<unsigned char, int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, std::vector<long unsigned int>&, int*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::convolution_nhwc<unsigned char, int>(std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, std::vector<long unsigned int>&, onnxstream::tensor_vector<unsigned char>&, std::vector<long unsigned int>&, int*, size_t, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<int>&, int, onnxstream::XnnPack::Qu8ConvData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::matrix_multiply<unsigned char, int>(const std::vector<long unsigned int>&, unsigned char*, const std::vector<long unsigned int>&, unsigned char*, std::vector<long unsigned int>*, int*, unsigned char*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::matrix_multiply<unsigned char, int>(const std::vector<long unsigned int>&, unsigned char*, const std::vector<long unsigned int>&, unsigned char*, std::vector<long unsigned int>*, int*, unsigned char*, onnxstream::XnnPack::Qu8MatMulData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax<float>(std::vector<long unsigned int>&, float*, float*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax<float>(std::vector<long unsigned int>&, float*, float*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax<short unsigned int>(std::vector<long unsigned int>&, short unsigned int*, short unsigned int*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax<short unsigned int>(std::vector<long unsigned int>&, short unsigned int*, short unsigned int*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>’, is used but never defined [-fpermissive]
/media/usb_hard_drive/genimage/OnnxStream/src/onnxstream.h:80:5: error: ‘onnxstream::scope_guard::scope_guard(Callable&&) [with Callable = onnxstream::XnnPack::softmax<unsigned char>(std::vector<long unsigned int>&, unsigned char*, unsigned char*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>]’, declared using local type ‘onnxstream::XnnPack::softmax<unsigned char>(std::vector<long unsigned int>&, unsigned char*, unsigned char*, onnxstream::XnnPack::Qu8SoftmaxData*)::<lambda()>’, is used but never defined [-fpermissive]
gmake[2]: *** [CMakeFiles/sd.dir/build.make:90: CMakeFiles/sd.dir/onnxstream.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sd.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
cmake 3.22.1 (3.22.1-1ubuntu1.22.04.1).

build

can this be built for linux arm 64? say termux environment .
also i would like to know about the inference speed

how to MAX_SPEED=ON

Hi there,
sorry if this is a dumb question but
how can i set MAX_SPEED=ON i carnt figure it out
many thanks

Runtime error : fatal error in worker thread: "read_file: invalid size of file."

Hi, my platform is Ubuntu 22.04, AMD Ryzen 5 2500U with 12GB RAM, about 6.5GB available as per "free -h"
Built without issues. Extracted the weights archive to compiled executable directory.
Getting a run time error
./sd --models-path ./SD/ --steps 3

----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: ./result.png
steps: 3
----------------[prompt]------------------
=== ERROR === DiskPrefetchWeightsProvider::provide: fatal error in worker thread: "read_file: invalid size of file."

I also tried "--rpi" based on your solution for another issue, but I get the same error.

Error building the Stable Diffusion example

The firsts commands ran without problems but when I try to build the example using the commands provided in the example I got the following compilation errors:

cmake -DXNNPACK_DIR=<DIRECTORY_WHERE_XNNPACK_WAS_CLONED> .. # runs without problems
cmake --build . --config Release

[ 33%] Building CXX object CMakeFiles/sd.dir/sd.cpp.o
/home/user/OnnxStream/src/sd.cpp: In constructor ‘ncnn::Mat::Mat(int, int, int, void*)’:
/home/user/OnnxStream/src/sd.cpp:121:13: error: ‘memcpy’ was not declared in this scope
  121 |             memcpy(v.data(), _data, total() * sizeof(float));
      |             ^~~~~~
/home/user/OnnxStream/src/sd.cpp:40:1: note: ‘memcpy’ is defined in header ‘<cstring>; did you forget to ‘#include <cstring>’?
   39 | #include "onnxstream.h"
  +++ |+#include <cstring>
   40 | using namespace onnxstream;
/home/user/OnnxStream/src/sd.cpp: In function ‘ncnn::Mat decoder_solver(ncnn::Mat&)’:
/home/user/OnnxStream/src/sd.cpp:622:17: error: ‘memcpy’ was not declared in this scope
  622 |                 memcpy((float*)res, model.m_data[0].get_vector<float>().data(), res.total() * sizeof(float));
      |                 ^~~~~~
/home/user/OnnxStream/src/sd.cpp:622:17: note: ‘memcpy’ is defined in header ‘<cstring>; did you forget to ‘#include <cstring>’?
/home/user/OnnxStream/src/sd.cpp: In lambda function:
/home/user/OnnxStream/src/sd.cpp:761:13: error: ‘memcpy’ was not declared in this scope
  761 |             memcpy((float*)res, output_vec.data(), res.total() * sizeof(float));
      |             ^~~~~~
/home/user/OnnxStream/src/sd.cpp:761:13: note: ‘memcpy’ is defined in header ‘<cstring>; did you forget to ‘#include <cstring>’?
/home/user/OnnxStream/src/sd.cpp: In function ‘ncnn::Mat prompt_solve(std::unordered_map<std::__cxx11::basic_string<char>, int>&, ncnn::Net&, std::string)’:
/home/user/OnnxStream/src/sd.cpp:1155:21: error: ‘memcpy’ was not declared in this scope
 1155 |                     memcpy((float*)res, model.m_data[0].get_vector<float>().data(), res.total() * sizeof(float));
      |                     ^~~~~~
/home/user/OnnxStream/src/sd.cpp:1155:21: note: ‘memcpy’ is defined in header ‘<cstring>; did you forget to ‘#include <cstring>’?
/home/user/OnnxStream/src/sd.cpp: In function ‘int main(int, char**)’:
/home/user/OnnxStream/src/sd.cpp:1379:13: error: ‘memcpy’ was not declared in this scope
 1379 |             memcpy((float*)sample, vec.data(), sample.total() * sizeof(float));
      |             ^~~~~~
/home/user/OnnxStream/src/sd.cpp:1379:13: note: ‘memcpy’ is defined in header ‘<cstring>; did you forget to ‘#include <cstring>’?
make[2]: *** [CMakeFiles/sd.dir/build.make:76: CMakeFiles/sd.dir/sd.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sd.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Maybe I am missing something? Thanks in advance

My setup:

OS: Arch Linux x86_64 
Kernel: 6.1.38-2-lts 
Shell: zsh 5.9 
CPU: AMD Ryzen 7 5700U with Radeon Graphics (16) @ 1.800GHz 
GPU: AMD ATI 03:00.0 Lucienne 
Memory: 15375MiB

Errors with ./sd

I built the example following the instructions on my Raspberry pi 4, compiled XNNPACK and OnxxStream, also downloaded the stable diffusion base image.
When i execute ./sd --rpi --decoder-fp16 --steps 3 --output result.jpg
i get:
-bash: ./sd: Permission denied
The same happens if i try to run ./sd by itself.

I have tried with chmod 777, copied the folder over to the SD card (was compiling and downloading all files to an extenral pen drive) and yet i get the same behaviour.

compiling in raspi 4

trying to build on raspi 4 with rasbain os 64 bit
everything works fine until in try.
"cmake --build . --config Release" command for OnnxStream
Not sure what i am doing wrong,Please help

Os version
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"

LOGS:
(diffusionpi) rihaz@pi:~/diffusionpi/OnnxStream/src/build $ cmake --build . --config Release
[ 33%] Building CXX object CMakeFiles/sd.dir/sd.cpp.o
[ 66%] 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/rihaz/diffusionpi/OnnxStream/src/onnxstream.h:4,
from /home/rihaz/diffusionpi/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/rihaz/diffusionpi/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)
| ^~~~~~~~~
[100%] Linking CXX executable sd
[100%] Built target sd

(diffusionpi) rihaz@pi:~/diffusionpi/OnnxStream/src/build $ ./sd --rpi --steps 3 --output result.png
----------------[start]------------------
positive_prompt: a photo of an astronaut riding a horse on mars
negative_prompt: ugly, blurry
output_png_path: result.png
steps: 3
----------------[prompt]------------------
=== ERROR === unable to open file: ./tokenizer/vocab.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.