From 01b49548f9aaf4e77b1bfb375961098d8191cd6f Mon Sep 17 00:00:00 2001 From: Julia Jiang Date: Thu, 14 Aug 2025 16:05:50 -0400 Subject: [PATCH] SWDEV-524348 - Update description for multiProcessorCount --- include/hip/hip_deprecated.h | 5 ++++- include/hip/hip_runtime_api.h | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/hip/hip_deprecated.h b/include/hip/hip_deprecated.h index 5cc578321e..1995b49afb 100644 --- a/include/hip/hip_deprecated.h +++ b/include/hip/hip_deprecated.h @@ -23,7 +23,10 @@ typedef struct hipDeviceProp_tR0000 { int minor; ///< Minor compute capability. On HCC, this is an approximation and features may ///< differ from CUDA CC. See the arch feature flags for portable ways to query ///< feature caps. - int multiProcessorCount; ///< Number of multi-processors (compute units). + int multiProcessorCount; ///< Number of multi-processors. When the GPU works in Compute + ///< Unit (CU) mode, this value equals the number of CUs; + ///< when in Workgroup Processor (WGP) mode, this value equels + ///< half of CUs, because a single WGP contains two CUs. int l2CacheSize; ///< L2 cache size. int maxThreadsPerMultiProcessor; ///< Maximum resident threads per multi-processor. int computeMode; ///< Compute mode. diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h index 5cef2b6bf3..56d8aa6bac 100644 --- a/include/hip/hip_runtime_api.h +++ b/include/hip/hip_runtime_api.h @@ -137,7 +137,10 @@ typedef struct hipDeviceProp_t { size_t textureAlignment; ///< Alignment requirement for textures size_t texturePitchAlignment; ///< Pitch alignment requirement for texture references bound to int deviceOverlap; ///< Deprecated. Use asyncEngineCount instead - int multiProcessorCount; ///< Number of multi-processors (compute units). + int multiProcessorCount; ///< Number of multi-processors. When the GPU works in Compute + ///< Unit (CU) mode, this value equals the number of CUs; + ///< when in Workgroup Processor (WGP) mode, this value equels + ///< half of CUs, because a single WGP contains two CUs. int kernelExecTimeoutEnabled; ///< Run time limit for kernels executed on the device int integrated; ///< APU vs dGPU int canMapHostMemory; ///< Check whether HIP can map host memory @@ -507,7 +510,10 @@ typedef enum hipDeviceAttribute_t { hipDeviceAttributeComputeCapabilityMinor, ///< Minor compute capability version number. hipDeviceAttributeMultiGpuBoardGroupID, ///< Unique ID of device group on the same multi-GPU ///< board - hipDeviceAttributeMultiprocessorCount, ///< Number of multiprocessors on the device. + hipDeviceAttributeMultiprocessorCount, ///< Number of multi-processors. When the GPU works in Compute + ///< Unit (CU) mode, this value equals the number of CUs; + ///< when in Workgroup Processor (WGP) mode, this value equels + ///< half of CUs, because a single WGP contains two CUs. hipDeviceAttributeUnused1, ///< Previously hipDeviceAttributeName hipDeviceAttributePageableMemoryAccess, ///< Device supports coherently accessing pageable memory ///< without calling hipHostRegister on it