Skip to content

Commit a42ae7e

Browse files
[SYCL][E2E] Remove leaking part of non-uniform-wk-gp-test (#15112)
As shown in #15111, currently sycl::stream will leak resources if an exception is thrown during launch of its associated command. This was in turn causing sycl/test-e2e/Basic/diagnostics/non-uniform-wk-gp-test.cpp to leak resources simply because it was using the stream in its testing. However, since the kernel should never execute, the stream did not serve a fundamental function in the test and was only there for additional debugging information in the case where the test would fail. As such, it is arguably better to improve coverage than to disable cases because of some potentially helpful additional output in the failing case. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 66994a2 commit a42ae7e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sycl/test-e2e/Basic/diagnostics/non-uniform-wk-gp-test.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// RUN: %{build} -o %t.out
44
// RUN: %{run} %t.out
55

6-
// UNSUPPORTED: ze_debug
76
//==------- non-uniform-wk-gp-test.cpp -------==//
87
// This is a diagnostic test which verifies that
98
// for loops with non-uniform work groups size
@@ -12,7 +11,6 @@
1211

1312
#include <iostream>
1413
#include <sycl/detail/core.hpp>
15-
#include <sycl/stream.hpp>
1614

1715
using namespace sycl;
1816

@@ -26,12 +24,9 @@ int test() {
2624
try {
2725
const int N = 1;
2826
q.submit([&](handler &cgh) {
29-
sycl::stream kernelout(108 * 64 + 128, 64, cgh);
3027
cgh.parallel_for<class test_kernel>(
3128
nd_range<3>(range<3>{1, 1, N}, range<3>{1, 1, 16}),
32-
[=](nd_item<3> itm) {
33-
kernelout << "Coordinates: " << itm.get_global_id() << sycl::endl;
34-
});
29+
[=](nd_item<3> itm) {});
3530
});
3631
std::cout << "Test failed: no exception thrown." << std::endl;
3732
} catch (exception &E) {

0 commit comments

Comments
 (0)