Skip to content

Conversation

@zakki
Copy link
Contributor

@zakki zakki commented Apr 2, 2025

Macでuse-gpuを指定した時にmpsバックエンドを使うようにします。

M3 Ultra環境だとデフォルトネットワークで16ワーカー32visitsで22kgames/hourくらい自己対局出来ています。

zakki added 2 commits April 2, 2025 19:57
pytorch 2.6まではApple Silicon(mps)版の実装に問題があるのでワークアラウンドが必要
@zakki
Copy link
Contributor Author

zakki commented Apr 8, 2025

学習側は2.6.0では未対応の処理があってワークアラウンドが必要でした。

pytorch/pytorch#142397

@kobanium
Copy link
Owner

kobanium commented May 8, 2025

requirements.txtのtorchのバージョンを合わせておいていただけますか。

@zakki
Copy link
Contributor Author

zakki commented May 9, 2025

PyTorchのmainブランチでは修正されていますが、その後リリースされた 2.7.0 や 2.7.1-rc1 は別ブランチでの開発らしく反映されていません。
マージはPyTorch 2.8以降がリリースされてからのほうが良いかもしれません。

ちなみに修正はこれです。
https://discuss.pytorch.org/t/gradscaler-typeerror-cannot-convert-a-mps-tensor-to-float64-dtype-as-the-mps-framework-doesnt-support-float64-please-use-float32-instead/213206

@kobanium
Copy link
Owner

kobanium commented May 9, 2025

ありがとうございます。問題点を理解できました。
PyTorchの修正が済んでからマージします。

@kobanium kobanium added the pending Pending label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending Pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants