Skip to content

ONNX Runtime v1.18をビルドする #46

@qryxip

Description

@qryxip

内容

ONNX Runtime v1.18をビルドします。

Pros 良くなる点

Cons 悪くなる点

実現方法

現状では以下の2つのビルドだけ通らない状態です。

  • onnxruntime-win-x64-gpu (WindowsでCUDAとDirectMLの両方を有効にしたビルド。--use_cudaのみのものと--use_dmlのみのものは普通にビルドできる)

    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2255,21): error C2065: 'ort_dml_api': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2256,19): error C2065: 'dml_objects': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2288,21): error C2065: 'ort_dml_api': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2290,23): error C2065: 'dml_objects': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2301,23): error C2065: 'dml_objects': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2312,19): error C2065: 'dml_objects': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
    D:\a\onnxruntime-builder\onnxruntime-builder\onnxruntime\test\shared_lib\test_inference.cc(2322,23): error C2065: 'dml_objects': undeclared identifier [D:\a\onnxruntime-builder\onnxruntime-builder\build\Release\onnxruntime_shared_lib_test.vcxproj]
  • onnxruntime-osx-arm64 (macOSのAArch64のビルド)

    Undefined symbols for architecture arm64:
      "_cpuinfo_arm_mach_init", referenced from:
          _cpuinfo_initialize in libcpuinfo.a[4](init.c.o)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

調査した結果、Windowsでは microsoft/onnxruntime#20257 、macOSでは microsoft/onnxruntime#19655 により上記のエラーとなっているらしいことがわかりました。ただしmicrosoft/onnxruntimeでのAzure Pipelinesでは特別なワークアラウンドも無く普通にビルドされているようです。この二つを解明して対処できれば、v1.18がビルドできるようになります。

      - name: Checkout
        uses: actions/checkout@v4
        with:
          repository: microsoft/onnxruntime
          submodules: true
          #ref: v${{ env.ONNXRUNTIME_VERSION }}
          #ref: b8c90beef2b1c9d9297365a9a8f49bb779c84147 # 2024-04-19+09:00 : windows: error, macos: error
          #ref: 80f274ca6f2f4572d827edd6dc7f736d7a8c036a # 2024-01-17+09:00 : windows: ?    , macos: ok
          #ref: 19ff4a6d6c420d4d43c92d57ff45313f00b49336 # 2024-03-21+09:00 : windows: ?    , macos: error
          #ref: 1508c2ee39023274417417b290303cf058ceedd6 # 2024-02-15+09:00 : windows: ?    , macos: ok
          #ref: 2a857d9a86ca3049829256df3347521069ccd6b4 # 2024-03-01+09:00 : windows: ?    , macos: ok
          #ref: efad5bbc5aed1717200d3e8f6ddd253394af4b99 # 2024-03-10+09:00 : windows: ok   , macos: error
          #ref: e93a860819545ea64acfe36e19e2b954389d48bf # 2024-03-06+09:00 : windows: ?    , macos: error
          #ref: a0521f899e9d495d57ae044bd4a1fe4d17155782 # 2024-03-02+09:00 : windows: ?    , macos: error
          #ref: f06164ef8b8de42dd67ca2137f6996cdc87a3f72 # 2024-03-02+09:00 : windows: ok   , macos: ok
          #ref: e1e292f94c4f125bfd95703961f32718a032f921 # 2024-04-01+09:00 : windows: ok   , macos: error
          #ref: e4c0cb2b9a0dde05c066556aa73bf6ffdfa8013d # 2024-04-19+09:00 : windows: error, macos: ?
          #ref: 50bd4571ace1b9b78a832015e75677f1b31ede8b # 2024-04-12+09:00 : windows: ok   , macos: ?
          #ref: 01acc25d9dd695255ae5c44ec377576408e1081c # 2024-04-13+09:00 : windows: ok   , macos: ?
          #ref: 6bd6d879a351e2ed4df84357f826d3df60539f34 # 2024-04-19+09:00 : windows: ok   , macos: ?
          #ref: f664f912980ac7adce2cf3ecaade6a70cfb97401 # 2024-04-19+09:00 : windows: error, macos: ?
          #ref: 76434907fb7d9dc6ae5debc225959b666eb409f7 # 2024-04-19+09:00 : windows: error, macos: ?
          ref: c47f446f25cf4dc97931f9e3326cf0d3545ed02b  # 2024-04-18+09:00 : windows: ok   , macos: ?

Windowsについてはこれから調査し、調査の進捗をここに書いていこうと思います。

macOSについては-Donnxruntime_ENABLE_CPUINFO=OFFを入れればビルドできることがわかっています。ただcpuinfoが元から必要だったのかそうではなかったのかがわからないので、こちらもこれから調査しようと思います。
(ちなみに該当のPRのdiffを見ると明らかにARMのプラットフォーム全体に影響しているのにも関わらずPRのdescriptionでは言及されておらず、ONNX Runtime 1.18.0のリリースノートにもWindowsのことしか書かれていません)

VOICEVOXのバージョン

  • Windows
  • macOS
  • Linux

その他

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions