On Saturday, 4 April 2015 at 10:03:56 UTC, Walter Bright wrote:
On 4/4/2015 2:35 AM, ponce wrote:
On Saturday, 4 April 2015 at 02:49:16 UTC, Walter Bright wrote:
http://www.nvidia.com/object/cuda_home_new.html
I wrote the Driver and Runtime API bindings for
https://github.com/DerelictOrg/DerelictCUDA
And the one thing I've done with them is loading the
functions, create a
context and destroy it. So yeah I think using CUDA with D is
possible.
Thank you. How far are you interested in going with it?
Not far. I'm currently trying to bootstrap a business solo
(hopefully with the help of D) and available time has became
significantly sparser.
I'd much prefer pass time on Derelict OpenCL bindings (brought to
you by MeinMein) if time was an option.
OpenCL 2.x is much more interesting though.
It's slower:
Furthermore, in studies of straightforward translation of CUDA
programs to
OpenCL C programs, CUDA has been found to outperform
OpenCL;[83][86] but the
performance differences can mostly be attributed to
differences in the
programming model (especially the memory model) and in the
optimizations that
OpenCL C compilers performed as compared to those in the CUDA
compiler.
--
http://en.wikipedia.org/wiki/OpenCL#Portability.2C_performance_and_alternatives
It used to be that CUDA had warps and pinned memory and OpenCL
didn't. Now OpenCL 2.0 has several driver providers and also has
warps ("sub-groups") and associated warp operations which are
super useful for performance.
To the extent that I wouldn't recommend building anything new in
CUDA.
I don't really see what could make OpenCL it slower. But I see
really well what is dangerous in making new projects in CUDA
nowadays. I was certainly burned by it to some extent.
The newest CUDA features don't improve performance (Unified
Memory Addressing, Peer copy, and friends).
OpenCL compiles to FPGAs, CPUs, GPUs, and has no missing features
anymore. We must now forget what was once true about it.
With Intel OpenCL SDK even tooling is on par with NVIDIA.
No reason not to support both, however.
Yep.