diff --git a/SYCL/Basic/buffer/buffer_dev_to_dev.cpp b/SYCL/Basic/buffer/buffer_dev_to_dev.cpp index bb5a03218c..d44302226b 100644 --- a/SYCL/Basic/buffer/buffer_dev_to_dev.cpp +++ b/SYCL/Basic/buffer/buffer_dev_to_dev.cpp @@ -25,9 +25,13 @@ int main() { {property::buffer::use_host_ptr()}); default_selector Selector; + device Device(Selector); - queue FirstQueue(Selector); - queue SecondQueue(Selector); + context FirstContext(Device); + context SecondContext(Device); + + queue FirstQueue(FirstContext, Device); + queue SecondQueue(SecondContext, Device); assert(FirstQueue.get_context() != SecondQueue.get_context()); FirstQueue.submit([&](handler &Cgh) { diff --git a/SYCL/Plugin/enqueue-arg-order-buffer.cpp b/SYCL/Plugin/enqueue-arg-order-buffer.cpp index a2d8d3e265..4af08f1f24 100644 --- a/SYCL/Plugin/enqueue-arg-order-buffer.cpp +++ b/SYCL/Plugin/enqueue-arg-order-buffer.cpp @@ -237,8 +237,13 @@ void testcopyH2DBuffer() { { buffer buffer_from_1D(data_from_1D.data(), range<1>(width)); buffer buffer_to_1D(data_to_1D.data(), range<1>(width)); - queue myQueue; - queue otherQueue; + + device Dev{default_selector{}}; + context myCtx{Dev}; + context otherCtx{Dev}; + + queue myQueue{myCtx, Dev}; + queue otherQueue{otherCtx, Dev}; myQueue.submit([&](handler &cgh) { auto read = buffer_from_1D.get_access(cgh); auto write = buffer_to_1D.get_access(cgh); @@ -261,8 +266,13 @@ void testcopyH2DBuffer() { buffer buffer_from_2D(data_from_2D.data(), range<2>(height, width)); buffer buffer_to_2D(data_to_2D.data(), range<2>(height, width)); - queue myQueue; - queue otherQueue; + + device Dev{default_selector{}}; + context myCtx{Dev}; + context otherCtx{Dev}; + + queue myQueue{myCtx, Dev}; + queue otherQueue{otherCtx, Dev}; myQueue.submit([&](handler &cgh) { auto read = buffer_from_2D.get_access(cgh); auto write = buffer_to_2D.get_access(cgh); @@ -285,8 +295,13 @@ void testcopyH2DBuffer() { range<3>(depth, height, width)); buffer buffer_to_3D(data_to_3D.data(), range<3>(depth, height, width)); - queue myQueue; - queue otherQueue; + + device Dev{default_selector{}}; + context myCtx{Dev}; + context otherCtx{Dev}; + + queue myQueue{myCtx, Dev}; + queue otherQueue{otherCtx, Dev}; myQueue.submit([&](handler &cgh) { auto read = buffer_from_3D.get_access(cgh); auto write = buffer_to_3D.get_access(cgh); diff --git a/SYCL/Plugin/enqueue-arg-order-image.cpp b/SYCL/Plugin/enqueue-arg-order-image.cpp index fe20bcb5d2..b08f793dd8 100644 --- a/SYCL/Plugin/enqueue-arg-order-image.cpp +++ b/SYCL/Plugin/enqueue-arg-order-image.cpp @@ -167,8 +167,12 @@ void testcopyH2DImage() { ImgSize_1D); sycl::image<1> image_to_1D(data_to_1D.data(), ChanOrder, ChanType, ImgSize_1D); - queue Q; - queue otherQueue; + device Dev{default_selector{}}; + context Ctx{Dev}; + context otherCtx{Dev}; + + queue Q{Ctx, Dev}; + queue otherQueue{otherCtx, Dev}; // first op Q.submit([&](sycl::handler &CGH) { auto readAcc = image_from_1D.get_access(CGH); @@ -203,8 +207,12 @@ void testcopyH2DImage() { ImgSize_2D); sycl::image<2> image_to_2D(data_to_2D.data(), ChanOrder, ChanType, ImgSize_2D); - queue Q; - queue otherQueue; + device Dev{default_selector{}}; + context Ctx{Dev}; + context otherCtx{Dev}; + + queue Q{Ctx, Dev}; + queue otherQueue{otherCtx, Dev}; Q.submit([&](sycl::handler &CGH) { auto readAcc = image_from_2D.get_access(CGH); auto writeAcc = image_to_2D.get_access(CGH); @@ -238,8 +246,12 @@ void testcopyH2DImage() { ImgSize_3D); sycl::image<3> image_to_3D(data_to_3D.data(), ChanOrder, ChanType, ImgSize_3D); - queue Q; - queue otherQueue; + device Dev{default_selector{}}; + context Ctx{Dev}; + context otherCtx{Dev}; + + queue Q{Ctx, Dev}; + queue otherQueue{otherCtx, Dev}; Q.submit([&](sycl::handler &CGH) { auto readAcc = image_from_3D.get_access(CGH); auto writeAcc = image_to_3D.get_access(CGH);