From 64215d55e714ed9d9f33a84e9aea8622a794006b Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Tue, 12 Sep 2023 12:54:14 +0000 Subject: [PATCH] SWDEV-420738 - Fix Unit_hipTextureObj3DCheckModes issue due to hipGetLastError change Change-Id: I3f6efe6f995a2cf041a6f74000fec236298c34a7 [ROCm/hip-tests commit: d517f0175c12b1d2f717522b88fa59e0687fd838] --- .../catch/unit/texture/hipTextureObj3DCheckModes.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/catch/unit/texture/hipTextureObj3DCheckModes.cc b/projects/hip-tests/catch/unit/texture/hipTextureObj3DCheckModes.cc index 5746d5ae53..2d50317b58 100644 --- a/projects/hip-tests/catch/unit/texture/hipTextureObj3DCheckModes.cc +++ b/projects/hip-tests/catch/unit/texture/hipTextureObj3DCheckModes.cc @@ -120,8 +120,11 @@ static void runTest(const int width, const int height, const int depth, const fl dim3 dimGrid((width + dimBlock.x - 1) / dimBlock.x, (height + dimBlock.y - 1) / dimBlock.y, (depth + dimBlock.z - 1) / dimBlock.z); - hipLaunchKernelGGL(tex3DKernel, dimGrid, dimBlock, 0, 0, dData, textureObject, - width, height, depth, offsetX, offsetY, offsetZ); + // Resets any prior last error to hipSuccess, so that the hipGetLastError after the + // kernel launch will not return the earlier errors + res = hipGetLastError(); + hipLaunchKernelGGL(tex3DKernel, dimGrid, dimBlock, 0, 0, dData, + textureObject, width, height, depth, offsetX, offsetY, offsetZ); HIP_CHECK(hipGetLastError()); HIP_CHECK(hipDeviceSynchronize());