[flang-commits] [PATCH] D150159: [flang] CUDA Fortran - part 1/5: parsing

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue May 16 09:42:46 PDT 2023


klausler added a comment.

In D150159#4344586 <https://reviews.llvm.org/D150159#4344586>, @MehdiChinoune wrote:

> There is a big difference between CUDA and CUDA-Fortran.
> 1 - CUDA could be used by any compiler MSVC, Intel, IBM, GNU... as It doesn't require any support from the compiler. It's just `libraries+headers`.
> While CUDA-Fortran requires a support from the compiler itself.

This is actually not the case.  A CUDA C(++) program needs to be compiled by a C(++) compiler capable of handling the same features (function attributes, data attributes, kernel launch, &c.) that are present in CUDA Fortran.

> GCC, Intel, Cray, Fujitsu ... compilers do not support it because It's just an Nvidia/PGI dialect, Flang-Classic is just an open-sourced Frontend of PGI compiler.

IBM's XLF Fortran compiler also supports CUDA Fortran.

> 2 - CUDA-Fortran requires a proprietary CUDA SDK to be installed which make it different from other dialects/extensions you mentioned above. those are language extensions they don't need any SDK to be installed.

It's no different from the CUDA support in Clang or the PTX support in the LLVM code generator in that respect.

> We are talking here about a company pushing for a dialect not widely used by the community.
> If you fellow many discussions online in Fortran community, you know for sure that PGI compiler is one of the least/worst used compiler.
> I think Nvidia should keep CUDA-Fortran support in the commercial/proprietary compiler that will be based on flang.

I would much rather have our source in the open and available to all, which is why LLVM Flang exists in the first place rather than being a closed-source NVIDIA project to improve its Fortran product.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150159/new/

https://reviews.llvm.org/D150159



More information about the flang-commits mailing list