Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onnxruntime: simplify patching #20619

Closed
wants to merge 14 commits into from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Oct 17, 2023

Replaces the /~https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/external/onnxruntime_external_deps.cmake
file with a custom version, which applies find_package() against Conan targets instead of using FetchContent.

Includes changes from #20392.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@valgur valgur force-pushed the onnxruntime/improve-patching branch from 5ece8d3 to 3f8caae Compare November 1, 2023 12:27
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@valgur valgur force-pushed the onnxruntime/improve-patching branch from f38e56a to 696eec6 Compare November 3, 2023 07:10
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Nov 11, 2023
3 tasks
Copy link

stale bot commented Dec 15, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@valgur valgur force-pushed the onnxruntime/improve-patching branch from 16a6cfd to 6981778 Compare December 15, 2023 09:06
@ghost ghost mentioned this pull request Dec 24, 2023
3 tasks
@conan-center-bot

This comment has been minimized.

@valgur valgur force-pushed the onnxruntime/improve-patching branch from 3e35b2c to ed6c18a Compare December 31, 2023 17:59
@conan-center-bot conan-center-bot added the Missing dependencies Build failed due missing dependencies in Conan Center label Dec 31, 2023
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot conan-center-bot removed Failed Missing dependencies Build failed due missing dependencies in Conan Center labels Jan 7, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 20 (b309245d4fd65a4721ea559634f331e1ab7506a4):

  • onnxruntime/1.16.3:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.16.2:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.15.1:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.14.1:
    CI failed to create some packages (All logs)

    Logs for packageID d58324f5a31a5d6bfb0a676c86a124f274d79390:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=7
    os=Linux
    [options]
    onnxruntime:shared=False
    
    [...]
      Environment variable BOOST_ROOT is set to:
    
        /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/boost/1.84.0/_/_/package/0accba4996157432598d4f32cbb16eeb9e43bbb2
    
      For compatibility, find_package is ignoring the variable, but code in a
      .cmake module might still use it.
    Call Stack (most recent call first):
      CMakeLists.txt:492 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    NVCC_ERROR = 
    NVCC_OUT = no such file or directory
    CMake Warning at onnxruntime_mlas.cmake:57 (message):
      AMX instructions NOT supported due to lack of compiler tool chain!
    Call Stack (most recent call first):
      CMakeLists.txt:1576 (include)
    
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc: In function ‘std::unique_ptr<onnx::OpSchema> onnxruntime::function_utils::CreateSchema(const onnxruntime::Graph&, const onnxruntime::IndexedSubGraph&, bool)’:
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc:50:77: error: ‘all_tensor_types_with_bfloat’ is not a member of ‘onnx::OpSchema’
         op_schema->TypeConstraint("TAggregatedTypes", ONNX_NAMESPACE::OpSchema::all_tensor_types_with_bfloat(),
                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc: In function ‘void onnxruntime::function_utils::IOTypeConstraintHelper(const onnx::FunctionProto&, std::unique_ptr<onnx::OpSchema>&, const onnxruntime::InlinedHashMap<std::__cxx11::basic_string<char>, int>&, const onnxruntime::InlinedHashMap<std::__cxx11::basic_string<char>, int>&)’:
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc:102:47: error: ‘all_tensor_types_with_bfloat’ is not a member of ‘onnx::OpSchema’
       all_types.reserve(ONNX_NAMESPACE::OpSchema::all_tensor_types_with_bfloat().size() +
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc:104:46: error: ‘all_tensor_types_with_bfloat’ is not a member of ‘onnx::OpSchema’
       all_types.insert(ONNX_NAMESPACE::OpSchema::all_tensor_types_with_bfloat().cbegin(),
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc:105:46: error: ‘all_tensor_types_with_bfloat’ is not a member of ‘onnx::OpSchema’
                        ONNX_NAMESPACE::OpSchema::all_tensor_types_with_bfloat().cend());
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    make[2]: *** [CMakeFiles/onnxruntime_graph.dir/home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/src/onnxruntime/core/graph/function_utils.cc.o] Error 1
    make[1]: *** [CMakeFiles/onnxruntime_graph.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [all] Error 2
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by libcurl/8.6.0 to zlib/1.3.1 
    onnxruntime/1.14.1: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    onnxruntime/1.14.1: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    onnxruntime/1.14.1: ERROR: Package 'd58324f5a31a5d6bfb0a676c86a124f274d79390' build failed
    onnxruntime/1.14.1: WARN: Build folder /home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/build/Release
    ERROR: onnxruntime/1.14.1: Error in build() method, line 242
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/w/prod-v1/bsr/119066/cecff/.conan/data/onnxruntime/1.14.1/_/_/build/d58324f5a31a5d6bfb0a676c86a124f274d79390/build/Release" '--' '-j3'
    
  • onnxruntime/1.16.1:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 20 (b309245d4fd65a4721ea559634f331e1ab7506a4):

  • onnxruntime/1.16.3:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.15.1:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.14.1:
    CI failed to create some packages (All logs)

    Logs for packageID ab564c01e9b5bf1e4d9e778af323ee8baece6304:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    [ 29%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/kernel_registry_manager.cc.o
    [ 29%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/kernel_type_str_resolver.cc.o
    [ 29%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/kernel_type_str_resolver_utils.cc.o
    [ 29%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/library_handles.cc.o
    [ 30%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/memcpy.cc.o
    [ 30%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/memory_info.cc.o
    [ 30%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/mldata_type_utils.cc.o
    [ 30%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/murmurhash3.cc.o
    [ 30%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/node_index_info.cc.o
    [ 31%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/onnxruntime_map_type_info.cc.o
    [ 31%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/onnxruntime_sequence_type_info.cc.o
    [ 31%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/onnxruntime_typeinfo.cc.o
    [ 31%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/op_kernel.cc.o
    [ 32%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/op_kernel_info.cc.o
    [ 32%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/op_node_proto_helper.cc.o
    [ 32%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/ort_value_pattern_planner.cc.o
    [ 32%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/ort_value_tensor_slicer.cc.o
    [ 32%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/partial_graph_execution_state.cc.o
    [ 33%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/prepacked_weights.cc.o
    [ 33%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/prepacked_weights_container.cc.o
    [ 33%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/random_generator.cc.o
    [ 33%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/random_seed.cc.o
    [ 33%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/run_options.cc.o
    [ 34%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/sequential_executor.cc.o
    [ 34%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/session_options.cc.o
    [ 34%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/session_state.cc.o
    [ 34%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/session_state_utils.cc.o
    [ 34%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/simple_tensor_allocator.cc.o
    [ 35%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/sparse_tensor.cc.o
    [ 35%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/sparse_utils.cc.o
    [ 35%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/stream_execution_context.cc.o
    [ 35%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensor.cc.o
    [ 35%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensor_allocator.cc.o
    [ 36%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensor_external_data_info.cc.o
    [ 36%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensor_shape.cc.o
    [ 36%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensor_type_and_shape.cc.o
    [ 36%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/tensorprotoutils.cc.o
    [ 37%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/transpose_helper.cc.o
    [ 37%] Building CXX object CMakeFiles/onnxruntime_framework.dir/home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/src/onnxruntime/core/framework/utils.cc.o
    [ 37%] Linking CXX static library libonnxruntime_framework.a
    [ 37%] Built target onnxruntime_framework
    Makefile:145: recipe for target 'all' failed
    make: *** [all] Error 2
    
    onnxruntime/1.14.1: ERROR: 
    Package 'ab564c01e9b5bf1e4d9e778af323ee8baece6304' build failed
    onnxruntime/1.14.1: WARN: Build folder /home/conan/w/prod-v2/bsr/104153/ebbff/p/b/onnxr28788badb976c/b/build/Release
    ERROR: onnxruntime/1.14.1: Error in build() method, line 242
    	cmake.build()
    	ConanException: Error 2 while executing
    
  • onnxruntime/1.16.2:
    Didn't run or was cancelled before finishing

  • onnxruntime/1.16.1:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants