[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)
Pranav Bhandarkar via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 29 11:50:04 PDT 2025
================
@@ -3623,6 +3623,9 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers(
LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder,
llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy &combinedInfo,
MapInfoData &mapData, uint64_t mapDataIndex, bool isTargetParams) {
+ assert(!ompBuilder.Config.isTargetDevice() &&
+ "function only supported for host device codegen");
----------------
bhandarkar-pranav wrote:
<nit> : The wording would be that much clearer if you didn't use the word device here at all.
`"function only supported for host codegen"` or `"function only supported for host side codegen"`
I know that here you the two terms you are using that are opposite to each other in meaning are "host device" and "target device", but when an assert is hit only one of them will be seen. If it is "target device" that's fine because target, target device and device are sort of used interchangeably (in my experience so far). However, I have come across ample usage of just "device" to mean target only. So, host device can be confusing.
However, I do also recognize that "hostdevice" is used in other places, in at least the runtime. So, if "host device" is more prevalent, then ignore this comment entirely.
https://github.com/llvm/llvm-project/pull/137199
More information about the llvm-branch-commits
mailing list