diff --git a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h index 870dcc5dae..dbd6d8b300 100644 --- a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h @@ -597,6 +597,10 @@ inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t *p_prop, int dev p_prop->arch.hasDynamicParallelism = (ccVers >= 350); p_prop->concurrentKernels = cdprop.concurrentKernels; + p_prop->pciBusID = cdprop.pciBusID; + p_prop->pciDeviceID = cdprop.pciDeviceID; + p_prop->maxSharedMemoryPerMultiProcessor = cdprop.sharedMemPerMultiprocessor; + p_prop->isMultiGpuBoard = cdprop.isMultiGpuBoard; return hipCUDAErrorTohipError(cerror); } diff --git a/projects/hip/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp b/projects/hip/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp index 8e55e2f699..2919939694 100644 --- a/projects/hip/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp +++ b/projects/hip/tests/src/runtimeApi/device/hipGetDeviceAttribute.cpp @@ -39,14 +39,14 @@ THE SOFTWARE. exit(EXIT_FAILURE);\ } -hipError_t test_hipDeviceGetAttribute(int deviceId, hipDeviceAttribute_t attr, int expectedValue = 0) +hipError_t test_hipDeviceGetAttribute(int deviceId, hipDeviceAttribute_t attr, int expectedValue = -1) { int value = 0; std::cout << "Test hipDeviceGetAttribute attribute " << attr; - if (expectedValue) { std::cout << " expected value " << expectedValue; } + if (expectedValue != -1) { std::cout << " expected value " << expectedValue; } hipError_t e = hipDeviceGetAttribute(&value, attr, deviceId); std::cout << " actual value " << value << std::endl; - if (expectedValue && value != expectedValue) { + if ((expectedValue != -1) && value != expectedValue) { std::cout << "fail" << std::endl; return hipErrorInvalidValue; }