[Openmp-commits] [PATCH] D84487: [OpenMP] Add more pass-through functions in DeviceTy
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 24 09:45:31 PDT 2020
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/src/device.h:198
+ /// succeeds/fails.
+ void *data_alloc(int64_t Size);
+ /// Deallocates memory which \p TgtPtrBegin points at and returns
----------------
tianshilei1992 wrote:
> ye-luo wrote:
> > tianshilei1992 wrote:
> > > Although `HstPtr` is not used here, it is still part of the plugin interface. In order to be compatible with the plugin interface, I think either `HstPtr` is kept here, or remove the `HstPtr` from the plugin interface.
> > My intention is to remove it fully. Due to compatibility consideration, it has not been removed in the plugin interface. I insist in not exposing HstPtr here.
> I think it doesn't make any sense. The so-called compatibility is, we may use it somewhere or sometime, especially in the future. If the plugin interface leaves it, considering maybe in the future we may use it to assist the allocation of device memory, or something else, then there is no reason to remove it from `data_alloc` because `data_alloc` is also an interface.
Here I'm not intended to change __tgt_rtl_data_alloc in omptargetplugin.h. Any changes there requires a different discussion.
So far the added DeviceTy::data_alloc/data_delete are intended to allocate/deallocate device memory only so HstPtr is not part of this logic.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84487/new/
https://reviews.llvm.org/D84487
More information about the Openmp-commits
mailing list