@@ -104,11 +104,18 @@ class LangHandle {
104104#ifdef DEVICE_TIMER
105105 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_CONTEXT" );
106106#endif
107- // auto propList = sycl::property_list{sycl::property::queue::in_order()};
107+ auto propList = sycl::property_list{
108+ #ifdef IN_ORDER_QUEUE
109+ sycl::property::queue::in_order{},
110+ #ifdef SYCL_EXT_ONEAPI_DISCARD_QUEUE_EVENTS
111+ sycl::ext::oneapi::property::queue::discard_events{}
112+ #endif
113+ #endif
114+ };
108115#ifdef DEVICE_TIMER
109116 start = get_time_now ();
110117#endif
111- sycl_queue_ = new sycl::queue (*context_, *dht_);
118+ sycl_queue_ = new sycl::queue (*context_, *dht_, propList );
112119#ifdef DEVICE_TIMER
113120 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_QUEUE" );
114121#endif
@@ -246,11 +253,18 @@ class LangHandle {
246253#ifdef DEVICE_TIMER
247254 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_CONTEXT" );
248255#endif
249- // auto propList = sycl::property_list{sycl::property::queue::in_order()};
256+ auto propList = sycl::property_list{
257+ #ifdef IN_ORDER_QUEUE
258+ sycl::property::queue::in_order{},
259+ #ifdef SYCL_EXT_ONEAPI_DISCARD_QUEUE_EVENTS
260+ sycl::ext::oneapi::property::queue::discard_events{}
261+ #endif
262+ #endif
263+ };
250264#ifdef DEVICE_TIMER
251265 start = get_time_now ();
252266#endif
253- sycl_queue_ = new sycl::queue (*context_, *dht_);
267+ sycl_queue_ = new sycl::queue (*context_, *dht_, propList );
254268#ifdef DEVICE_TIMER
255269 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_QUEUE" );
256270#endif
@@ -343,11 +357,18 @@ class LangHandle {
343357#ifdef DEVICE_TIMER
344358 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_CONTEXT" );
345359#endif
346- // auto propList = sycl::property_list{sycl::property::queue::in_order()};
360+ auto propList = sycl::property_list{
361+ #ifdef IN_ORDER_QUEUE
362+ sycl::property::queue::in_order{},
363+ #ifdef SYCL_EXT_ONEAPI_DISCARD_QUEUE_EVENTS
364+ sycl::ext::oneapi::property::queue::discard_events{}
365+ #endif
366+ #endif
367+ };
347368#ifdef DEVICE_TIMER
348369 start = get_time_now ();
349370#endif
350- sycl_queue_ = new sycl::queue (*context_, *dht_);
371+ sycl_queue_ = new sycl::queue (*context_, *dht_, propList );
351372#ifdef DEVICE_TIMER
352373 timer->recordOpTimeTaken (1000 , calculate_op_time_taken (start), " CREATE_SYCL_QUEUE" );
353374#endif
0 commit comments