commit | cf3f1809bbfa039e35df6af8fac5ef3a46701a9e | [log] [tgz] |
---|---|---|
author | Renaud Kauffmann <rkauffmann@nvidia.com> | Wed Oct 30 13:24:47 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Oct 30 13:25:38 2024 -0700 |
tree | c9858902bfe0de89bc5b42660d07e64d7abaf644 | |
parent | c832a55d00b0faa736c5a69c37a592e4a1e3a640 [diff] |
Passing descriptors by reference to CUDA runtime calls (#114288) Passing a descriptor as a `const Descriptor &` or a `const Descriptor *` generates a FIR signature where the box is passed by value. This is an issue, as it requires a load of the box to be passed. But since, ultimately, all boxes are passed by reference a temporary is generated in LLVM and the reference to the temporary is passed. The boxes addresses are registered with the CUDA runtime but the temporaries are not, thus preventing the runtime to properly map a host side address to its device side counterpart. To address this issue, this PR changes the signatures to the transfer functions to pass a descriptor as a `Descriptor *`, which will in turn generate a FIR signature with that takes a box reference as an argument. GitOrigin-RevId: bfe486fe764667d514124faf2b39afb7e7322640
Flang is a ground-up implementation of a Fortran front end written in modern C++. It started off as the f18 project (https://github.com/flang-compiler/f18) with an aim to replace the previous flang project (https://github.com/flang-compiler/flang) and address its various deficiencies. F18 was subsequently accepted into the LLVM project and rechristened as Flang.
Please note that flang is not ready yet for production usage.
Read more about flang in the docs directory. Start with the compiler overview.
To better understand Fortran as a language and the specific grammar accepted by flang, read Fortran For C Programmers and flang's specifications of the Fortran grammar and the OpenMP grammar.
Treatment of language extensions is covered in this document.
To understand the compilers handling of intrinsics, see the discussion of intrinsics.
To understand how a flang program communicates with libraries at runtime, see the discussion of runtime descriptors.
If you're interested in contributing to the compiler, read the style guide and also review how flang uses modern C++ features.
If you are interested in writing new documentation, follow LLVM's Markdown style guide.
Consult the Getting Started with Flang for information on building and running flang.