3 ms·
I just want to be able to install a program or library, like Tensorflow, and have it work on my GPU whether it's from Nvidia or AMD without having to first find
by sorenjan 7y ago
I just want to be able to install a program or library, like Tensorflow, and have it work on my GPU whether it's from Nvidia or AMD without having to first find and install the right compiler.
How do I run a Python program that imports Tensorflow on my AMD GPU today?
- fluffything 7y agoThat's something you need to ask to your package manager. Making sure that all dependencies of a package (e.g. drivers, compilers, etc.) are installed is the package manager's job. If you are installing TF from source, then it becomes your job. TF docs should help you here, and TF's build-system should be able to guide you through what you need to install.
- adev_ 7y ago> That's something you need to ask to your package manager. Making sure that all dependencies of a package (e.g. drivers, compilers, etc.) are installed is the package manager's job. No that's bullshit and it shows you never have done it. Tensorflow is CUDA only and does not run over AMD GPU. Because CUDA is proprietary and has a monopoly on GPGPU for now. It is such a big deal that AMD had to fork tensorflow and try to make their own version it in order to make it "partially" run over HIP. This naturally makes it behind upstream, buggy and partially updated [^1] CUDA is not portable and will never be. The sad truth is that, due to CUDA, a big majority of GPGPU programs are now vendor lock-in on Nvidia hardware. That is unacceptable, but it is like that. [^1]: https://github.com/ROCmSoftwarePlatform/tensorflow-upstream https://github.com/ROCmSoftwarePlatform/tensorflow-upstream
- fluffything 7y ago> It is such a big deal that AMD had to fork tensorflow and try to make their own version it in order to make it "partially" run over HIP. That's because HIP requires changes to the program source code, but AMD has managed to upstream those patches to other projects. If they haven't done that for Tensorflow, that's kind of their problem. Clang can compile CUDA code, and it has an AMDGpu backend. AMD could compile that CUDA code to SPIRV if they wanted. Intel and PGI do compile CUDA to x86-64 using LLVM without problems.
- dekken_ 7y ago> How do I run a Python program that imports Tensorflow on my AMD GPU today? https://rocm-documentation.readthedocs.io/en/latest/Deep_learning/Deep-learning.html https://rocm-documentation.readthedocs.io/en/latest/Deep_lea...
- TomVDB 7y agoROCm is only officially supported on AMD Instinct GPUs. For others, it’s a best effort thing only: “ AMD ROCm is validated for GPU compute hardware such as AMD Radeon Instinct GPUs. Other AMD cards may work, however, they are not officially supported at this time. We appreciate your feedback and we will consider it for future versions of ROCm.” https://github.com/RadeonOpenCompute/ROCm/issues/887#issuecomment-605711172 https://github.com/RadeonOpenCompute/ROCm/issues/887#issueco...
- dekken_ 7y ago> ROCm officially supports AMD GPUs that use following chips: > "Vega 10" chips, such as on the AMD Radeon RX Vega 64 and Radeon Instinct MI25 https://github.com/RadeonOpenCompute/ROCm https://github.com/RadeonOpenCompute/ROCm
- TomVDB 7y agoRight. Because they happen to use the same chip. But if you’re using the current consumer product line, it’s hit or miss.