oneDPL icon indicating copy to clipboard operation
oneDPL copied to clipboard

Lazy initialization of queue inside dpcpp_default policy

Open adamfidel opened this issue 2 years ago • 1 comments

There are a few potential issues with oneDPL's global sycl::queue, including:

  • Requirement that a SYCL device is available whenever oneDPL is included as mentioned in #1060
  • Static initialization order fiasco with regard to queues being defined in other translation units

To address the issue, this PR lazily initializes the sycl::queue inside the dpcpp_default execution policy on first use.

adamfidel avatar Sep 06 '23 15:09 adamfidel

Just to state it explicitly. Those are not all comments that I have. I am thinking about Sergey's comment about virtuality and also about additional things for copy/move semantics

rarutyun avatar Sep 07 '23 11:09 rarutyun

After merging #1652, this patch is outdated.

akukanov avatar Jul 10 '24 12:07 akukanov