Skip to content

Commit a485cbf

Browse files
authored
[SYCL] Optimize finalizeHandlerPostProcess (#17791)
by avoiding unnecessary temp shared_ptr creation
1 parent e9d13a5 commit a485cbf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sycl/source/detail/queue_impl.hpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -870,10 +870,7 @@ class queue_impl {
870870
event finalizeHandlerPostProcess(
871871
HandlerType &Handler,
872872
const optional<SubmitPostProcessF> &PostProcessorFunc) {
873-
auto HandlerImpl = detail::getSyclObjImpl(Handler);
874-
const CGType Type = HandlerImpl->MCGType;
875-
876-
bool IsKernel = Type == CGType::Kernel;
873+
bool IsKernel = Handler.getType() == CGType::Kernel;
877874
bool KernelUsesAssert = false;
878875

879876
if (IsKernel)

0 commit comments

Comments
 (0)