Skip to content
12 changes: 6 additions & 6 deletions projects/rocprim/test/hipgraph/test_hipgraph_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ void testStreamCapture()
ASSERT_EQ(h_data, num_launches);

// Clean up
HIP_CHECK(hipFreeAsync(d_data, stream));
HIP_CHECK(hipStreamDestroy(stream));
HIP_CHECK(hipGraphDestroy(graph));
HIP_CHECK(hipGraphExecDestroy(instance));
HIP_CHECK(hipFree(d_data));
HIP_CHECK(hipStreamDestroy(stream));
}

void testManualConstruction()
Expand Down Expand Up @@ -159,10 +159,10 @@ void testManualConstruction()
ASSERT_EQ(h_data, num_launches);

// Clean up
HIP_CHECK(hipFreeAsync(d_data, stream));
HIP_CHECK(hipStreamDestroy(stream));
HIP_CHECK(hipGraphDestroy(graph));
HIP_CHECK(hipGraphExecDestroy(instance));
HIP_CHECK(hipFree(d_data));
HIP_CHECK(hipStreamDestroy(stream));
}

void testStreamCaptureWithAtomics()
Expand Down Expand Up @@ -217,10 +217,10 @@ void testStreamCaptureWithAtomics()
ASSERT_EQ(h_data, num_launches * num_blocks * num_threads);

// Clean up
HIP_CHECK(hipStreamDestroy(stream));
HIP_CHECK(hipFreeAsync(d_data, stream));
Comment thread
amd-hsong marked this conversation as resolved.
HIP_CHECK(hipGraphDestroy(graph));
HIP_CHECK(hipGraphExecDestroy(instance));
HIP_CHECK(hipFree(d_data));
HIP_CHECK(hipStreamDestroy(stream));
}

TEST(TestHipGraphBasic, CaptureFromStream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ TEST(RocprimDeviceMergeInplaceTests, Basic)

h_data = d_data.load();
d_data.free_manually();
d_temp_storage.free_manually();

test_utils::assert_eq(h_data, h_expected);
}
Expand Down
3 changes: 3 additions & 0 deletions projects/rocprim/test/rocprim/test_device_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ TEST(RocprimDeviceTransformTests, UnalignedPointer)
// Check if output values are as expected
ASSERT_NO_FATAL_FAILURE(
test_utils::assert_near(output, expected, test_utils::precision<T>));

HIP_CHECK(hipFree(d_unaligned));
HIP_CHECK(hipFree(d_input));
}
}
}
Loading