From 3b69861950f809ef116cd6a2c69fcf8aa2b0ddb7 Mon Sep 17 00:00:00 2001 From: Igor Chorazewicz Date: Wed, 2 Apr 2025 00:04:05 +0000 Subject: [PATCH] [SYCL] optimize finalizeHandlerPostProcess by avoiding unnecessary temp shared_ptr creation --- sycl/source/detail/queue_impl.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index d42cb1c87e6cf..da434e1fe50f5 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -870,10 +870,7 @@ class queue_impl { event finalizeHandlerPostProcess( HandlerType &Handler, const optional &PostProcessorFunc) { - auto HandlerImpl = detail::getSyclObjImpl(Handler); - const CGType Type = HandlerImpl->MCGType; - - bool IsKernel = Type == CGType::Kernel; + bool IsKernel = Handler.getType() == CGType::Kernel; bool KernelUsesAssert = false; if (IsKernel)