Device property memoryBusWidth implementation.

+ Device property memoryBusWidth is added to hipDeviceProp_t struct.
+ Device attribute hipDeviceAttributeMemoryBusWidth is added to hipDeviceAttribute_t struct.
+ Tests update.
Этот коммит содержится в:
Evgeny Mankov
2016-02-18 18:15:01 +03:00
родитель 617e7d8a7d
Коммит 1c19dbb807
5 изменённых файлов: 17 добавлений и 6 удалений
+3 -1
Просмотреть файл
@@ -81,7 +81,8 @@ typedef struct hipDeviceProp_t {
int maxThreadsDim[3]; ///< Max number of threads in each dimension (XYZ) of a block.
int maxGridSize[3]; ///< Max grid dimensions (XYZ).
int clockRate; ///< Max clock frequency of the multiProcessors in khz.
int memoryClockRate; ///< Max memory clock frequency in khz.
int memoryClockRate; ///< Max global memory clock frequency in khz.
int memoryBusWidth; ///< Global memory bus width in bits.
size_t totalConstMem; ///< Size of shared memory region (in bytes).
int major; ///< Major 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 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.
@@ -145,6 +146,7 @@ typedef enum hipDeviceAttribute_t {
hipDeviceAttributeMaxRegistersPerBlock, ///< Maximum number of 32-bit registers available to a thread block. This number is shared by all thread blocks simultaneously resident on a multiprocessor.
hipDeviceAttributeClockRate, ///< Peak clock frequency in kilohertz.
hipDeviceAttributeMemoryClockRate, ///< Peak memory clock frequency in kilohertz.
hipDeviceAttributeMemoryBusWidth, ///< Global memory bus width in bits.
hipDeviceAttributeMultiprocessorCount, ///< Number of multiprocessors on the device.
hipDeviceAttributeComputeMode, ///< Compute mode that device is currently in.
hipDeviceAttributeL2CacheSize, ///< Size of L2 cache in bytes. 0 if the device doesn't have L2 cache.
+3 -1
Просмотреть файл
@@ -243,7 +243,9 @@ inline static hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t att
case hipDeviceAttributeClockRate:
cdattr = cudaDevAttrClockRate; break;
case hipDeviceAttributeMemoryClockRate:
cdattr = cudaDevAttrMemoryClockRate:; break;
cdattr = cudaDevAttrMemoryClockRate; break;
case hipDeviceAttributeMemoryBusWidth:
cdattr = cudaDevAttrGlobalMemoryBusWidth; break;
case hipDeviceAttributeMultiprocessorCount:
cdattr = cudaDevAttrMultiProcessorCount; break;
case hipDeviceAttributeComputeMode: