diff --git a/sycl/include/syclcompat/util.hpp b/sycl/include/syclcompat/util.hpp index c41170f004f23..c7a53522c8e51 100644 --- a/sycl/include/syclcompat/util.hpp +++ b/sycl/include/syclcompat/util.hpp @@ -922,7 +922,8 @@ class group : public group_base { /// If x <= 2, then return a pointer to the default queue; /// otherwise, return x reinterpreted as a queue_ptr. inline queue_ptr int_as_queue_ptr(uintptr_t x) { - return x <= 2 ? &get_default_queue() : reinterpret_cast(x); + return x <= 2 ? detail::dev_mgr::instance().current_device().default_queue() + : reinterpret_cast(x); } template