From e6e38146f627a45143c2d9b1a87b580f2b142840 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Tue, 6 Jun 2023 01:27:20 +0530 Subject: [PATCH] SWDEV-390281 - Pass correct vector size. (#221) Change-Id: I485b6560ff2a2445970a7c6d720a9f8a9fa88164 [ROCm/hip-tests commit: 5a8fabd4e7d19bfc40d4ad5bb870ec4ab1ad864d] --- .../hip-tests/catch/unit/memory/hipMemRangeGetAttribute.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/catch/unit/memory/hipMemRangeGetAttribute.cc b/projects/hip-tests/catch/unit/memory/hipMemRangeGetAttribute.cc index 447a3a0b56..ed58d0e272 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemRangeGetAttribute.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemRangeGetAttribute.cc @@ -267,7 +267,7 @@ TEST_CASE("Unit_hipMemRangeGetAttribute_Positive_AccessedBy_MultiDevice") { LinearAllocGuard allocation(LinearAllocs::hipMallocManaged, kPageSize); std::vector data(device_count); - HIP_CHECK(hipMemRangeGetAttribute(data.data(), sizeof(data), hipMemRangeAttributeAccessedBy, + HIP_CHECK(hipMemRangeGetAttribute(data.data(), sizeof(int32_t) * data.size(), hipMemRangeAttributeAccessedBy, allocation.ptr(), kPageSize)); for (auto device : data) { @@ -278,7 +278,7 @@ TEST_CASE("Unit_hipMemRangeGetAttribute_Positive_AccessedBy_MultiDevice") { HIP_CHECK(hipMemAdvise(allocation.ptr(), kPageSize, hipMemAdviseSetAccessedBy, device)); } - HIP_CHECK(hipMemRangeGetAttribute(data.data(), sizeof(data), hipMemRangeAttributeAccessedBy, + HIP_CHECK(hipMemRangeGetAttribute(data.data(), sizeof(int32_t) * data.size(), hipMemRangeAttributeAccessedBy, allocation.ptr(), kPageSize)); // Use std::find since there is no guaranteed order in which devices will be returned