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
83
83
#endif
84
84
}
85
85
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
+
86
96
// / Wrapper using SYCL extensions to submit a native command when available,
87
97
// / or a plain host_task otherwise. Calls queue::wait_and_throw after the
88
98
// / command submission and additionally nativeSync() when plain host_task is
@@ -95,9 +105,8 @@ class SYCL
95
105
q.wait_and_throw ();
96
106
// Extensions ensure native stream sync happens with the above
97
107
// 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 )
99
109
nativeSync ();
100
- #endif
101
110
}
102
111
103
112
#ifdef USE_INFRASTRUCTURE // Move to testbench base??
Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ has_backends = false
88
88
#add_project_arguments('-fsycl-targets=spir64_gen -Xs -device 0x0bd5 -revision_id 3' ', language : 'cpp')
89
89
#endif
90
90
91
-
91
+ # Common includes
92
+ includes += include_directories (' ../infrastructure' )
92
93
93
94
# Third party files.
94
95
includes += include_directories (' third_party' , is_system : true )
You can’t perform that action at this time.
0 commit comments