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]
이 커밋은 다음에 포함됨:
@@ -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);
|
||||
|
||||
새 이슈에서 참조
사용자 차단