grokos added a comment. In D84422#2173500 <https://reviews.llvm.org/D84422#2173500>, @jdenny wrote:
> I've added a comment to the runtime code that performs the check. As you can > see, the check is performed regardless. It's just a question of whether the > runtime treats it as an error. I don't think performance is an issue. > > My concern here is that it will be hard to justify changes to the runtime if > I cannot formulate a use case. Thinking about it, I don't think there can be a case where something is present upon entering a target region and not be present when we're exiting. Whatever code comprises the target region is code executed on the device - it cannot modify the state of host objects (i.e. libomptarget) in any possible way. E.g. the kernel cannot invoke libomptarget functions, allocate memory, map/unmap data etc. The only case where something like this would be possible is if we have multiple host threads executing async offloading. In such a case, one thread may launch a target region at a moment when the requested mapping is `present` on the device and while the kernel is executing some other thread performs a `target data exit` on the desired mapping. Upon exiting the kernel, the mapping will no longer be present but this is clearly a race condition (user's fault), so I don't think we should pay attention to such a scenario. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84422/new/ https://reviews.llvm.org/D84422 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits