From d3b8eb6ce14bc2db5b7dba354201de05a09bfc12 Mon Sep 17 00:00:00 2001 From: "GunaShekar, Ajay" Date: Tue, 13 May 2025 01:20:34 +0530 Subject: [PATCH] SWDEV-522333 - hipDeviceGetPCIBusId relax format sizes (#33) [ROCm/hip-tests commit: fd8833cc8344f2927da2791c835a8c4be3feaa2c] --- .../hip-tests/catch/unit/device/hipDeviceGetByPCIBusId.cc | 7 ++++--- .../catch/unit/device/hipGetProcAddressDevMgmt.cc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/hip-tests/catch/unit/device/hipDeviceGetByPCIBusId.cc b/projects/hip-tests/catch/unit/device/hipDeviceGetByPCIBusId.cc index 6da336603d..275eca1015 100644 --- a/projects/hip-tests/catch/unit/device/hipDeviceGetByPCIBusId.cc +++ b/projects/hip-tests/catch/unit/device/hipDeviceGetByPCIBusId.cc @@ -28,7 +28,7 @@ * Returns a handle to a compute device. */ -#define SIZE 13 +#define SIZE 20 /** * Test Description @@ -53,9 +53,10 @@ TEST_CASE("Unit_hipDeviceGetByPCIBusId_Functional") { int pciDomainID = -1; int tempPciBusId = -1; int tempDeviceId = -1; + int pciFunction = -1; HIP_CHECK(hipDeviceGetPCIBusId(&pciBusId[0], SIZE, i)); - sscanf(pciBusId, "%04x:%02x:%02x", &pciDomainID, - &pciBusID, &pciDeviceID); + REQUIRE(sscanf(pciBusId, "%x:%x:%x.%x", &pciDomainID, + &pciBusID, &pciDeviceID, &pciFunction) == 4); HIP_CHECK(hipDeviceGetAttribute(&tempPciBusId, hipDeviceAttributePciBusId, i)); diff --git a/projects/hip-tests/catch/unit/device/hipGetProcAddressDevMgmt.cc b/projects/hip-tests/catch/unit/device/hipGetProcAddressDevMgmt.cc index bd9196b7f9..767900828e 100644 --- a/projects/hip-tests/catch/unit/device/hipGetProcAddressDevMgmt.cc +++ b/projects/hip-tests/catch/unit/device/hipGetProcAddressDevMgmt.cc @@ -29,7 +29,7 @@ THE SOFTWARE. hipDriverProcAddressQueryResult* symbolStatus);` - * Gets the symbol's function address. */ -constexpr int size = 13; +constexpr int size = 20; constexpr size_t len = 256; void CreateMemPool(int device, hipMemPool_t &mem_pool) { hipMemPoolProps kPoolProps;