Re:HIP – Convert CUDA to Portable C++
by mamon on Sunday March 18, 2018 @10:39AM
(#16612107)
So, the logical next step would be what? Apply that tool to Tensorflow to make it run on AMD GPUs?
[ Parent
| on HN ]
HIP is only useful to convert CUDA source code.
Tensorflow uses the cuDNN library, which is closed source. There is nothing for HIP to convert.
AMD is working on a cudnn comptability layer iirc (MiOpen) and is ROCm group has created a cuda transpiler (to intermediary HIP then to amd binary via hcc)
https://instinct.radeon.com/en/6-deep-learning-projects-amd-...
Wait, I thought that AMD's cuDNN replacement was hipDNN, now I'm confused https://github.com/ROCmSoftwarePlatform/hipDNN
Edit: OK I was reading the docs, I think I got it: hipDNN is a wrapper that (once finished) will search and replace calls (from cuDNN to hipDNN), then hipDNN itself, in turn, will call MIOpen, not sure if that's right, I would appreciate if someone who knows more could confirm
AMD is always working on random half-assed attempts to get to parity with NVidia for neural network training.
If they'd chosen one approach 5 years ago and put decent resources behind it they might be competitive by now.
Yes, but it means AMD will have to do the original work. They can’t use a CUDA to HIP converter.
Was just thinking of that, the tensorflow repo have a very big issue where people are trying to do that
Re:HIP – Convert CUDA to Portable C++
by thewizardofaus on Sunday March 18, 2018 @05:35PM
(#16614518)
Yup! I spent one very LONG weekend trying to get tensor flow running on my amd GPU. Managed to finally get it running but it was slower than using my CPU ....
Oh NO, that is both hilarious and ugly.
and interesting
It has been in the works for a long time but I don't believe that it is in a usable state yet.
The combination of tensorflow and codeplay's computeCPP might already work. At least they have added SyCL support for the linear algebra library (Eigen)
Re:HIP – Convert CUDA to Portable C++
by autopoiesis on Sunday March 18, 2018 @03:46PM
(#16613877)
I think they also have some TensorFlow-specific SYCL kernels; I'm not sure it all goes through Eigen. Plus they're at TF 1.6, whereas AMD's HIP version seems to be stuck on TF 1.0. AMD's method of maintaining a pure fork and running hipify on every upstream commit doesn't seem very sustainable...
From Codeplay's blogs it seems they ported the tensor part of Eigen to SyCL. The Matrix part is not supported under SyCL.
Tensorflow does have options to compile models to custom code (XLA), that part might not use Eigen.
,,HIP is not intended to be a drop-in replacement for CUDA, and developers should expect to do some manual coding and performance tuning work to complete the port.''
It's a great start, but I'm sure a lot of cases are not yet handled (like asm instructions?)