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 authored and GitHub committed 2022-08-30 16:53:21 -07:00
1 parent ba5a0b9af5
commit d0aaed906d
24 files changed
+100 -99

No files matched your search

@@ -44,7 +44,7 @@ void runTest(const int width, const float offsetX) {
hipChannelFormatDesc channelDesc = hipCreateChannelDesc(
32, 0, 0, 0, hipChannelFormatKindFloat);
hipArray *hipArray;
hipMallocArray(&hipArray, &channelDesc, width);
HIP_CHECK(hipMallocArray(&hipArray, &channelDesc, width));
HIP_CHECK(hipMemcpy2DToArray(hipArray, 0, 0, hData, width * sizeof(float), width * sizeof(float), 1, hipMemcpyHostToDevice));
@@ -66,7 +66,7 @@ void runTest(const int width, const float offsetX) {
HIP_CHECK(hipCreateTextureObject(&textureObject, &resDesc, &texDesc, NULL));
float *dData = nullptr;
hipMalloc((void**) &dData, size);
HIP_CHECK(hipMalloc((void**) &dData, size));
dim3 dimBlock(16, 1, 1);
dim3 dimGrid((width + dimBlock.x - 1)/ dimBlock.x, 1, 1);
@@ -74,11 +74,11 @@ void runTest(const int width, const float offsetX) {
hipLaunchKernelGGL(tex1DKernel<normalizedCoords>, dimGrid, dimBlock, 0, 0, dData,
textureObject, width, offsetX);
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 j = 0; j < width; j++) {
@@ -91,9 +91,9 @@ void runTest(const int width, const float offsetX) {
}
}
hipDestroyTextureObject(textureObject);
hipFree(dData);
hipFreeArray(hipArray);
HIP_CHECK(hipDestroyTextureObject(textureObject));
HIP_CHECK(hipFree(dData));
HIP_CHECK(hipFreeArray(hipArray));
free(hData);
free(hOutputData);
REQUIRE(result);