[mpich-discuss] CUDA support with clang instead of nvcc

Zhou, Hui zhouh at anl.gov
Fri Apr 15 15:13:56 CDT 2022


The configure in yaksa will set correct -ccbin​ option for nvcc to use the compiler set by CC​. Reference https://github.com/pmodels/yaksa/blob/e4063c04b6ceeda7d863449a4e92124feb5b739a/src/backend/cuda/subconfigure.m4#L65-L70

Ideally, it should use CXX​ rather than CC. But it currently works to compile the cu files in yaksa.

--
Hui
[https://opengraph.githubassets.com/23e05374cb64ce76ccf37f70c107678c6cd0fc7bb14a3965eaf36fced39609a5/pmodels/yaksa]<https://github.com/pmodels/yaksa/blob/e4063c04b6ceeda7d863449a4e92124feb5b739a/src/backend/cuda/subconfigure.m4#L65-L70>
yaksa/subconfigure.m4 at e4063c04b6ceeda7d863449a4e92124feb5b739a · pmodels/yaksa<https://github.com/pmodels/yaksa/blob/e4063c04b6ceeda7d863449a4e92124feb5b739a/src/backend/cuda/subconfigure.m4#L65-L70>
Yaksa: High-performance Noncontiguous Data Management - yaksa/subconfigure.m4 at e4063c04b6ceeda7d863449a4e92124feb5b739a · pmodels/yaksa
github.com

________________________________
From: Raffenetti, Ken <raffenet at anl.gov>
Sent: Friday, April 15, 2022 3:02 PM
To: discuss at mpich.org <discuss at mpich.org>
Cc: Zhou, Hui <zhouh at anl.gov>
Subject: Re: [mpich-discuss] CUDA support with clang instead of nvcc

The Yaksa configure is currently hardcoded to use `nvcc` for .cu files. We'll have to patch it to support alternatives, right?

Ken

On 4/15/22, 2:57 PM, "Zhou, Hui via discuss" <discuss at mpich.org> wrote:

    Yes, just set CC=clang​ and CXX=clang++​.

    --

    Hui Zhou

    ________________________________________
    From: Sajid Ali via discuss <discuss at mpich.org>
    Sent: Friday, April 15, 2022 11:49 AM
    To: discuss at mpich.org <discuss at mpich.org>
    Cc: Sajid Ali <sajidsyed2021 at u.northwestern.edu>
    Subject: [mpich-discuss] CUDA support with clang instead of nvcc

    Hi MPICH-developers,


    Is it possible to compile MPICH with CUDA awareness, but with clang as the CUDA compiler? (i.e. use clang capable of targeting the nvptx backend to compiler cuda files instead of nvcc).

    Thank You,
    Sajid Ali (he/him) | Research Associate

    Scientific Computing Division

    Fermi National Accelerator Laboratory

    s-sajid-ali.github.io <http://s-sajid-ali.github.io>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20220415/76a90010/attachment-0001.html>


More information about the discuss mailing list