Skip to content

Commit

Permalink
Manually create SYCL context to work around DPC++ bug
Browse files Browse the repository at this point in the history
Workaround for intel/llvm#10982
  • Loading branch information
psalz committed Sep 8, 2023
1 parent 0a282f5 commit 2b652f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/device_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ namespace detail {

auto device = std::visit(
[&cfg](const auto& value) { return ::celerity::detail::pick_device(cfg, value, cl::sycl::platform::get_platforms()); }, user_device_or_selector);
m_sycl_queue = std::make_unique<cl::sycl::queue>(device, handle_exceptions, props);

// Manually create context as workaround for https://github.com/intel/llvm/issues/10982
sycl::context ctx{device};
m_sycl_queue = std::make_unique<cl::sycl::queue>(ctx, device, handle_exceptions, props);

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

0 comments on commit 2b652f8

Please sign in to comment.