|
|
DriveWorks SDK Reference| 0.6.67 Release |
Defines Deep Neural Network (DNN) module for performing inference using NVIDIA® TensorRT™ models.
Data Structures | |
| struct | dwDNNMetaData |
| Specifies TensorRT model header. More... | |
Modules | |
| DNN Types | |
| Defines structures used by DNN and DNN related modules. | |
Typedefs | |
| typedef struct dwDNNObject const * | dwConstDNNHandle_t |
| typedef struct dwDNNObject * | dwDNNHandle_t |
| Handles representing Deep Neural Network interface. More... | |
Functions | |
| DW_API_PUBLIC dwStatus | dwDNN_getCUDAStream (cudaStream_t *stream, dwDNNHandle_t network) |
| Gets the CUDA stream used by the feature list. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getInputBlobCount (uint16_t *count, dwDNNHandle_t network) |
| Gets the input blob count. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getInputIndex (uint16_t *blobIndex, const char *blobName, dwDNNHandle_t network) |
| Gets the index of an input blob with a given blob name. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getInputSize (dwBlobSize *blobSize, uint16_t blobIndex, dwDNNHandle_t network) |
| Gets the input blob size at blobIndex. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getMetaData (dwDNNMetaData *metaData, dwDNNHandle_t network) |
| Returns the metadata for the associated network model. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getOutputBlobCount (uint16_t *count, dwDNNHandle_t network) |
| Gets the output blob count. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getOutputIndex (uint16_t *blobIndex, const char *blobName, dwDNNHandle_t network) |
| Gets the index of an output blob with a given blob name. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_getOutputSize (dwBlobSize *blobSize, uint16_t blobIndex, dwDNNHandle_t network) |
| Gets the output blob size at blobIndex. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_infer (float32_t **d_output, float32_t **d_input, dwDNNHandle_t network) |
| Forwards pass from all input blobs to all output blobs. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_inferSIO (float32_t *d_output, float32_t *d_input, dwDNNHandle_t network) |
| Forwards pass from the first input blob to the first output blob (a shortcut for a single input - single output network). More... | |
| DW_API_PUBLIC dwStatus | dwDNN_initializeTensorRTFromFile (dwDNNHandle_t *network, dwContextHandle_t context, const char *modelFilename) |
| Creates and initializes a TensorRT Network from file. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_initializeTensorRTFromMemory (dwDNNHandle_t *network, dwContextHandle_t context, const char *modelContent, uint32_t modelContentSize) |
| Creates and initializes a TensorRT Network from memory. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_release (dwDNNHandle_t *network) |
| Releases a given network. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_reset (dwDNNHandle_t network) |
| Resets a given network. More... | |
| DW_API_PUBLIC dwStatus | dwDNN_setCUDAStream (cudaStream_t stream, dwDNNHandle_t network) |
| Sets the CUDA stream for infer operations. More... | |
| struct dwDNNMetaData |
| Data Fields | ||
|---|---|---|
| dwDataConditionerParams | dataConditionerParams | DataConditioner parameters for running this network. |
| dwTonemapType | tonemapType | |
| typedef struct dwDNNObject const* dwConstDNNHandle_t |
| typedef struct dwDNNObject* dwDNNHandle_t |
| DW_API_PUBLIC dwStatus dwDNN_getCUDAStream | ( | cudaStream_t * | stream, |
| dwDNNHandle_t | network | ||
| ) |
Gets the CUDA stream used by the feature list.
| [out] | stream | The CUDA stream currently used. |
| [in] | network | A handle to the DNN module. |
| DW_API_PUBLIC dwStatus dwDNN_getInputBlobCount | ( | uint16_t * | count, |
| dwDNNHandle_t | network | ||
| ) |
Gets the input blob count.
| [out] | count | A pointer to the number of input blobs. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getInputIndex | ( | uint16_t * | blobIndex, |
| const char * | blobName, | ||
| dwDNNHandle_t | network | ||
| ) |
Gets the index of an input blob with a given blob name.
| [out] | blobIndex | A pointer to the index of the blob with the given name. |
| [in] | blobName | A pointer to the name of an input blob. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getInputSize | ( | dwBlobSize * | blobSize, |
| uint16_t | blobIndex, | ||
| dwDNNHandle_t | network | ||
| ) |
Gets the input blob size at blobIndex.
| [out] | blobSize | A pointer to the where the input blob size is returned. |
| [in] | blobIndex | Specifies the blob index; must be in the range [0 dwDNN_getInputBlobCount()-1]. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getMetaData | ( | dwDNNMetaData * | metaData, |
| dwDNNHandle_t | network | ||
| ) |
Returns the metadata for the associated network model.
| [out] | metaData | A pointer to a metadata structure. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getOutputBlobCount | ( | uint16_t * | count, |
| dwDNNHandle_t | network | ||
| ) |
Gets the output blob count.
| [out] | count | A pointer to the number of output blobs. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getOutputIndex | ( | uint16_t * | blobIndex, |
| const char * | blobName, | ||
| dwDNNHandle_t | network | ||
| ) |
Gets the index of an output blob with a given blob name.
| [out] | blobIndex | A pointer to the index of the blob with the given name. |
| [in] | blobName | A pointer to the name of an output blob. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_getOutputSize | ( | dwBlobSize * | blobSize, |
| uint16_t | blobIndex, | ||
| dwDNNHandle_t | network | ||
| ) |
Gets the output blob size at blobIndex.
| [out] | blobSize | A pointer to the where the output blob size is returned. |
| [in] | blobIndex | Specifies the blob index; must be in the range [0 dwDNN_getOutputBlobCount()-1]. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_infer | ( | float32_t ** | d_output, |
| float32_t ** | d_input, | ||
| dwDNNHandle_t | network | ||
| ) |
Forwards pass from all input blobs to all output blobs.
| [out] | d_output | A pointer to an array of pointers to the input blobs in GPU Memory. |
| [in] | d_input | A pointer to an array of pointers to the output blobs in GPU Memory. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_inferSIO | ( | float32_t * | d_output, |
| float32_t * | d_input, | ||
| dwDNNHandle_t | network | ||
| ) |
Forwards pass from the first input blob to the first output blob (a shortcut for a single input - single output network).
| [out] | d_output | A pointer to the output blob in GPU memory. |
| [in] | d_input | A pointer to the input blob in GPU memory. |
| [in] | network | Network handle created with dwDNN_initialize(). |
| DW_API_PUBLIC dwStatus dwDNN_initializeTensorRTFromFile | ( | dwDNNHandle_t * | network, |
| dwContextHandle_t | context, | ||
| const char * | modelFilename | ||
| ) |
Creates and initializes a TensorRT Network from file.
| [out] | network | A pointer to network handle that will be initialized from parameters. |
| [in] | context | Specifies the handle to the context under which the DNN module is created. |
| [in] | modelFilename | A pointer to the name of the TensorRT model file. |
{
"dataConditionerParams" : {
"meanValue" : [0.0, 0.0, 0.0],
"splitPlanes" : true,
"pixelScaleCoefficient": 1.0,
"preprocessor": "none",
"__comment": "preprocessor can be one of {none, logwb, agtm}",
"ignoreAspectRatio" : false,
"doPerPlaneMeanNormalization" : false
}
}
\ | DW_API_PUBLIC dwStatus dwDNN_initializeTensorRTFromMemory | ( | dwDNNHandle_t * | network, |
| dwContextHandle_t | context, | ||
| const char * | modelContent, | ||
| uint32_t | modelContentSize | ||
| ) |
Creates and initializes a TensorRT Network from memory.
| [out] | network | A pointer to network handle that is initialized from parameters. |
| [in] | context | Specifies a handle to the context under which the DNN module is created. |
| [in] | modelContent | A pointer to network content in the memory. |
| [in] | modelContentSize | Specifies the size of network content in memory, in bytes. |
| DW_API_PUBLIC dwStatus dwDNN_release | ( | dwDNNHandle_t * | network | ) |
Releases a given network.
| [in] | network | A pointer to the network handle to release. |
| DW_API_PUBLIC dwStatus dwDNN_reset | ( | dwDNNHandle_t | network | ) |
Resets a given network.
| [in] | network | Network handle to reset. |
| DW_API_PUBLIC dwStatus dwDNN_setCUDAStream | ( | cudaStream_t | stream, |
| dwDNNHandle_t | network | ||
| ) |
Sets the CUDA stream for infer operations.
| [in] | stream | The CUDA stream to be used. Default is the stream 0, resulting in synchronous operations. |
| [in] | network | A handle to the DNN module to set CUDA stream for. |