Change-Id: I59f3ad20b9bdadf77bd1e0725f7a401d7ad423a3


[ROCm/clr commit: 8933c078f6]
Tento commit je obsažen v:
Jason Tang
2020-06-12 17:05:16 -04:00
odevzdal Jason Tang
rodič 315cd2f959
revize ab081f39cc
5 změnil soubory, kde provedl 9 přidání a 1 odebrání
+3 -1
Zobrazit soubor
@@ -138,6 +138,7 @@ typedef struct hipDeviceProp_t {
int cooperativeMultiDeviceUnmatchedSharedMem; ///< HIP device supports cooperative launch on multiple
///devices with unmatched shared memories
int isLargeBar; ///< 1: if it is a large PCI bar device, else 0
int asicRevision; ///< Revision of the GPU in this device.
} hipDeviceProp_t;
@@ -345,8 +346,9 @@ typedef enum hipDeviceAttribute_t {
///devices with unmatched grid dimensions
hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim, ///< Supports cooperative launch on multiple
///devices with unmatched block dimensions
hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem ///< Supports cooperative launch on multiple
hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem, ///< Supports cooperative launch on multiple
///devices with unmatched shared memories
hipDeviceAttributeAsicRevision ///< Revision of the GPU in this device
} hipDeviceAttribute_t;
enum hipComputeMode {
+1
Zobrazit soubor
@@ -233,6 +233,7 @@ hipError_t hipGetDeviceProperties ( hipDeviceProp_t* props, hipDevice_t device )
deviceProps.kernelExecTimeoutEnabled = 0;
deviceProps.ECCEnabled = info.errorCorrectionSupport_? 1:0;
deviceProps.isLargeBar = info.largeBar_ ? 1 : 0;
deviceProps.asicRevision = info.asicRevision_;
*props = deviceProps;
HIP_RETURN(hipSuccess);
+3
Zobrazit soubor
@@ -296,6 +296,9 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device)
case hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem:
*pi = prop.cooperativeMultiDeviceUnmatchedSharedMem;
break;
case hipDeviceAttributeAsicRevision:
*pi = prop.asicRevision;
break;
default:
HIP_RETURN(hipErrorInvalidValue);
}
+1
Zobrazit soubor
@@ -147,6 +147,7 @@ void printDeviceProp(int deviceId) {
cout << setw(w1) << "maxTexture3D.height: " << props.maxTexture3D[1] << endl;
cout << setw(w1) << "maxTexture3D.depth: " << props.maxTexture3D[2] << endl;
cout << setw(w1) << "isLargeBar: " << props.isLargeBar << endl;
cout << setw(w1) << "asicRevision: " << props.asicRevision << endl;
int deviceCnt;
hipGetDeviceCount(&deviceCnt);
@@ -145,5 +145,6 @@ int main(int argc, char* argv[]) {
CHECK(test_hipDeviceGetAttribute(deviceId, hipDeviceAttributeKernelExecTimeout, props.kernelExecTimeoutEnabled));
CHECK(test_hipDeviceGetAttribute(deviceId, hipDeviceAttributeCanMapHostMemory, props.canMapHostMemory));
CHECK(test_hipDeviceGetAttribute(deviceId, hipDeviceAttributeEccEnabled, props.ECCEnabled));
CHECK(test_hipDeviceGetAttribute(deviceId, hipDeviceAttributeAsicRevision, props.asicRevision));
passed();
};