[erlang-questions] Machine Learning
Richard A. O'Keefe
ok@REDACTED
Mon Mar 7 05:14:17 CET 2016
On 7/03/16 11:10 am, Alex Alvarez wrote:
> I'd say the opposite. The more complicated the algorithm is, the more
> you might be able to get out of Erlang because it's a higher level
> language and it was explicitly built to run large number of
> processes. Again, for this and any other problem, the key thing is to
> visualize how to divide the problem into one or more types of
> units/functions that can be repeated in order to truly make the most
> out of the platform.
>
>
> My biggest question regarding Erlang in general is if it's currently
> making use of GPUs, say through OpenCL or other mechanisms? Sorry if
> this has already been covered some place else!
AMD and NVIDIA are tripping over themselves to provide free libraries
for their devices.
I would prefer to do this kind of stuff in Haskell, largely because
there's already support
for access to number-crunching libraries, and more than one DSEL for
working with GPUs.
(The current OpenMP specification has support for 'offloading' some of
your C or
Fortran code to a GPU, and recent releases of GCC support that...)
I really wouldn't dream of doing "big data" in Erlang. What I *might*
do is to use
Erlang for meta-programming. Specify the algorithm in Erlang, and map
that down
to OpenCL + C + routing code. If your problem is big enough for size to
be an
issue, it's big enough that an extra compilation stage may not be noticed.
But even that I'd probably want to do in Haskell. When you get to the
point where
debugging is painful, you want to push *hard* on compile-time checks,
and the
amount of programming you can do with Haskell types is amazing. It's not
a full
dependently-typed language, but you *can* for example write a + b and have
the compiler check that a and b are matrices with the same dimensions,
via type checking.
Of course, if you write your own DSL (or DSEL) in/using Erlang, you can
do whatever typechecking you want.
More information about the erlang-questions
mailing list