News for hackers. Stuff that matters.
Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by yeukhon on Wednesday December 21, 2016 @12:00PM (#13230644)
The thing that stops me from getting AMD GPU for GPU programming is CUDA seems to be more widely used. OpenCL I really want to like it but hopefully the open standard AMD is pushing will gain more traction...
Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by gild on Wednesday December 21, 2016 @05:13PM (#13233120)
Not sure how much use it will be, but AMD's GPUOpen initiative recently released a tool[1] that translates native CUDA code to portable C++ that can be recompiled into either CUDA or OpenCL. I haven't played with it at all so I can't verify how well it works.

[1] https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by rockdoe on Wednesday December 21, 2016 @01:10PM (#13231240)
The difference between the kernel languages is minimal, many kernels can be translated with basic search & replace.

The difference is in the scaffolding (CUDA is easier but less flexible), and pre-existing libraries on offer.

If you're going to be writing the kernels yourself then it is easy to maintain both versions and it if it is for learning it doesn't matter at all (but I prefer the standard that works on all my machines).

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by pjmlp on Wednesday December 21, 2016 @02:29PM (#13231896)
OpenCL doesn't do Fortran, C++, Haskell or .NET.

Well, OpenCL 2.1 does do some C++ (not as much as CuDA with Pascal), but isn't widely available anyway.

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by keldaris on Wednesday December 21, 2016 @03:26PM (#13232314)
There are plenty of zero-cost C++ wrappers available, including the official bindings. Most people who use OpenCL from C++ tend to accumulate their own convenience wrappers over time. The rest of those languages have fairly easy interoperability with C code and therefore access to the C api, though some may also have established convenience libraries. I wouldn't suggest .NET or Haskell for most serious GPGPU work, but Python, Julia, Fortran and others are frequently used. The PyOpenCL library is particularly excellent.

If you were referring to the kernel language (a restricted subset of C99), I don't find that to be a disadvantage in practice. While CUDA supports a fairly useful subset of C++ (most notably, templates), I still find host-side metaprogramming to generate kernel code to be a much more useful approach in most cases. Of course your preferences may vary, but I haven't seen many experienced GPGPU people express dissatisfaction with this point.

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by rockdoe on Wednesday December 21, 2016 @04:34PM (#13232824)
False. The official wrappers support C++ from OpenCL 1.0 on. Maybe this isn't obvious because the C++ bindings were introduced later, but they're backwards compatible and you can set the target API level. (And of course you use 1.2 if you need to support lagging vendors such as NVIDIA)

I have no idea about the other languages but surely other bindings must exist?

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by pjmlp on Wednesday December 21, 2016 @04:57PM (#13232994)
No one is speaking of wrappers here, rather C++ kernels, which is what matters, a full C++ experience.

> I have no idea about the other languages but surely other bindings must exist?

Yeah, the usual poor man's solution of generating C code, thus introducing two compilation steps, without any debugger support.

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by paulmd on Wednesday December 21, 2016 @12:27PM (#13230862)
Anyone know whether GPU Ocelot actually works well? In theory that should allow you to run CUDA on your AMD hardware via OpenCL.

I always wanted to try it, but on the flip side the fact that AMD was starting their own project to do the same thing doesn't fill me with confidence that GPU Ocelot is worth my time.

Re:The Loyalty to AMD’s GPU Product Among AMD CPU Buyers Is ... by keldaris on Wednesday December 21, 2016 @04:05PM (#13232608)
I haven't used it myself, because I looked at it and saw that it's been unmaintained for over a year, has no adoption and requires ancient versions of CUDA and LLVM. The concept is interesting, but at this point the project seems dead to me.