VOICEVOX / voicevox_core

無料で使える中品質なテキスト読み上げソフトウェア、VOICEVOXのコア
https://voicevox.hiroshiba.jp/
MIT License
872 stars 116 forks source link

change: rework GPU features #810

Closed qryxip closed 3 months ago

qryxip commented 4 months ago

内容

https://github.com/VOICEVOX/voicevox_core/issues/804#issuecomment-2231451216の案2.を実装します。

Cargo featureとしてcudadirectmlを廃止し、次の2つに統合します。

さらにリリースにはONNX Runtimeを含めないようにして、代わりにダウンローダーにonnxruntime-builderからのダウンロード機能を持たせます。これによりVOICEVOX COREとしては「CUDA版ビルド」と「DirectML版ビルド」が無くなります。

また #783 も行います。acceleration_modeAutoGpuのときは「GPUをテスト」し、Autoのときにすべて失敗するならCPU版にフォールバックします。

[INFO]  acceleration_mode=<AccelerationMode.AUTO: 'AUTO'>
[INFO]  GPUをテストします:
[INFO]    * CUDA (device_id=0): OK
[INFO]    * DirectML (device_id=0): Not supported by the current loaded ONNX Runtime
[INFO]  CUDA (device_id=0)を利用します
[DEBUG] synthesizer.is_gpu_mode=True
[INFO]  acceleration_mode=<AccelerationMode.AUTO: 'AUTO'>
[INFO]  GPUをテストします:
[INFO]    * CUDA (device_id=0): /home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/session/provider_bridge_ort.cc:1209 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libvoicevox_onnxruntime_providers_cuda.so with error: libcudnn.so.8: cannot open shared object file: No such file or directory
[INFO]    * DirectML (device_id=0): Not supported by the current loaded ONNX Runtime
[INFO]  CPUを利用します
[DEBUG] synthesizer.is_gpu_mode=False
[INFO]  acceleration_mode=<AccelerationMode.GPU: 'GPU'>
[INFO]  GPUをテストします:
[INFO]    * CUDA (device_id=0): /home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/session/provider_bridge_ort.cc:1209 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libvoicevox_onnxruntime_providers_cuda.so with error: libcudnn.so.8: cannot open shared object file: No such file or directory
[INFO]    * DirectML (device_id=0): Not supported by the current loaded ONNX Runtime
Traceback (most recent call last):
  File "/home/ryo/src/github.com/VOICEVOX/voicevox_core/main/example/python/./run.py", line 117, in <module>
    main()
  File "/home/ryo/src/github.com/VOICEVOX/voicevox_core/main/example/python/./run.py", line 35, in main
    synthesizer = Synthesizer(
                  ^^^^^^^^^^^^
voicevox_core.GpuSupportError: GPU機能をサポートすることができません:
* CUDA (device_id=0): /home/runner/work/onnxruntime-builder/onnxruntime-builder/onnxruntime/core/session/provider_bridge_ort.cc:1209 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libvoicevox_onnxruntime_providers_cuda.so with error: libcudnn.so.8: cannot open shared object file: No such file or directory
* DirectML (device_id=0): Not supported by the current loaded ONNX Runtime

関連 Issue

ref #804

Closes #783.

その他

qryxip commented 3 months ago
Hiroshiba commented 3 months ago

次の流れ的にはonnxruntime 1.18.1のビルドを目指す感じですかね!

https://github.com/VOICEVOX/voicevox_core/pull/810#discussion_r1702249263

qryxip commented 3 months ago

@takejohn 共有です!