|
virtual bool | parse (void const *serialized_onnx_model, size_t serialized_onnx_model_size, const char *model_path=nullptr)=0 |
| Parse a serialized ONNX model into the TensorRT network. This method has very limited diagnostics. If parsing the serialized model fails for any reason (e.g. unsupported IR version, unsupported opset, etc.) it the user responsibility to intercept and report the error. To obtain a better diagnostic, use the parseFromFile method below. More...
|
|
virtual bool | parseFromFile (const char *onnxModelFile, int verbosity)=0 |
| Parse an onnx model file, which can be a binary protobuf or a text onnx model calls parse method inside. More...
|
|
virtual bool | supportsModel (void const *serialized_onnx_model, size_t serialized_onnx_model_size, SubGraphCollection_t &sub_graph_collection, const char *model_path=nullptr)=0 |
| Check whether TensorRT supports a particular ONNX model. If the function returns True, one can proceed to engine building without having to call parse or parseFromFile . More...
|
|
virtual bool | parseWithWeightDescriptors (void const *serialized_onnx_model, size_t serialized_onnx_model_size)=0 |
| Parse a serialized ONNX model into the TensorRT network with consideration of user provided weights. More...
|
|
virtual bool | supportsOperator (const char *op_name) const =0 |
| Returns whether the specified operator may be supported by the parser. More...
|
|
virtual int | getNbErrors () const =0 |
| Get the number of errors that occurred during prior calls to parse . More...
|
|
virtual IParserError const * | getError (int index) const =0 |
| Get an error that occurred during prior calls to parse . More...
|
|
virtual void | clearErrors ()=0 |
| Clear errors from prior calls to parse . More...
|
|
virtual | ~IParser () noexcept=default |
|
virtual char const *const * | getUsedVCPluginLibraries (int64_t &nbPluginLibs) const noexcept=0 |
| Query the plugin libraries needed to implement operations used by the parser in a version-compatible engine. More...
|
|
virtual void | setFlags (OnnxParserFlags onnxParserFlags) noexcept=0 |
| Set the parser flags. More...
|
|
virtual OnnxParserFlags | getFlags () const noexcept=0 |
| Get the parser flags. Defaults to 0. More...
|
|
virtual void | clearFlag (OnnxParserFlag onnxParserFlag) noexcept=0 |
| clear a parser flag. More...
|
|
virtual void | setFlag (OnnxParserFlag onnxParserFlag) noexcept=0 |
| Set a single parser flag. More...
|
|
virtual bool | getFlag (OnnxParserFlag onnxParserFlag) const noexcept=0 |
| Returns true if the parser flag is set. More...
|
|
virtual nvinfer1::ITensor const * | getLayerOutputTensor (char const *name, int64_t i)=0 |
| Return the i-th output ITensor object for the ONNX layer "name". More...
|
|
an object for parsing ONNX models into a TensorRT network definition
virtual char const *const * nvonnxparser::IParser::getUsedVCPluginLibraries |
( |
int64_t & |
nbPluginLibs | ) |
const |
|
pure virtualnoexcept |
Query the plugin libraries needed to implement operations used by the parser in a version-compatible engine.
This provides a list of plugin libraries on the filesystem needed to implement operations in the parsed network. If you are building a version-compatible engine using this network, provide this list to IBuilderConfig::setPluginsToSerialize to serialize these plugins along with the version-compatible engine, or, if you want to ship these plugin libraries externally to the engine, ensure that IPluginRegistry::loadLibrary is used to load these libraries in the appropriate runtime before deserializing the corresponding engine.
- Parameters
-
[out] | nbPluginLibs | Returns the number of plugin libraries in the array, or -1 if there was an error. |
- Returns
- Array of
nbPluginLibs
C-strings describing plugin library paths on the filesystem if nbPluginLibs > 0, or nullptr otherwise. This array is owned by the IParser, and the pointers in the array are only valid until the next call to parse(), supportsModel(), parseFromFile(), or parseWithWeightDescriptors().