[all-commits] [llvm/llvm-project] bfe486: Passing descriptors by reference to CUDA runtime c...
Renaud Kauffmann via All-commits
all-commits at lists.llvm.org
Wed Oct 30 13:25:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bfe486fe764667d514124faf2b39afb7e7322640
https://github.com/llvm/llvm-project/commit/bfe486fe764667d514124faf2b39afb7e7322640
Author: Renaud Kauffmann <rkauffmann at nvidia.com>
Date: 2024-10-30 (Wed, 30 Oct 2024)
Changed paths:
M flang/include/flang/Runtime/CUDA/memory.h
M flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
M flang/runtime/CUDA/memory.cpp
M flang/test/Fir/CUDA/cuda-data-transfer.fir
Log Message:
-----------
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list