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]
이 커밋은 다음에 포함됨:
ROCm CI Service Account
2022-08-31 05:23:21 +05:30
커밋한 사람 GitHub
부모 825bd9b2ce
커밋 1c54135503
24개의 변경된 파일100개의 추가작업 그리고 99개의 파일을 삭제
+7 -7
파일 보기
@@ -51,7 +51,7 @@ void runTest(const int width, const int height, const float offsetX, const float
hipChannelFormatDesc channelDesc = hipCreateChannelDesc(
32, 0, 0, 0, hipChannelFormatKindFloat);
hipArray *hipArray;
hipMallocArray(&hipArray, &channelDesc, width, height);
HIP_CHECK(hipMallocArray(&hipArray, &channelDesc, width, height));
HIP_CHECK(hipMemcpy2DToArray(hipArray, 0, 0, hData, width * sizeof(float), width * sizeof(float), height, hipMemcpyHostToDevice));
@@ -74,7 +74,7 @@ void runTest(const int width, const int height, const float offsetX, const float
HIP_CHECK(hipCreateTextureObject(&textureObject, &resDesc, &texDesc, NULL));
float *dData = nullptr;
hipMalloc((void**) &dData, size);
HIP_CHECK(hipMalloc((void**) &dData, size));
dim3 dimBlock(16, 16, 1);
dim3 dimGrid((width + dimBlock.x - 1) / dimBlock.x, (height + dimBlock.y -1)/ dimBlock.y, 1);
@@ -82,11 +82,11 @@ void runTest(const int width, const int height, const float offsetX, const float
hipLaunchKernelGGL(tex2DKernel<normalizedCoords>, dimGrid, dimBlock, 0, 0, dData,
textureObject, width, height, offsetX, offsetY);
hipDeviceSynchronize();
HIP_CHECK(hipDeviceSynchronize());
float *hOutputData = (float*) malloc(size);
memset(hOutputData, 0, size);
hipMemcpy(hOutputData, dData, size, hipMemcpyDeviceToHost);
HIP_CHECK(hipMemcpy(hOutputData, dData, size, hipMemcpyDeviceToHost));
bool result = true;
for (int i = 0; i < height; i++) {
@@ -103,9 +103,9 @@ void runTest(const int width, const int height, const float offsetX, const float
}
}
line1:
hipDestroyTextureObject(textureObject);
hipFree(dData);
hipFreeArray(hipArray);
HIP_CHECK(hipDestroyTextureObject(textureObject));
HIP_CHECK(hipFree(dData));
HIP_CHECK(hipFreeArray(hipArray));
free(hData);
free(hOutputData);
REQUIRE(result);