Skip to content

Commit

Permalink
gpu: fix profiling flag identification
Browse files Browse the repository at this point in the history
  • Loading branch information
densamoilov authored and vpirogov committed Jul 10, 2023
1 parent 65ccd25 commit 2ca2938
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/gpu/ocl/ocl_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ struct ocl_stream_t : public compute::compute_stream_t {
*flags |= (props & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE)
? stream_flags::out_of_order
: stream_flags::in_order;

#ifdef DNNL_EXPERIMENTAL_PROFILING
if (props & CL_QUEUE_PROFILING_ENABLE)
*flags |= stream_flags::profiling;
#endif

return status::success;
}
Expand Down
3 changes: 2 additions & 1 deletion src/sycl/sycl_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,10 @@ struct sycl_stream_t : public gpu::compute::compute_stream_t {
*flags = queue.is_in_order() ? stream_flags::in_order
: stream_flags::out_of_order;

#ifdef DNNL_EXPERIMENTAL_PROFILING
if (queue.has_property<::sycl::property::queue::enable_profiling>())
*flags |= stream_flags::profiling;

#endif
return status::success;
}

Expand Down

0 comments on commit 2ca2938

Please sign in to comment.