You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Rust binding to onnxruntime (#427) might enable using CoreML on Apple devices.
For the downloader, Microsoft provides prebuilt onnxruntime binary with CoreML EP in a CocoaPod onnxruntime-c (Podspec) (1.14.0 binary). (Alternative pods for mobile and obj-c are listed in Onnx Runtime CoreML EP documentation)
Pros 良くなる点
On macOS and iOS take full advantage of Apple Silicon GPU and Apple Neural Engine for inference acceleration.
The libonnxruntime.dylib for macOS distributed by Microsoft is built with the --use_coreml flag turned on (cf. microsoft/onnxruntime#11343 (comment) ), so it can be implemented with a small modification of the current voicevox_core. In the past, I actually tried to implement voicevox_core with CoreML support. However, I did not see a reduction in execution time, so I could not evaluate that a significant performance improvement was achieved.
However, it may still be worthwhile to continue working on the following points:
My Mac is an M1 MacBook Air, which may simply be hardware that does not benefit much from CoreML (details unknown).
The ONNX model I used in my previous experiments was the version released as OSS. The situation may be different for the version as a product. In addition, the ONNX model currently used in voicevox_core has recently been changed to a newer version. We may need to experiment to see if the new production ONNX models benefit from CoreML more than before.
ただし、以下の点でまだ取り組み続ける価値があるのかもしれません:
私の所有している Mac は M1 MacBook Air であり、単に CoreML による恩恵が少ないハードウェアだったのかもしれません(詳細は不明です)。
@Hiroshiba Is it acceptable to add CoreML support for macOS on an experimental basis, even if we don't see performance gains? It will make it easier to experiment to see if future onnxruntime updates, etc. will provide better performance gains from CoreML.
内容
New Rust binding to onnxruntime (#427) might enable using CoreML on Apple devices.
For the downloader, Microsoft provides prebuilt onnxruntime binary with CoreML EP in a CocoaPod
onnxruntime-c
(Podspec) (1.14.0 binary). (Alternative pods for mobile and obj-c are listed in Onnx Runtime CoreML EP documentation)Pros 良くなる点
On macOS and iOS take full advantage of Apple Silicon GPU and Apple Neural Engine for inference acceleration.
macOSやiOSでApple Silicon GPUとApple Neural Engineをフル利用して加速できること。
Cons 悪くなる点
CoreML EP may not be compatible with all onnx models.
CoreML EPが実行できないONNXモデルがあるかもしれません。
実現方法
VOICEVOXのバージョン
0.?.0
OSの種類/ディストリ/バージョン
その他
Related 相関: #427 #399
Useful Links 使えそうなリンク:
onnxruntime-c
Podspeconnxruntime-c
1.14.0 binaryThe text was updated successfully, but these errors were encountered: