Closed aladerran closed 1 year ago
Error Log:
(/ugra/srlin/chipyard/.conda-env) srlin@chensvr:~/chipyard/generators/gemmini/software/onnxruntime-riscv$ ./build.sh --config=Release --parallel
Performing Release build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1602k 100 1602k 0 0 933k 0 0:00:01 0:00:01 --:--:-- 2919k
Archive: protoc.zip
creating: include/
creating: include/google/
creating: include/google/protobuf/
inflating: include/google/protobuf/wrappers.proto
inflating: include/google/protobuf/field_mask.proto
inflating: include/google/protobuf/api.proto
inflating: include/google/protobuf/struct.proto
inflating: include/google/protobuf/descriptor.proto
inflating: include/google/protobuf/timestamp.proto
creating: include/google/protobuf/compiler/
inflating: include/google/protobuf/compiler/plugin.proto
inflating: include/google/protobuf/empty.proto
inflating: include/google/protobuf/any.proto
inflating: include/google/protobuf/source_context.proto
inflating: include/google/protobuf/type.proto
inflating: include/google/protobuf/duration.proto
creating: bin/
inflating: bin/protoc
inflating: readme.txt
2023-07-24 16:14:34,439 tools_python_utils [INFO] - flatbuffers module is not installed. parse_config will not be available
2023-07-24 16:14:34,444 build [INFO] - Build started
2023-07-24 16:14:34,444 build [INFO] - Generating CMake build tree
2023-07-24 16:14:34,444 util.run [INFO] - Running subprocess in 'build/Release'
['/ugra/srlin/chipyard/.conda-env/bin/cmake', '/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_EXE_LINKER_FLAGS=-latomic -static', '-DCMAKE_SYSTEM_NAME=Linux', '-DUNIX=True', '-Donnxruntime_USE_SYSTOLIC=ON', '-Donnxruntime_FOR_FIRESIM=OFF', '-Donnxruntime_USE_HWACHA=OFF', '-Donnxruntime_RUN_ONNX_TESTS=OFF', '-Donnxruntime_BUILD_WINML_TESTS=ON', '-Donnxruntime_GENERATE_TEST_REPORTS=ON', '-Donnxruntime_DEV_MODE=ON', '-DPYTHON_EXECUTABLE=/ugra/srlin/chipyard/.conda-env/bin/python3', '-Donnxruntime_USE_CUDA=OFF', '-Donnxruntime_CUDA_VERSION=', '-Donnxruntime_ROCM_VERSION=', '-Donnxruntime_CUDA_HOME=', '-Donnxruntime_CUDNN_HOME=', '-Donnxruntime_USE_FEATURIZERS=OFF', '-Donnxruntime_USE_MIMALLOC_STL_ALLOCATOR=OFF', '-Donnxruntime_USE_MIMALLOC_ARENA_ALLOCATOR=OFF', '-Donnxruntime_ENABLE_PYTHON=OFF', '-Donnxruntime_BUILD_CSHARP=OFF', '-Donnxruntime_BUILD_JAVA=OFF', '-Donnxruntime_BUILD_NODEJS=OFF', '-Donnxruntime_BUILD_OBJC=OFF', '-Donnxruntime_BUILD_SHARED_LIB=OFF', '-Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF', '-Donnxruntime_USE_DNNL=OFF', '-Donnxruntime_DNNL_GPU_RUNTIME=', '-Donnxruntime_DNNL_OPENCL_ROOT=', '-Donnxruntime_USE_NNAPI_BUILTIN=OFF', '-Donnxruntime_USE_RKNPU=OFF', '-Donnxruntime_USE_OPENMP=OFF', '-Donnxruntime_USE_TVM=OFF', '-Donnxruntime_USE_LLVM=OFF', '-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF', '-Donnxruntime_USE_VITISAI=OFF', '-Donnxruntime_USE_NUPHAR=OFF', '-Donnxruntime_USE_TENSORRT=OFF', '-Donnxruntime_TENSORRT_HOME=', '-Donnxruntime_USE_MIGRAPHX=OFF', '-Donnxruntime_MIGRAPHX_HOME=', '-Donnxruntime_CROSS_COMPILING=ON', '-Donnxruntime_DISABLE_CONTRIB_OPS=OFF', '-Donnxruntime_DISABLE_ML_OPS=OFF', '-Donnxruntime_DISABLE_RTTI=OFF', '-Donnxruntime_DISABLE_EXCEPTIONS=OFF', '-Donnxruntime_DISABLE_ORT_FORMAT_LOAD=OFF', '-Donnxruntime_MINIMAL_BUILD=OFF', '-Donnxruntime_EXTENDED_MINIMAL_BUILD=OFF', '-Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF', '-Donnxruntime_REDUCED_OPS_BUILD=OFF', '-Donnxruntime_MSVC_STATIC_RUNTIME=OFF', '-Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF', '-Donnxruntime_USE_DML=OFF', '-Donnxruntime_USE_WINML=OFF', '-Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF', '-Donnxruntime_USE_TELEMETRY=OFF', '-Donnxruntime_ENABLE_LTO=OFF', '-Donnxruntime_USE_ACL=OFF', '-Donnxruntime_USE_ACL_1902=OFF', '-Donnxruntime_USE_ACL_1905=OFF', '-Donnxruntime_USE_ACL_1908=OFF', '-Donnxruntime_USE_ACL_2002=OFF', '-Donnxruntime_USE_ARMNN=OFF', '-Donnxruntime_ARMNN_RELU_USE_CPU=ON', '-Donnxruntime_ARMNN_BN_USE_CPU=ON', '-Donnxruntime_ENABLE_NVTX_PROFILE=OFF', '-Donnxruntime_ENABLE_TRAINING=OFF', '-Donnxruntime_ENABLE_TRAINING_OPS=OFF', '-Donnxruntime_ENABLE_CPU_FP16_OPS=OFF', '-Donnxruntime_USE_NCCL=ON', '-Donnxruntime_BUILD_BENCHMARKS=OFF', '-Donnxruntime_USE_ROCM=OFF', '-Donnxruntime_ROCM_HOME=', '-DOnnxruntime_GCOV_COVERAGE=OFF', '-Donnxruntime_USE_MPI=ON', '-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF', '-Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF', '-Donnxruntime_BUILD_WEBASSEMBLY=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON', '-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF', '-Donnxruntime_ENABLE_EAGER_MODE=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_SOURCEMAP=OFF', '-Donnxruntime_WEBASSEMBLY_SOURCEMAP_BASE=', '-DCMAKE_SYSTEM_PROCESSOR=riscv', '-DONNX_CUSTOM_PROTOC_EXECUTABLE=/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/build/protoc/bin/protoc', '-Donnxruntime_PYBIND_EXPORT_OPSCHEMA=OFF', '-Donnxruntime_ENABLE_MEMLEAK_CHECKER=OFF', '-DCMAKE_BUILD_TYPE=Release']
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /ugra/srlin/chipyard/.conda-env/riscv-tools/bin/riscv64-unknown-linux-gnu-gcc - 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: /ugra/srlin/chipyard/.conda-env/riscv-tools/bin/riscv64-unknown-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test onnxruntime_HAVE_BUILTIN_ATOMICS
-- Performing Test onnxruntime_HAVE_BUILTIN_ATOMICS - Success
-- Performing Test HAS_NOERROR
-- Performing Test HAS_NOERROR - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test COMPILER_SUPPORT_MF16C
-- Performing Test COMPILER_SUPPORT_MF16C - Failed
F16C instruction set is not supported.
-- Performing Test COMPILER_SUPPORT_FMA
-- Performing Test COMPILER_SUPPORT_FMA - Failed
FMA instruction set is not supported.
-- Performing Test COMPILER_SUPPORT_AVX
-- Performing Test COMPILER_SUPPORT_AVX - Failed
AVX instruction set is not supported.
One or more AVX/F16C instruction flags are not supported.
Use gtest from submodule
CMake Deprecation Warning at external/googletest/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at external/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at external/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found PythonInterp: /ugra/srlin/chipyard/.conda-env/bin/python3 (found version "3.10.10")
Doing crosscompiling
Use protobuf from submodule
--
-- 3.16.0.0
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
# date: USE_SYSTEM_TZ_DB ON
# date: USE_TZ_DB_IN_DOT OFF
# date: BUILD_SHARED_LIBS OFF
# date: ENABLE_DATE_TESTING OFF
-- Using the single-header code from /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/
-- Performing Test HAS_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAS_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAS_UNUSED_PARAMETER
-- Performing Test HAS_UNUSED_PARAMETER - Success
-- Performing Test HAS_UNUSED_VARIABLE
-- Performing Test HAS_UNUSED_VARIABLE - Success
-- Performing Test HAS_CAST_FUNCTION_TYPE
-- Performing Test HAS_CAST_FUNCTION_TYPE - Success
-- Performing Test HAS_PARENTHESES
-- Performing Test HAS_PARENTHESES - Success
-- Performing Test HAS_USELESS_CAST
-- Performing Test HAS_USELESS_CAST - Success
-- Performing Test HAS_NONNULL_COMPARE
-- Performing Test HAS_NONNULL_COMPARE - Success
-- Performing Test HAS_TAUTOLOGICAL_POINTER_COMPARE
-- Performing Test HAS_TAUTOLOGICAL_POINTER_COMPARE - Failed
-- Performing Test HAS_CATCH_VALUE
-- Performing Test HAS_CATCH_VALUE - Success
-- Performing Test HAS_MISSING_BRACES
-- Performing Test HAS_MISSING_BRACES - Success
-- Performing Test HAS_IGNORED_ATTRIBUTES
-- Performing Test HAS_IGNORED_ATTRIBUTES - Success
-- Performing Test HAS_DEPRECATED_COPY
-- Performing Test HAS_DEPRECATED_COPY - Success
-- Performing Test HAS_DEPRECATED_DECLARATIONS
-- Performing Test HAS_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAS_CLASS_MEMACCESS
-- Performing Test HAS_CLASS_MEMACCESS - Success
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
-- Performing Test HAS_STRICT_ALIASING
-- Performing Test HAS_STRICT_ALIASING - Success
NVCC_ERROR =
NVCC_OUT = No such file or directory
-- Found PythonLibs: /ugra/srlin/chipyard/.conda-env/lib/libpython3.10.so (found version "3.10.10")
-- Using custom protoc executable
Generated: /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/build/Release/external/onnx/onnx/onnx-ml.proto
Generated: /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/build/Release/external/onnx/onnx/onnx-operators-ml.proto
Generated: /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/build/Release/external/onnx/onnx/onnx-data.proto
--
-- ******** Summary ********
-- CMake version : 3.26.3
-- CMake command : /ugra/srlin/chipyard/.conda-env/bin/cmake
-- System : Linux
-- C++ compiler : /ugra/srlin/chipyard/.conda-env/riscv-tools/bin/riscv64-unknown-linux-gnu-g++
-- C++ compiler version : 12.2.0
-- CXX flags : -march=rv64imafdc -mabi=lp64d -ffunction-sections -fdata-sections -Wno-error=attributes -Wnon-virtual-dtor
-- Build type : Release
-- Compile definitions : ENABLE_ORT_FORMAT_LOAD;EIGEN_MPL2_ONLY;PLATFORM_POSIX
-- CMAKE_PREFIX_PATH :
-- CMAKE_INSTALL_PREFIX : /usr/local
-- CMAKE_MODULE_PATH : /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external
--
-- ONNX version : 1.9.0
-- ONNX NAMESPACE : onnx
-- ONNX_USE_LITE_PROTO : ON
-- USE_PROTOBUF_SHARED_LIBS : OFF
-- ONNX_DISABLE_EXCEPTIONS : OFF
-- ONNX_WERROR : OFF
-- ONNX_BUILD_TESTS : OFF
-- ONNX_BUILD_BENCHMARKS : OFF
-- ONNXIFI_DUMMY_BACKEND : OFF
-- ONNXIFI_ENABLE_EXT : OFF
--
-- Protobuf compiler :
-- Protobuf includes :
-- Protobuf libraries :
-- BUILD_ONNX_PYTHON : OFF
-- Looking for strtof_l
-- Looking for strtof_l - found
-- Looking for strtoull_l
-- Looking for strtoull_l - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
CMake Warning at flake8.cmake:19 (message):
Could not find 'flake8' to check python scripts. Please install flake8
using pip.
Call Stack (most recent call first):
CMakeLists.txt:1776 (include)
-- Configuring done (8.0s)
-- Generating done (0.7s)
CMake Warning:
Manually-specified variables were not used by the project:
onnxruntime_BUILD_WINML_TESTS
onnxruntime_CUDA_VERSION
onnxruntime_DNNL_GPU_RUNTIME
onnxruntime_DNNL_OPENCL_ROOT
onnxruntime_MIGRAPHX_HOME
onnxruntime_PYBIND_EXPORT_OPSCHEMA
onnxruntime_ROCM_HOME
onnxruntime_ROCM_VERSION
onnxruntime_TENSORRT_HOME
onnxruntime_WEBASSEMBLY_SOURCEMAP_BASE
-- Build files have been written to: /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/build/Release
2023-07-24 16:14:43,344 util.run [DEBUG] - Subprocess completed. Return code: 0
2023-07-24 16:14:43,344 build [INFO] - Building targets for Release configuration
2023-07-24 16:14:43,344 util.run [INFO] - Running subprocess in '/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv'
['/ugra/srlin/chipyard/.conda-env/bin/cmake', '--build', 'build/Release', '--config', 'Release', '--', '-j80']
[ 0%] Generating cpp/internal/common.c
[ 0%] Generating cpp/internal/counter.c
[ 1%] Generating cpp/platform/posix/src/per_thread_waiter.c
[ 1%] Generating cpp/platform/c++11/src/nsync_panic.cc
[ 1%] Generating cpp/internal/wait.c
[ 1%] Generating cpp/platform/c++11/src/time_rep_timespec.cc
[ 1%] Generating cpp/internal/cv.c
[ 2%] Generating cpp/internal/debug.c
[ 2%] Generating cpp/internal/dll.c
[ 2%] Generating cpp/internal/mu_wait.c
[ 2%] Generating cpp/internal/note.c
[ 2%] Generating cpp/internal/sem_wait.c
[ 2%] Generating cpp/internal/mu.c
[ 2%] Generating cpp/platform/linux/src/nsync_semaphore_futex.c
[ 2%] Running gen_proto.py on onnx/onnx.in.proto
[ 2%] Building CXX object external/re2/CMakeFiles/re2.dir/re2/compile.cc.o
[ 2%] Generating cpp/internal/once.c
[ 2%] Building CXX object external/re2/CMakeFiles/re2.dir/re2/bitstate.cc.o
[ 2%] Generating cpp/platform/c++11/src/yield.cc
[ 2%] Building CXX object external/re2/CMakeFiles/re2.dir/re2/dfa.cc.o
[ 2%] Generating cpp/internal/time_internal.c
[ 51%] Built target onnxruntime_optimizer
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/IOBinding.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/abi_session_options.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/custom_ops.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/default_cpu_allocator_c_api.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/device_allocator.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/environment.cc.o
[ 51%] Building CXX object CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/inference_session.cc.o
In file included from /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/inference_session_utils.h:21,
from /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/inference_session.cc:50:
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp: In instantiation of 'std::string nlohmann::detail::lexer<BasicJsonType>::get_token_string() const [with BasicJsonType = nlohmann::basic_json<>; std::string = std::__cxx11::basic_string<char>]':
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp:8745:57: required from 'void nlohmann::detail::parser<BasicJsonType>::parse(bool, BasicJsonType&) [with BasicJsonType = nlohmann::basic_json<>]'
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp:20835:79: required from 'static nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::parse(IteratorType, IteratorType, parser_callback_t, bool) [with IteratorType = const char*; typename std::enable_if<std::is_base_of<std::random_access_iterator_tag, typename std::iterator_traits<_InputIterator>::iterator_category>::value, int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer; parser_callback_t = std::function<bool(int, nlohmann::detail::parser<nlohmann::basic_json<> >::parse_event_t, nlohmann::basic_json<>&)>]'
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp:22653:33: required from here
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp:8494:24: error: comparison is always true due to limited range of data type [-Werror=type-limits]
8494 | if ('\x00' <= c and c <= '\x1F')
| ~~~~~~~^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/onnxruntime_session.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/core/session/inference_session.cc.o] Error 1
gmake[1]: *** [CMakeFiles/onnxruntime_session.dir/all] Error 2
gmake: *** [all] Error 2
Traceback (most recent call last):
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 2162, in <module>
sys.exit(main())
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 2088, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 1087, in build_targets
run_subprocess(cmd_args, env=env)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 591, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/python/util/run.py", line 41, in run
completed_process = subprocess.run(
File "/ugra/srlin/chipyard/.conda-env/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/ugra/srlin/chipyard/.conda-env/bin/cmake', '--build', 'build/Release', '--config', 'Release']' returned non-zero exit status 2.
I think it can be caused by the -Werror, maybe adding [-Wno-error=type-limits]? I just modified the "auto c" to "signed char c" for now in the following snippet:
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/cmake/external/json/single_include/nlohmann/json.hpp:8494:24: error: comparison is always true due to limited range of data type [-Werror=type-limits]
8494 | if ('\x00' <= c and c <= '\x1F')
| ~~~~~~~^~~~
While after rm -rf build/ and rebuild, it shows:
[ 96%] Built target onnx_test_runner
[ 96%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/scatter_nd_op_test.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/scatter_op_test.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/shape_op_test.cc.o
In file included from /ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/future:48,
from /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:4:
In copy constructor 'std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = const onnx::GraphProto; _ArgTypes = {const onnxruntime::test::{anonymous}::RunOptions&}]',
inlined from 'onnxruntime::test::LoopOpTester::LoopOpTester(const onnxruntime::test::{anonymous}::RunOptions&, SubgraphFunc)' at /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:45:49,
inlined from 'virtual void onnxruntime::test::Loop_InfiniteLoopTermination_Test::TestBody()' at /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:548:40:
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h:391:17: error: '<anonymous>' may be used uninitialized [-Werror=maybe-uninitialized]
391 | __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
| ~~~~^~~~~~~~~~
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h: In member function 'virtual void onnxruntime::test::Loop_InfiniteLoopTermination_Test::TestBody(':
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h:267:7: note: by argument 2 of type 'const std::_Any_data&' to 'static bool std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Res = const onnx::GraphProto; _Functor = onnxruntime::test::Loop_InfiniteLoopTermination_Test::TestBody()::<lambda(const onnxruntime::test::{anonymous}::RunOptions&)>; _ArgTypes = {const onnxruntime::test::{anonymous}::RunOptions&}]' declared here
267 | _M_manager(_Any_data& __dest, const _Any_data& __source,
| ^~~~~~~~~~
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:548:40: note: '<anonymous>' declared here
548 | LoopOpTester test{{}, create_subgraph};
| ^
In copy constructor 'std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = const onnx::GraphProto; _ArgTypes = {const onnxruntime::test::{anonymous}::RunOptions&}]',
inlined from 'onnxruntime::test::LoopOpTester::LoopOpTester(const onnxruntime::test::{anonymous}::RunOptions&, SubgraphFunc)' at /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:45:49,
inlined from 'virtual void onnxruntime::test::Loop_SubgraphTypeOverride_Test::TestBody()' at /ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:671:40:
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h:391:17: error: '<anonymous>' may be used uninitialized [-Werror=maybe-uninitialized]
391 | __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
| ~~~~^~~~~~~~~~
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h: In member function 'virtual void onnxruntime::test::Loop_SubgraphTypeOverride_Test::TestBody()':
/ugra/srlin/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include/c++/12.2.0/bits/std_function.h:267:7: note: by argument 2 of type 'const std::_Any_data&' to 'static bool std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Res = const onnx::GraphProto; _Functor = onnxruntime::test::Loop_SubgraphTypeOverride_Test::TestBody()::<lambda(const onnxruntime::test::{anonymous}::RunOptions&)>; _ArgTypes = {const onnxruntime::test::{anonymous}::RunOptions&}]' declared here
267 | _M_manager(_Any_data& __dest, const _Any_data& __source,
| ^~~~~~~~~~
/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc:671:40: note: '<anonymous>' declared here
671 | LoopOpTester test{{}, create_subgraph};
| ^
[ 96%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/size_test.cc.o
[ 96%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/slice_op.test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/space_depth_ops_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/split_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/squeeze_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/tile_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/tensor_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/transpose_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/trilu_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/trilu_shape_inference_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/unique_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/unsqueeze_op_test.cc.o
[ 97%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/upsample_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/tensor/where_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/math/gemm_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/math/quantize_linear_matmul_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/nn/conv_nhwc_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/nn/pool_nhwc_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/nn/qlinearconv_nhwc_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/nn/qlinearconv_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/systolic/training/conv_grad_op_test.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/internal_testing/internal_testing_execution_provider.cc.o
[ 98%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/internal_testing/internal_testing_tests.cc.o
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_session_options.cc.o
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_run_options.cc.o
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_allocator.cc.o
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_nontensor_types.cc.o
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_model_loading.cc.o
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/providers/cpu/controlflow/loop_test.cc.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[100%] Building CXX object CMakeFiles/onnxruntime_test_all.dir/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/onnxruntime/test/shared_lib/test_ort_format_models.cc.o
gmake[1]: *** [CMakeFiles/onnxruntime_test_all.dir/all] Error 2
gmake: *** [all] Error 2
Traceback (most recent call last):
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 2162, in <module>
sys.exit(main())
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 2088, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 1087, in build_targets
run_subprocess(cmd_args, env=env)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/ci_build/build.py", line 591, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/ugra/srlin/chipyard/generators/gemmini/software/onnxruntime-riscv/tools/python/util/run.py", line 41, in run
completed_process = subprocess.run(
File "/ugra/srlin/chipyard/.conda-env/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/ugra/srlin/chipyard/.conda-env/bin/cmake', '--build', 'build/Release', '--config', 'Release', '--', '-j80']' returned non-zero exit status 2.
I am not sure if I can modify this.
After changing the CMakeLists.txt line.1019 :
+++ target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options -Wall>" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-Wall>")
--- target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options -Werror>" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-Werror>")
The Werror disappears, while I am not sure if it's okay.
same
So how did you solved this? I've encountered the problem just the same as yours.
@8u9mak3r May help if you are using risc-v toolchains: comment out all the -Werror in the CMake file.
@aladerran Wow, it worked for me! Thanks 4 your help!
Describe the bug ORT building error with gemmini v0.7.1.
Urgency Hope to get your answer asap, thanks!
System information
To Reproduce After building gemmini v0.7.1 and chipyard 1.9.0 and submoudule the lastest version of onnx-runtime-riscv, running ./build.sh --config=Release under onnx-runtime-riscv.
Expected behavior Build success.
Screenshots None.
Additional context See error below.
I have tried the same procedure in my ubuntu20.04 virtual machine with older version of gemmini which uses esp-tools and the result was fine. I am wondering if it could be a new issue caused by newer version of gemmini.
Thanks for your help!