[Haskell-cafe] ghc on xeon phi?

Levent Erkok erkokl at gmail.com
Tue Feb 21 18:00:30 UTC 2017


KNL is "x86-binary-compatible:"

KNL supports "up-to" AVX-512 instruction set, making it capable of
executing binaries that are compiled for, say, regular Xeon machines. The
only notable exception are the TSX instructions (the instructions for
transactional memory), which I don't believe is generated via the GHC
compile pipeline anyhow.

So, in theory, you can take an arbitrary binary compiled for a modern x86
machine (say any of the Core line), and run it unmodified on the KNL. Of
course, the issue is going to be the software stack: Binaries don't exist
in isolation, you also need dynamic-loaded libraries. So, you might have
issues with, say, GMP or other libs if they are not yet ported to KNL.
(Static linking might be a huge headache.)

In practice, however, this would be rather wasteful: The whole point of the
Xeon-phi is the availability of large-vector sized floating-point support
and many-many cores. If you're running a binary that makes no use of those
instructions and is single-threaded, then you will not gain anything. In
fact, the single-threaded performance might suffer compared to a regular
Xeon machine. Of course, this all depends on what you want to do.

Projects like DPH, however, can take great advantage of the Xeon-phi
architecture; by parallelizing number-crunching algorithms and distributing
over many cores. (https://wiki.haskell.org/GHC/Data_Parallel_Haskell).
However, I'm not familiar with the current status of DPH and related
projects to opine weather they aim to target AVX-512 and many cores
afforded by the Xeon-phi. I'd love to hear if anyone had more recent info
on that.


On Mon, Feb 20, 2017 at 4:27 AM, Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> wrote:

> Dear Cafe -
> would a program compiled by ghc, or ghc itself,
> run as-is on Intel Xeon Phi (KNL)?
> I found this reference
> http://stackoverflow.com/questions/22253311/running-haskell-on-xeon-phi
> but it seems to be about the pre-KNL version.
> Thanks - J.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170221/d869c908/attachment.html>

More information about the Haskell-Cafe mailing list