Skip to content

Commit a66c6df

Browse files
authored
[SYCL][Graph] Fix data race in the multiple_exec_graphs test (#18865)
The multiple_exec_graphs test enqueues multiple instances of executable graphs without any dependencies. However, there is a data race because the test uses an out-of-order queue and every executable graph modifies the same usm memory pointer. This commit solves the issue by using an in-order queue instead.
1 parent 133fee5 commit a66c6df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/test-e2e/Graph/Inputs/multiple_exec_graphs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// graph.
33

44
#include "../graph_common.hpp"
5+
#include <sycl/properties/queue_properties.hpp>
56

67
int main() {
7-
queue Queue{};
8+
queue Queue{{sycl::property::queue::in_order{}}};
89

910
using T = int;
1011

0 commit comments

Comments
 (0)