From d424664592680c69377c9d4e73ce82dbe9218c89 Mon Sep 17 00:00:00 2001 From: "Dittakavi, Satyanvesh" Date: Mon, 18 Aug 2025 18:27:13 +0530 Subject: [PATCH] SWDEV-523177 - Fix the Unit_hipEventCreateWithFlags_DisableSystemFence_CohHstMem test (#131) * SWDEV-523177 - Fix the Unit_hipEventCreateWithFlags_DisableSystemFence_CohHstMem test * Fix the hip nvidia psdb failure [ROCm/hip-tests commit: 41af8e62cac0b567970e461754fca2f547164b1e] --- projects/hip-tests/catch/include/hip_test_kernels.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/hip-tests/catch/include/hip_test_kernels.hh b/projects/hip-tests/catch/include/hip_test_kernels.hh index 68f452ba53..e47614ee65 100644 --- a/projects/hip-tests/catch/include/hip_test_kernels.hh +++ b/projects/hip-tests/catch/include/hip_test_kernels.hh @@ -93,7 +93,12 @@ template __global__ void vector_square(const T* A_d, T* C_d, size_t size_t gputhread = (blockIdx.x * blockDim.x + threadIdx.x); size_t stride = blockDim.x * gridDim.x; for (size_t i = gputhread; i < N_ELMTS; i += stride) { +#if HT_AMD + T result = A_d[i] * A_d[i]; + __hip_atomic_store(&C_d[i], result, __ATOMIC_RELAXED, __HIP_MEMORY_SCOPE_SYSTEM); +#else C_d[i] = A_d[i] * A_d[i]; +#endif } }