SWDEV-353807 - Fixes multiple catch issues (#2912)

- enforcing c++17 for all tests
- Warning as error: ignoring return value

Change-Id: I3d171540403f74222e631d1a8e393386461c9729


[ROCm/hip commit: 87c69c5759]
This commit is contained in:
ROCm CI Service Account authored and GitHub committed 2022-08-30 16:53:21 -07:00
1 parent 825bd9b2ce
commit 1c54135503
24 files changed
+100 -99

No files matched your search

@@ -41,8 +41,8 @@ static void Copy_to_device() {
for(unsigned int i = 0; i < ele_size; ++i) {
A_h[i] = 123;
}
hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice,
hipStreamPerThread);
HIP_CHECK(hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice,
hipStreamPerThread));
}
TEST_CASE("Unit_hipStreamPerThread_DeviceReset_1") {
@@ -80,9 +80,9 @@ TEST_CASE("Unit_hipStreamPerThread_DeviceReset_2") {
status = hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice,
hipStreamPerThread);
if (status != hipSuccess) return;
hipStreamSynchronize(hipStreamPerThread);
HIP_CHECK(hipStreamSynchronize(hipStreamPerThread));
hipDeviceReset();
HIP_CHECK(hipDeviceReset());
// After reset all memory objects will be destroyed hence allocating them again
// Intension is to use hipStreamPerThread successfully after reset hence not validating
@@ -95,5 +95,5 @@ TEST_CASE("Unit_hipStreamPerThread_DeviceReset_2") {
status = hipMemcpyAsync(A_d, A_h, ele_size * sizeof(int), hipMemcpyHostToDevice,
hipStreamPerThread);
if (status != hipSuccess) return;
hipStreamSynchronize(hipStreamPerThread);
HIP_CHECK(hipStreamSynchronize(hipStreamPerThread));
}