ABataev added a comment. In D120353#3338647 <https://reviews.llvm.org/D120353#3338647>, @jhuber6 wrote:
> In D120353#3338589 <https://reviews.llvm.org/D120353#3338589>, @ABataev wrote: > >>> This is necessary for implementing features like conditional offloading and >>> ensuring that unhandled pragmas don't result in missing symbols. >> >> This behavior is part of the standard. > > I believe it's reasonable to have this as an option flag to defy the > standard, we have other flags that do this already (e.g. -fopenmp-cuda-mode). I mean it is not the implementation feature. >>> For offloading tests we can silently fail to the host without realizing >>> that offloading failed. >> >> It is controlled by the OMP_TARGET_OFFLOAD env variable, no? You can set >> this env var to mandatory to avoid this problem. > > Yes, I don't think we set it in the tests right now for some reason. I thought it is the default behavior. But we need to set it for offloading tests to be sure in their behavior. > But the main reason I made this patch is for interoperability. Without this > if you want to call a CUDA function from the OpenMP device you'd need a > variant and a dummy implementation. If you don't write a dummy implementation > you'll get a linker error, if you don't use a variant you'll override the > CUDA version. Ah, ok, I see. How is supposed to be used? In Cuda code or in plain C/C++ code? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120353/new/ https://reviews.llvm.org/D120353 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits