Skip to content

Commit cf4000e

Browse files
committed
Fix exp_graph fixtures teardown
1 parent 358464d commit cf4000e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

unified-runtime/test/conformance/exp_graph/fixtures.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ struct urGraphPopulatedExpTest : urGraphExpTest {
6868
void TearDown() override {
6969
if (deviceMem) {
7070
ASSERT_SUCCESS(urUSMFree(context, deviceMem));
71+
resetData();
7172
}
7273

73-
resetData();
74-
7574
UUR_RETURN_ON_FATAL_FAILURE(urGraphExpTest::TearDown());
7675
}
7776

unified-runtime/test/conformance/exp_graph/urQueueIsGraphCaptureEnabledExp.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ struct urQueueIsGraphCaptureEnabledExpTest : uur::urGraphSupportedExpTest {
1111
UUR_RETURN_ON_FATAL_FAILURE(urGraphSupportedExpTest::SetUp());
1212

1313
ASSERT_SUCCESS(urQueueBeginGraphCaptureExp(queue));
14+
isCapturing = true;
1415
}
1516

1617
void TearDown() override {
@@ -23,11 +24,13 @@ struct urQueueIsGraphCaptureEnabledExpTest : uur::urGraphSupportedExpTest {
2324
}
2425

2526
void endGraphCapture() {
26-
if (!graph) {
27+
if (isCapturing) {
2728
ASSERT_SUCCESS(urQueueEndGraphCaptureExp(queue, &graph));
29+
isCapturing = false;
2830
}
2931
}
3032

33+
bool isCapturing = false;
3134
ur_exp_graph_handle_t graph = nullptr;
3235
};
3336

0 commit comments

Comments
 (0)