CUDNN LOG
CUDNN V7 introduce the ability to log CUDNN calls and their parameters by setting the CUDNN_LOGINFO_DBG
and CUDNN_LOGDEST_DBG
environment variables
CUDNN_LOGINFO_DBG=1 CUDNN_LOGDEST_DBG=cudnn.log ./prog
An excerpt of a cudnn.log
file is shown here
I! CuDNN (v7501) function cudnnFindConvolutionForwardAlgorithm() called:
i! handle: type=cudnnHandle_t; streamId=0x7fa5880083d0;
i! srcDesc: type=cudnnTensorDescriptor_t:
i! dataType: type=cudnnDataType_t; val=CUDNN_DATA_FLOAT (0);
i! nbDims: type=int; val=4;
i! dimA: type=int; val=[1,3,224,224];
i! strideA: type=int; val=[150528,50176,224,1];
i! filterDesc: type=cudnnFilterDescriptor_t:
i! dataType: type=cudnnDataType_t; val=CUDNN_DATA_FLOAT (0);
i! vect: type=int; val=0;
i! nbDims: type=int; val=4;
i! dimA: type=int; val=[96,3,11,11];
i! format: type=cudnnTensorFormat_t; val=CUDNN_TENSOR_NCHW (0);
i! convDesc: type=cudnnConvolutionDescriptor_t:
i! mode: type=cudnnConvolutionMode_t; val=CUDNN_CROSS_CORRELATION (1);
i! dataType: type=cudnnDataType_t; val=CUDNN_DATA_FLOAT (0);
i! mathType: type=cudnnMathType_t; val=CUDNN_DEFAULT_MATH (0);
i! arrayLength: type=int; val=2;
i! padA: type=int; val=[0,0];
i! strideA: type=int; val=[4,4];
i! dilationA: type=int; val=[1,1];
i! groupCount: type=int; val=1;
i! destDesc: type=cudnnTensorDescriptor_t:
i! dataType: type=cudnnDataType_t; val=CUDNN_DATA_FLOAT (0);
i! nbDims: type=int; val=4;
i! dimA: type=int; val=[1,96,54,54];
i! strideA: type=int; val=[279936,2916,54,1];
i! requestedAlgoCount: type=int; val=10;
i! Time: 2019-06-04T18:09:15.727680 (0d+0h+0m+5s since start)
i! Process=18690; Thread=18798; GPU=0; Handle=0x7fa5880ddba0; StreamId=0x7fa5880083d0.
Is parsed into the following JSON file
[
{
"function_kind": "FindConvolutionForwardAlgorithm",
"function_name": "cudnnFindConvolutionForwardAlgorithm",
"time_stamp": "2019-06-04T18:09:15.72768Z",
"attributes": {
"handle": {
"opinfo": {
"streamId": 140348928066512,
"type": "cudnnHandle_t"
}
},
"filterDesc": {
"format": {
"val": "CUDNN_TENSOR_NCHW (0)",
"type": "cudnnTensorFormat_t"
},
"opinfo": {
"type": "cudnnFilterDescriptor_t"
},
"dataType": {
"val": "CUDNN_DATA_FLOAT (0)",
"type": "cudnnDataType_t"
},
"vect": {
"type": "int",
"val": 0
},
"nbDims": {
"val": 4,
"type": "int"
},
"dimA": {
"val": [96, 3, 11, 11],
"type": "int"
}
},
"destDesc": {
"dataType": {
"type": "cudnnDataType_t",
"val": "CUDNN_DATA_FLOAT (0)"
},
"nbDims": {
"val": 4,
"type": "int"
},
"dimA": {
"type": "int",
"val": [1, 96, 54, 54]
},
"strideA": {
"type": "int",
"val": [279936, 2916, 54, 1]
},
"opinfo": {
"type": "cudnnTensorDescriptor_t"
}
},
"FunctionKind": "FindConvolutionForwardAlgorithm",
"TimeStamp": "2019-06-04T18:09:15.72768Z",
"srcDesc": {
"opinfo": {
"type": "cudnnTensorDescriptor_t"
},
"dataType": {
"type": "cudnnDataType_t",
"val": "CUDNN_DATA_FLOAT (0)"
},
"nbDims": {
"type": "int",
"val": 4
},
"dimA": {
"type": "int",
"val": [1, 3, 224, 224]
},
"strideA": {
"type": "int",
"val": [150528, 50176, 224, 1]
}
},
"convDesc": {
"opinfo": {
"type": "cudnnConvolutionDescriptor_t"
},
"mathType": {
"type": "cudnnMathType_t",
"val": "CUDNN_DEFAULT_MATH (0)"
},
"strideA": {
"type": "int",
"val": [4, 4]
},
"groupCount": {
"type": "int",
"val": 1
},
"padA": {
"val": [0, 0],
"type": "int"
},
"mode": {
"val": "CUDNN_CROSS_CORRELATION (1)",
"type": "cudnnConvolutionMode_t"
},
"arrayLength": {
"type": "int",
"val": 2
},
"dataType": {
"val": "CUDNN_DATA_FLOAT (0)",
"type": "cudnnDataType_t"
},
"dilationA": {
"type": "int",
"val": [1, 1]
}
},
"requestedAlgoCount": {
"opinfo": {
"val": 10,
"type": "int"
}
},
"FunctionName": "cudnnFindConvolutionForwardAlgorithm",
"Duration": 0
}
}
]
Full Example
A full example of a log for the MobileNet-v2 model running on Tesla V100-SXM2-16GB using MXNet be found in different formats at