Skip to content

feat: GPU device_id指定機能の追加 #108

Closed

Description

@ayutaz

概要

オリジナルPiperリポジトリのPR #429 で提案されている GPU device_id 指定機能を piper-plus に実装する。

背景

マルチGPU環境では、特定のGPUを指定して推論を実行したい場合がある。現在は自動選択のみで、明示的な制御ができない。

実装内容

  • コマンドラインオプション --gpu-device-id の追加
  • ONNX RuntimeのGPUデバイス指定対応
  • 環境変数 PIPER_GPU_DEVICE_ID でのデフォルト設定

使用例

# GPU 0を使用
./piper --model model.onnx --gpu-device-id 0 --output_file output.wav

# GPU 1を使用
./piper --model model.onnx --gpu-device-id 1 --output_file output.wav

# 環境変数で設定
export PIPER_GPU_DEVICE_ID=2
./piper --model model.onnx --output_file output.wav

期待される効果

  • マルチGPU環境での効率的なリソース利用
  • 特定GPUの専有を避けた並列処理
  • バッチ処理時の負荷分散

タスク

  • オリジナルPR #429の実装内容を分析
  • ONNX RuntimeのGPUデバイス設定APIの調査
  • コマンドラインオプションの追加
  • 環境変数サポートの実装
  • エラーハンドリング(無効なdevice_id等)
  • テストとドキュメントの作成

優先度

中 - マルチGPU環境を持つユーザーには重要

参考

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions