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

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

Change-Id: I3d171540403f74222e631d1a8e393386461c9729
This commit is contained in:
ROCm CI Service Account
2022-08-31 05:23:21 +05:30
committed by GitHub
parent ba5a0b9af5
commit d0aaed906d
24 changed files with 100 additions and 99 deletions
@@ -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));
}