-
Notifications
You must be signed in to change notification settings - Fork 217
build!: コアを0.16にする #1587
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
base: master
Are you sure you want to change the base?
build!: コアを0.16にする #1587
Conversation
@@ -138,6 +139,15 @@ jobs: | |||
DOWNLOAD_RESOURCE_PATH: download/resource | |||
run: bash tools/process_voicevox_resource.bash | |||
|
|||
# NOTE: you must agree to the ToU | |||
# FIXME: なんか数分かかるみたいなので、GitHub Releasesから持って来た方がよいかも |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そういやGitHub Releasesには無いんだった。自分でダウンローダーの実装とかしてたのに忘れてた。
となるとGitHubからのファイル単位ダウンロード(ダウンローダーはこれ)だけど、実際に速くなるのかは未調査。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cbc883c
(#1587)
とりあえずFIXMEの文面を変更。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ジャストアイディアですが)
最初1回目は数分かかるのは仕方ないとして、キャッシュするのもありかもですね!
もしかしたらもうキャッシュされてたり・・・?
もしキャッシュされてるならFIXME外しちゃっても良いかも?
@@ -138,6 +139,15 @@ jobs: | |||
DOWNLOAD_RESOURCE_PATH: download/resource | |||
run: bash tools/process_voicevox_resource.bash | |||
|
|||
# NOTE: you must agree to the ToU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: 上手い文面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
71ecf15
(#1587): 色々書くのは #709 のときにやることにして、このPRでは何も書かないことにしようかなと。
VOICEVOX_CORE_VERSION: "0.15.7" | ||
ONNXRUNTIME_VERSION: "1.13.1" | ||
VOICEVOX_CORE_VERSION: "0.16.0" | ||
VOICEVOX_VVM_VERSION: "0.1.0" | ||
ONNXRUNTIME_VERSION: "1.17.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diffの量を抑えるためにONNXRUNTIME_VERSION
のままにしたけど、このPR内でVOICEVOX_ONNXRUNTIME_VERSION
にした方がよいかも?
とりあえず後回しにしていたCUDA & cuDNN関係を片付けたのでdraft外しました。 |
tools/licenses/cuda/EULA.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
何故かわかりませんが100755
(GIT_FILEMODE_BLOB_EXECUTABLE
相当)だったので100644
にしておきました。
あとcudnn/LICENSEの方ですが、どうやら本来CRLFっぽいですがこのリポジトリではLFになっているっぽいです。多分autocrlf
かなと。改行コード以外で差分は出ないっぽいのでこのPRでは見送ろうかなと思っています。
❯ unzip -p cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip cudnn-windows-x86_64-8.9.7.29_cuda12-archive/LICENSE | file -
/dev/stdin: Unicode text, UTF-8 text, with very long lines (1028), with CRLF line terminators
warning: in the working copy of 'tools/licenses/cudnn/LICENSE', CRLF will be replaced by LF the next time Git touches it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
755
なるほどです!! windowsのファイルだったからとかありそう。
あとcudnn/LICENSEの方ですが、どうやら本来CRLFっぽいですがこのリポジトリではLFになっているっぽいです。
これはまあどっちでも良い気がしました!
そもそもこのライセンスの文面を入れる必要はないんですよね、多分・・・。
確か参考にしたソフトウェア(何だったか忘れましたが。。)の中に入ってたから、とりあえず入れておこうと思って入れた記憶があります。
別にこの文面を入れないといけない、という規約にはなってなかった・・・・・はず・・・?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
755
あ、念の為の補足ですが、このリポジトリで755になっていたので更新のついでにそのまま644にした次第です。
CRLF
Linux版だと普通にLFのようです。なので_License
に対すうるメモをWindows版じゃなくてLinux版のにしておけばおかしくはなくなるはず?
❯ tar xvf ./cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz cudnn-linux-x86_64-8.9.7.29_cuda12-archive/LICENSE
❯ file ./cudnn-linux-x86_64-8.9.7.29_cuda12-archive/LICENSE
./cudnn-linux-x86_64-8.9.7.29_cuda12-archive/LICENSE: Unicode text, UTF-8 text, with very long lines (1028)
そもそもこのライセンスの文面を入れる必要はないんですよね、多分・・・。
今現時点でここに存在する以上はこのPRでは対応しようかなーと考えています。
license_text
不要論ということでissue建てた方がいいですかね?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ、なるほどです!!
このPRでは含めていただければと思っています・・・!!
issueはもしよかったら立てていただけると助かります!!!!!!感謝・・・!!!
ありがとうございます!!!!!!! 方針3つあるんですけど、どうしましょうか。 1つ目が @qryxip さんのところでビルドしていただく感じです。 2つ目が一旦VOICEVOX側でproject-core-0.16みたいなのを作って、そちらにマージしてからビルドする流れです。 3つ目がえいやでmainブランチにマージする流れです。 まあでもVOICEVOX ENGINE側で課題を握れた方がいいので、2番目が一番まるそうな気がしてきました! |
今開始してみました。 前は駄目だったのですが、 |
|
とりあえず
に話を戻すと、私のリポジトリで [追記]
|
Suggested-by: sabonerune <[email protected]> Refs: VOICEVOX#1659 (comment)
#1587 (comment) Dockerについては一つやらかしがあったみたいで、 VOICEVOX/voicevox_core#954 もあるから RuntimeError: コアが見つかりません [追記] RuntimeError: コアの読み込みに失敗しました:/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/voicevox_core/lib/libvoicevox_core.so) |
|
base_runtime_image: mirror.gcr.io/nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 | ||
base_runtime_image: mirror.gcr.io/nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんかこれは駄目っぽくて動かない!
(OrtCUDAProviderOptionsV2
までは通るけど、OrtSession
を開始するときにコケているらしいです)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CORE Python APIを動かしてみてエラー内容を覗いたらこんなのが出てきました。version is insufficientかぁ…。
(我々のORT/VVORTはCUDA 12.4とcuDNN 8でビルドしている)
Exception: Failed to create ONNX Runtime session: /home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/providers/cuda/cuda_call.cc:121 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, ERRTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; std::conditional_t<THRW, void, onnxruntime::common::Status> = void] /home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/providers/cuda/cuda_call.cc:114 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, ERRTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; std::conditional_t<THRW, void, onnxruntime::common::Status> = void] CUDA failure 35: CUDA driver version is insufficient for CUDA runtime version ; GPU=0 ; hostname=e1354849c946 ; file=/home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=245 ; expr=cudaSetDevice(info_.device_id);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
整理すると
- 我々の(VOICEVOX) ONNX Runtimeはv1.17であり、CUDA 11 & cuDNN 8、もしくはCUDA 12 & cuDNN 8での利用でなければならない。
- 我々の(VOICEVOX) ONNX Runtimeは現在CUDA 12.4 & cuDNN 8でビルドしている
- nvidia/cudaに
12.4.0-cudnn8-runtime-ubuntu22.04
みたいなのがあればよいが、無い。12.1.0-cudnn8-runtime-ubuntu22.04
ならある。
という感じであり、CUDA 12.4でビルドした(VOICEVOX) ONNX RuntimeをCUDA 12.1のランタイムで動かそうとして失敗している、というのが現状かと思います。
このうち2.だけは手軽にどうにかできる範囲ではありそう。nvidia/cudaのイメージを使うのをやめて自前でダウンロードというのもありかも。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
うおお。。。cudnn9が入っている気がしますが、↓で動いたりしないですかね。。。
nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
ちょっとこれは今後のためにもVOICEVOX ENGINEのdocker環境を別で用意するのではなく、ビルドしたパッケージ版エンジンをdocker内に突っ込む形にするのが良い気がしました。
ちょっと時間かかりそうですが一旦issue側にコメントしてみます。
あるいはリビルトですかね。。。。
そうなるとadditional libraryの方もリビルドする必要がある・・・?
まあまあいろんなとこに影響ある気はしそう。影響範囲が見定められないけどできなくはなさそう。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(review comment ではなく質問です🙇)
こちらの問題、この辺 #709 (comment) で挙がっていた懸念点とは関係ありそうでしょうか?
CUDA 上げると過去の core が動かなくなったりする...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tarepan
一言で言うと、たぶんそうな気がします!!!!!!!
まず、ただCUDAのバージョンをあげるだけであれば問題なさそうな気がします!
当時の僕の↓のコメントがそのまま使えそう。
なので一番最新のコアに合わせる形でonnxruntimeを用意し、それに合うCUDAとかを用意すれば良い・・・?
でもCUDAとは別の話で過去のcoreが動かなくなる気がすることに気づきました。
追記:CUDAバージョン変更と↓の名称変更の合わせ技で、過去のCUDA版コアが動かなくなることに気づきました!!
VOICEVOXコア0.16はonnxruntime.dll
ではなくvoicevox_onnxruntime.dll
を参照します。
voicevox_onnxruntime.dll
はVOICEOVX専用にビルドしたonnxruntimeです。一応過去のコアも動くはずではありますが、過去のコアはvoicevox_onnxruntime.dll
ではなくonnxruntime.dll
を参照します。
つまりコア0.16には最新版CUDAが使えるvoicevox_onnxruntime.dll
があるけど、過去のコアはこのdllを見ないので結果的に動かないはず。。。。。。
手はいくつか考えられそうですが、ちょっとややこしくなるのでissueに転載の方に議論の場を移せればと思います!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど、あり得そう!!!
直感だとgpusつけようがつけまいがversionが合わないエラーにはならない気もする…?
もしかしたらコンテナ内ではなくホスト側のcudaが見えてエラーがなくなった…みたいな可能性もあり得なくはないかも………?
まあどちらにせよdockerコンテナの方針を変えるのが目処立ってるのでそちらがより良さそう感!
|
内容
一旦 #709 は抜きで、コア0.16の導入を行う。
関連 Issue
Fixes: #1659
Refs: #1571
スクリーンショット・動画など
その他