SWDEV-413997 - Fixing test cases where setaccess is missed and validation data structure not updated.

Change-Id: I65d8e77b7ce9b4378b56cfa85c50ed23af69dd90


[ROCm/hip-tests commit: 7d0f8e43b7]
This commit is contained in:
kjayapra-amd
2024-03-29 14:32:53 -04:00
committed by Karthik Jayaprakash
parent 4ecda67e71
commit a44a5b896d
2 changed files with 15 additions and 1 deletions
@@ -361,11 +361,17 @@ TEST_CASE("Unit_hipMemSetAccess_FuncTstOnMultDev") {
accessDesc.flags = hipMemAccessFlagsProtReadWrite;
// Make the address accessible to GPU deviceId
std::vector<int> A_h(N), B_h(N);
// Set Device, for kernel launch to be launched in the right device.
HIP_CHECK(hipMemSetAccess(ptrA, size_mem, &accessDesc, 1));
for (int idx = 0; idx < N; idx++) {
A_h[idx] = idx;
}
HIP_CHECK(hipMemcpyHtoD(ptrA, A_h.data(), buffer_size));
// Set the A_h to verify with square kernel.
for (int idx = 0; idx < N; idx++) {
A_h[idx] = idx * idx;
}
HIP_CHECK(hipSetDevice(deviceId));
// Launch square kernel
hipLaunchKernelGGL(square_kernel, dim3(N / THREADS_PER_BLOCK), dim3(THREADS_PER_BLOCK), 0, 0,
static_cast<int*>(ptrA));