AMD GPUs not supported?
Closed this issue · 4 comments
Issue Description
Please describe our issue, along with:
- expected behavior //GPU Backend
- encountered behavior //CPU Backend
Version Information
Please indicate relevant versions, including, if relevant:
- Deeplearning4j version //1.0.0-M2.1
- Platform information (OS, etc) //macos 14.1 and AMD RX560
- CUDA version, if used //No
- NVIDIA driver version, if in use //No
AMD GPUs not supported?
No, AMD GPUs are not supported.
If you want to contribute support for them, we will help you get started.
Thanks for the answer.
I would like to contribute support, but I don't know how
The backends for DL4J (or rather ND4J) are implemented in libnd4j: https://github.com/deeplearning4j/deeplearning4j/tree/master/libnd4j
If you take a look, for example, at the array functions, you'll see that there are different implementations for cpu and cuda (nvidia gpu's): https://github.com/deeplearning4j/deeplearning4j/tree/master/libnd4j/include/array
Adding support for AMD GPUs would entail implementing a libnd4j version that supports those GPUs.
@imyoric the best bet would be to look in to the cuda kernels and translating them via HIP or a cuda translator. Otherwise "AMD support" will end up being a task I don't think anyone could take on. Someone well intentioned who played with that compiler might be able to pull something off since we have unit tests and everything else in place. The other aspect of this would be to adapt the java front end logic but just getting the AMD kernels working would be a huge step up.
I appreciate the intention but I highly doubt you'll get to this and wouldn't blame you once you realize how big this is. If you are serious though and want to give it a shot try to start small first with converting 1 kernel we already have standalone and work from there.