[Openmp-commits] [PATCH] D34804: [OpenMP] libomptarget / CUDA plugin: Check for existing CUDA context before new context creation

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 29 09:12:48 PDT 2017


grokos added a comment.

In https://reviews.llvm.org/D34804#795297, @hfinkel wrote:

> What do you mean?


Hashim Sharif had some issues with managed allocations which went away when he applied this patch onto his local branch. However the patch is definitely wrong, it doesn't do what I thought it does. It actually sets the context on all devices to the same context (`cuCtxGetCurrent` does not retrieve the context from `DeviceInfo.Contexts[device_id]`, rather it gets the context from the current host thread and assigns it to `DeviceInfo.Contexts[device_id]` - this way all devices get the context of the first device to be initialized...).

I have requested a test case demonstrating Hashim's problem, once I've got got I'll get back to you with an exact description of the problem and a proposed solution.


Repository:
  rL LLVM

https://reviews.llvm.org/D34804





More information about the Openmp-commits mailing list