Skip to content

Commit 2b652f8

Browse files
committed
Manually create SYCL context to work around DPC++ bug
Workaround for intel/llvm#10982
1 parent 0a282f5 commit 2b652f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/device_queue.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ namespace detail {
1919

2020
auto device = std::visit(
2121
[&cfg](const auto& value) { return ::celerity::detail::pick_device(cfg, value, cl::sycl::platform::get_platforms()); }, user_device_or_selector);
22-
m_sycl_queue = std::make_unique<cl::sycl::queue>(device, handle_exceptions, props);
22+
23+
// Manually create context as workaround for https://github.com/intel/llvm/issues/10982
24+
sycl::context ctx{device};
25+
m_sycl_queue = std::make_unique<cl::sycl::queue>(ctx, device, handle_exceptions, props);
2326

2427
m_global_mem_total_size_bytes = m_sycl_queue->get_device().get_info<sycl::info::device::global_mem_size>();
2528
}

0 commit comments

Comments
 (0)