microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.33k stars 2.87k forks source link

[Build] "error: parameter ‘thread_pool’ set but not used" #20144

Open idruker-cerence opened 6 months ago

idruker-cerence commented 6 months ago

Describe the issue

The error (see the error / output section) is produced when compiling onnxruntime 1.17.1 with the compilation option --include_ops_by_config model.config. The error does not occur when compiling onnxruntime 1.13.1 or without --include_ops_by_config option.

Urgency

No response

Target platform

Linux

Build script

!/bin/bash

cd dirname $0 proj_root=pwd/.. variant=$1 build_output_dir=$proj_root/build_output/$variant install_lib_folder=${variant//"-"/"/"} # replace all "-" with "/" install_lib_dir=$build_output_dir/install/lib/$install_lib_folder third_party_dir=$proj_root/third_party

args=" --build_dir $build_output_dir --skip_submodule_sync --config Release --parallel --skip_tests --build_shared_lib --target install --enable_lto --include_ops_by_config $proj_root/scripts/model.config --enable_reduced_operator_type_support --disable_ml_ops --disable_rtti --minimal_build --disable_exceptions"

cmake_extra_defines=" --cmake_extra_defines CMAKE_INSTALL_LIBDIR=$install_lib_dir CMAKE_INSTALL_BINDIR=$install_lib_dir CMAKE_INSTALL_INCLUDEDIR=$build_output_dir/install/inc onnxruntime_DEV_MODE=OFF onnxruntime_BUILD_UNIT_TESTS=OFF onnxruntime_USE_AVX2=ON"

args+=$cmake_extra_defines python $third_party_dir/onnxruntime/tools/ci_build/build.py $args rc=$? echo tools/ci_build/build.py returned $rc

exit $rc

Error / output

In file included from
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/providers/cpu/tensor/concat.cc:8:
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/framework/copy.h: In instantiation of ‘bool onnxruntime::StridedCopyIfEnabled(onnxruntime::concurrency::ThreadPool*, onnxruntime::Tensor&, std::ptrdiff_t, const TensorShapeVector&, const onnxruntime::TensorShape&, const onnxruntime::Tensor&, std::ptrdiff_t, const TensorShapeVector&) [with EnabledTypes = onnxruntime::TypeList<int, long int, float>; T = short unsigned int; std::ptrdiff_t = long int; onnxruntime::TensorShapeVector = absl::lts_20240116::InlinedVector<long int, 6, std::allocator<long int> >]’:
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/framework/copy.h:290:69:   required from ‘onnxruntime::common::Status onnxruntime::DispatchStridedCopy(onnxruntime::concurrency::ThreadPool*, onnxruntime::Tensor&, std::ptrdiff_t, const TensorShapeVector&, const onnxruntime::TensorShape&, const onnxruntime::Tensor&, std::ptrdiff_t, const TensorShapeVector&) [with EnabledDataTypes = onnxruntime::TypeList<int, long int, float>; std::ptrdiff_t = long int; onnxruntime::TensorShapeVector = absl::lts_20240116::InlinedVector<long int, 6, std::allocator<long int> >]’
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/providers/cpu/tensor/concat.cc:274:87:   required from here
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/framework/copy.h:235:59: error: parameter ‘thread_pool’ set but not used [-Werror=unused-but-set-parameter]
  235 | inline bool StridedCopyIfEnabled(concurrency::ThreadPool* thread_pool,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/framework/copy.h:237:49: error: parameter ‘dst_offset’ set but not used [-Werror=unused-but-set-parameter]
  237 |                                  std::ptrdiff_t dst_offset,
      |                                  ~~~~~~~~~~~~~~~^~~~~~~~~~
/mnt/c/home/Workspaces/onnxruntime/third_party/onnxruntime/onnxruntime/core/framework/copy.h:241:49: error: parameter ‘src_offset’ set but not used [-Werror=unused-but-set-parameter]
  241 |                                  std::ptrdiff_t src_offset,

Visual Studio Version

No response

GCC / Compiler Version

No response

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.