diff --git a/src/backend/sycl_backend.cc b/src/backend/sycl_backend.cc index 47b2c80d..2236510a 100644 --- a/src/backend/sycl_backend.cc +++ b/src/backend/sycl_backend.cc @@ -158,20 +158,6 @@ struct sycl_backend::impl { } } - template - async_event submit_alloc(F&& f) { -#if CELERITY_WORKAROUND(SIMSYCL) - // SimSYCL is not thread safe => skip alloc_queue and complete allocations in executor thread. - if constexpr(std::is_void_v>) { - return f(), make_complete_event(); - } else { - return make_complete_event(f()); - } -#else - return host.alloc_queue.submit(std::forward(f)); -#endif - } - thread_queue& get_host_queue(const size_t lane) { assert(lane <= host.queues.size()); if(lane == host.queues.size()) { host.queues.emplace_back(named_threads::task_type_host_queue(lane), config.profiling); } @@ -233,7 +219,7 @@ void* sycl_backend::debug_alloc(const size_t size) { void sycl_backend::debug_free(void* const ptr) { sycl::free(ptr, m_impl->host.sycl_context); } async_event sycl_backend::enqueue_host_alloc(const size_t size, const size_t alignment) { - return m_impl->submit_alloc([this, size, alignment] { + return m_impl->host.alloc_queue.submit([this, size, alignment] { const auto ptr = sycl::aligned_alloc_host(alignment, size, m_impl->host.sycl_context); #if CELERITY_DETAIL_ENABLE_DEBUG memset(ptr, static_cast(sycl_backend_detail::uninitialized_memory_pattern), size); @@ -243,7 +229,7 @@ async_event sycl_backend::enqueue_host_alloc(const size_t size, const size_t ali } async_event sycl_backend::enqueue_device_alloc(const device_id device, const size_t size, const size_t alignment) { - return m_impl->submit_alloc([this, device, size, alignment] { + return m_impl->host.alloc_queue.submit([this, device, size, alignment] { auto& d = m_impl->devices[device]; const auto ptr = sycl::aligned_alloc_device(alignment, size, d.sycl_device, d.sycl_context); #if CELERITY_DETAIL_ENABLE_DEBUG @@ -256,11 +242,11 @@ async_event sycl_backend::enqueue_device_alloc(const device_id device, const siz } async_event sycl_backend::enqueue_host_free(void* const ptr) { - return m_impl->submit_alloc([this, ptr] { sycl::free(ptr, m_impl->host.sycl_context); }); + return m_impl->host.alloc_queue.submit([this, ptr] { sycl::free(ptr, m_impl->host.sycl_context); }); } async_event sycl_backend::enqueue_device_free(const device_id device, void* const ptr) { - return m_impl->submit_alloc([this, device, ptr] { sycl::free(ptr, m_impl->devices[device].sycl_context); }); + return m_impl->host.alloc_queue.submit([this, device, ptr] { sycl::free(ptr, m_impl->devices[device].sycl_context); }); } async_event sycl_backend::enqueue_host_task(size_t host_lane, const host_task_launcher& launcher, std::vector accessor_infos, diff --git a/src/config.cc b/src/config.cc index ffb98a3f..185affbd 100644 --- a/src/config.cc +++ b/src/config.cc @@ -70,14 +70,6 @@ namespace detail { if(has_profile_kernel) { m_enable_device_profiling = *has_profile_kernel; } m_enable_backend_device_submission_threads = parsed_and_validated_envs.get_or(env_backend_device_submission_threads, true); -#if CELERITY_WORKAROUND(SIMSYCL) - // SimSYCL is not thread safe - if(m_enable_backend_device_submission_threads) { - CELERITY_WARN("CELERITY_BACKEND_DEVICE_SUBMISSION_THREADS=on is not supported with SimSYCL. Disabling worker threads."); - m_enable_backend_device_submission_threads = false; - } -#endif // CELERITY_WORKAROUND(SIMSYCL) - m_thread_pinning_config = parsed_and_validated_envs.get_or(env_thread_pinning, {}); const auto dry_run_num_nodes = parsed_and_validated_envs.get(env_dry_run_num_nodes); diff --git a/test/test_utils.cc b/test/test_utils.cc index 37057ffa..175f21e0 100644 --- a/test/test_utils.cc +++ b/test/test_utils.cc @@ -237,8 +237,7 @@ const char* const expected_runtime_init_warnings_regex = "Celerity has detected that only .* logical cores are available to this process.*|" "Celerity detected more than one node \\(MPI rank\\) on this host, which is not recommended.*|" "Instrumentation for profiling with Tracy is enabled\\. Performance may be negatively impacted\\.|" - "\\[executor\\] no progress for .* seconds, potentially stuck.*|" - "CELERITY_BACKEND_DEVICE_SUBMISSION_THREADS=on is not supported with SimSYCL\\. Disabling worker threads\\."; + "\\[executor\\] no progress for .* seconds, potentially stuck.*"; const char* const expected_device_enumeration_warnings_regex = "Found fewer devices .* than local nodes .*, multiple nodes will use the same device.*";