Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 43b8bcd

Browse files
authored
[SYCL] Fix memory leak by adding a synch point (#816)
SYCL::stream won't be deallocated without a synchronization point. So, I added a simple q.wait() to avoid memory leak. Signed-off-by: Byoungro So <[email protected]>
1 parent 5061f88 commit 43b8bcd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

SYCL/Regression/unoptimized_stream.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// UNSUPPORTED: cuda
77
// Disable test due to flaky failure on CUDA(issue #387)
88

9-
// UNSUPPORTED: ze_debug-1,ze_debug4
10-
119
// NOTE: The libclc target used by the CUDA backend used to generate atomic load
1210
// variants that were unsupported by NVPTX. Even if they were not used
1311
// directly, sycl::stream and other operations would keep the invalid
@@ -21,5 +19,6 @@ int main() {
2119
sycl::stream os(1024, 256, cgh);
2220
cgh.single_task([=]() { os << "test"; });
2321
});
22+
q.wait();
2423
return 0;
2524
}

0 commit comments

Comments
 (0)