This section describes the error log management functions of the CUDA runtime application programming interface. The Error Log Management interface will operate on both the CUDA Driver and CUDA Runtime.
Logs generated by the driver are stored in an internal buffer and can be copied out using this API. This API dumps all driver logs starting fromiterator intopathToFile provided.
iterator is auto-advancing. Dumping logs will update the value ofiterator to receive the next generated log.
The driver reserves limited memory for storing logs. The oldest logs may be overwritten and become unrecoverable. An indication will appear in the destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this risk.
Logs generated by the driver are stored in an internal buffer and can be copied out using this API. This API dumps driver logs fromiterator intobuffer up to the size specified in*size. The driver will always null terminate the buffer but there will not be a null character between log entries, only a newline \n. The driver will then return the actual number of bytes written in*size, excluding the null terminator. If there are no messages to dump,*size will be set to 0 and the function will returnCUDA_SUCCESS. If the providedbuffer is not large enough to hold any messages,*size will be set to 0 and the function will returnCUDA_ERROR_INVALID_VALUE.
iterator is auto-advancing. Dumping logs will update the value ofiterator to receive the next generated log.
The driver reserves limited memory for storing logs. The maximum size of the buffer is 25600 bytes. The oldest logs may be overwritten and become unrecoverable. An indication will appear in the destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this risk.
If the provided value in*size is not large enough to hold all buffered messages, a message will be added at the head of the buffer indicating this. The driver then computes the number of messages it is able to store inbuffer and writes it out. The final message inbuffer will always be the most recent log message as of when the API is called.