Skip to content

Commit

Permalink
onnxruntime-rsからortに乗り換える
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Jan 10, 2024
1 parent 4e13bca commit 87ff8b6
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 192 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
"target": "x86_64-pc-windows-msvc",
"artifact_name": "windows-x64-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
Expand All @@ -67,16 +66,14 @@ jobs:
"target": "x86_64-pc-windows-msvc",
"artifact_name": "windows-x64-directml",
"whl_local_version": "directml",
"use_cuda": false,
"can_skip_in_simple_test": false
},
{
"os": "windows-2019",
"features": "",
"features": "cuda",
"target": "x86_64-pc-windows-msvc",
"artifact_name": "windows-x64-cuda",
"whl_local_version": "cuda",
"use_cuda": true,
"can_skip_in_simple_test": true
},
{
Expand All @@ -85,7 +82,6 @@ jobs:
"target": "i686-pc-windows-msvc",
"artifact_name": "windows-x86-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
Expand All @@ -94,16 +90,14 @@ jobs:
"target": "x86_64-unknown-linux-gnu",
"artifact_name": "linux-x64-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "ubuntu-20.04",
"features": "",
"features": "cuda",
"target": "x86_64-unknown-linux-gnu",
"artifact_name": "linux-x64-gpu",
"whl_local_version": "cuda",
"use_cuda": true,
"can_skip_in_simple_test": false
},
{
Expand All @@ -112,23 +106,20 @@ jobs:
"target": "aarch64-unknown-linux-gnu",
"artifact_name": "linux-arm64-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "ubuntu-20.04",
"features": "",
"target": "aarch64-linux-android",
"artifact_name": "android-arm64-cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "ubuntu-20.04",
"features": "",
"target": "x86_64-linux-android",
"artifact_name": "android-x86_64-cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
Expand All @@ -137,7 +128,6 @@ jobs:
"target": "aarch64-apple-darwin",
"artifact_name": "osx-arm64-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": false
},
{
Expand All @@ -146,31 +136,27 @@ jobs:
"target": "x86_64-apple-darwin",
"artifact_name": "osx-x64-cpu",
"whl_local_version": "cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "macos-12",
"features": "",
"target": "aarch64-apple-ios",
"artifact_name": "ios-arm64-cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "macos-12",
"features": "",
"target": "aarch64-apple-ios-sim",
"artifact_name": "ios-arm64-cpu-sim",
"use_cuda": false,
"can_skip_in_simple_test": true
},
{
"os": "macos-12",
"features": "",
"target": "x86_64-apple-ios",
"artifact_name": "ios-x64-cpu",
"use_cuda": false,
"can_skip_in_simple_test": true
}
]'
Expand Down Expand Up @@ -268,7 +254,6 @@ jobs:
fi
env:
RUSTFLAGS: -C panic=abort
ORT_USE_CUDA: ${{ matrix.use_cuda }}
- name: build voicevox_core_python_api
if: matrix.whl_local_version
id: build-voicevox-core-python-api
Expand All @@ -286,8 +271,6 @@ jobs:
build > /dev/null 2>&1
fi
echo "whl=$(find ./target/wheels -type f)" >> "$GITHUB_OUTPUT"
env:
ORT_USE_CUDA: ${{ matrix.use_cuda }}
- name: build voicevox_core_java_api
if: contains(matrix.target, 'android')
run: |
Expand Down
66 changes: 40 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ voicevox_core = { path = "crates/voicevox_core" }
windows = "0.43.0"
zip = "0.6.3"

[workspace.dependencies.onnxruntime]
git = "https://github.com/VOICEVOX/onnxruntime-rs.git"
rev = "ebb9dcb9b26ee681889b52b6db3b4f642b04a250"
[workspace.dependencies.voicevox_ort]
git = "https://github.com/qryxip/ort.git"
rev = "b5e05bbff02421a8873e17e991e2d76d06848a9c"

[workspace.dependencies.open_jtalk]
git = "https://github.com/VOICEVOX/open_jtalk-rs.git"
Expand Down
5 changes: 3 additions & 2 deletions crates/voicevox_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ publish.workspace = true

[features]
default = []
directml = ["onnxruntime/directml"]
cuda = ["voicevox_ort/cuda"]
directml = ["voicevox_ort/directml"]

[dependencies]
anyhow.workspace = true
Expand All @@ -25,7 +26,6 @@ itertools.workspace = true
nanoid.workspace = true
ndarray.workspace = true
once_cell.workspace = true
onnxruntime.workspace = true
open_jtalk.workspace = true
ouroboros.workspace = true
rayon.workspace = true
Expand All @@ -38,6 +38,7 @@ tokio = { workspace = true, features = ["rt"] } # FIXME: feature-gateする
tracing.workspace = true
uuid = { workspace = true, features = ["v4", "serde"] }
voicevox_core_macros = { path = "../voicevox_core_macros" }
voicevox_ort = { workspace = true, features = ["ndarray", "download-binaries"] }
zip.workspace = true

[dev-dependencies]
Expand Down
Loading

0 comments on commit 87ff8b6

Please sign in to comment.