File tree Expand file tree Collapse file tree 3 files changed +88
-52
lines changed Expand file tree Collapse file tree 3 files changed +88
-52
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,16 @@ class SYCL
8383 #endif
8484 }
8585
86+ // Extensions ensure native stream sync happens with the sycl::event sync,
87+ // wheras plain host_task requires an explicit native sync
88+ constexpr static bool NativeCommandNeedsSync{
89+ #if defined(SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND) || defined(ACPP_EXT_ENQUEUE_CUSTOM_OPERATION)
90+ false
91+ #else
92+ true
93+ #endif
94+ };
95+
8696 // / Wrapper using SYCL extensions to submit a native command when available,
8797 // / or a plain host_task otherwise. Calls queue::wait_and_throw after the
8898 // / command submission and additionally nativeSync() when plain host_task is
@@ -95,9 +105,8 @@ class SYCL
95105 q.wait_and_throw ();
96106 // Extensions ensure native stream sync happens with the above
97107 // queue::wait, but plain host_task requires an explicit native sync
98- # if !defined(SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND) && !defined(ACPP_EXT_ENQUEUE_CUSTOM_OPERATION )
108+ if constexpr (SYCL::NativeCommandNeedsSync )
99109 nativeSync ();
100- #endif
101110 }
102111
103112#ifdef USE_INFRASTRUCTURE // Move to testbench base??
Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ has_backends = false
8888#add_project_arguments('-fsycl-targets=spir64_gen -Xs -device 0x0bd5 -revision_id 3' ', language : 'cpp')
8989#endif
9090
91-
91+ # Common includes
92+ includes += include_directories (' ../infrastructure' )
9293
9394# Third party files.
9495includes += include_directories (' third_party' , is_system : true )
You can’t perform that action at this time.
0 commit comments