BallonsTranslator icon indicating copy to clipboard operation
BallonsTranslator copied to clipboard

Amd gpu support

Open imKota opened this issue 2 years ago • 8 comments

Hello!

Can you add support amd gpu?

imKota avatar Jul 10 '22 16:07 imKota

It seems to me that pytorch does not support ROCm (AMD GPU support) on windows

Snowad14 avatar Jul 10 '22 16:07 Snowad14

Hello As stated by @Snowad14 it would not work on windows. And I don't have AMD GPU, however, if you use Linux and your AMD GPU is supported (check https://pytorch.org/blog/pytorch-for-amd-rocm-platform-now-available-as-python-package), I'll create an 'amd' branch so you can help to verify if it works. It seems we don't need to modify the source code to use amd GPU according to https://pytorch.org/docs/stable/notes/hip.html, you may verify if the current master branch works.

I'm also considering switching to other more deploy-friendly frameworks but that would require extra effort to work with new fancy models so that won't happen before next iter.

dmMaze avatar Jul 11 '22 01:07 dmMaze

@dmMaze hmmm https://stackoverflow.com/a/63009844 https://github.com/microsoft/DirectML/issues/52#issuecomment-948948611

imKota avatar Jul 11 '22 04:07 imKota

@dmMaze hmmm https://stackoverflow.com/a/63009844 microsoft/DirectML#52 (comment)

So it's pytorch-directml, you may verify if the current master branch works with win+amd+pytorch-directml.

dmMaze avatar Jul 11 '22 09:07 dmMaze

image

imKota avatar Jul 11 '22 13:07 imKota

Great, pytorch-directml doesn't share the same semantics with pytorch-cuda, I will try to make it compatible this week.

dmMaze avatar Jul 11 '22 14:07 dmMaze

Try the ```pytorch_dml_support``` branch and set backend to 'hip'. image

Delete BallonsTranslator\ballontranslator\data\config\config.json before you run the source code. Some operators are not supported by pytorch_dml yet.
I would suggest you to use wslg+pytroch-ROCm

dmMaze avatar Jul 20 '22 05:07 dmMaze

@dmMaze hello! About amd gpu, tensorflow working on mac os Can you add support?

image image

image

https://developer.apple.com/metal/tensorflow-plugin/

imKota avatar Apr 05 '23 22:04 imKota