vitoplantamura / OnnxStream

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

build error with latest Cpp #24

Closed ThomAce closed 1 year ago

ThomAce commented 1 year ago

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>
vitoplantamura commented 1 year ago

hi,

you are compiling against the latest version of XnnPack.

Make sure to run the "git checkout" command as explained in the instructions for building XnnPack.

Thanks, Vito

ThomAce commented 1 year ago

Hi,

Ahh, thanks. For whatever reason, I skipped those steps. Thanks again!