1818
1919namespace nvinfer1
2020{
21- class Chunk : public IPluginV2IOExt
21+ class Chunk : public IPluginV2
2222 {
2323 public:
2424 Chunk ();
2525 Chunk (const void * buffer, size_t length);
2626 ~Chunk ();
27- int getNbOutputs ()const override ;
28- Dims getOutputDimensions (int index, const Dims* inputs, int nbInputDims) override ;
29- int initialize () override ;
30- void terminate () override ;
31- size_t getWorkspaceSize (int maxBatchSize) const override ;
32- int enqueue (int batchSize, const void * const * inputs, void ** outputs, void * workspace, cudaStream_t stream)override ;
33- size_t getSerializationSize () const override ;
34- void serialize (void * buffer) const override ;
35- const char * getPluginType () const override ;
36- const char * getPluginVersion () const override ;
37- void destroy () override ;
38- void setPluginNamespace (const char * pluginNamespace) override ;
39- const char * getPluginNamespace () const override ;
40- DataType getOutputDataType (int index, const nvinfer1::DataType* inputTypes, int nbInputs) const override ;
41- bool isOutputBroadcastAcrossBatch (int outputIndex, const bool * inputIsBroadcasted, int nbInputs) const override ;
42- bool canBroadcastInputAcrossBatch (int inputIndex) const override ;
27+ int getNbOutputs ()const noexcept override ;
28+ Dims getOutputDimensions (int index, const Dims* inputs, int nbInputDims)noexcept override ;
29+ int initialize ()noexcept override ;
30+ void terminate ()noexcept override ;
31+ size_t getWorkspaceSize (int maxBatchSize) const noexcept override ;
32+ // int enqueue(int batchSize, const void* const* inputs, void** outputs, void* workspace, cudaStream_t stream)noexcept override;
33+
34+ int enqueue (int batchSize, const void * const * inputs, void * const * outputs, void * workspace, cudaStream_t stream) noexcept ;
35+ int enqueue (int batchSize, const void * const * inputs, void ** outputs, void * workspace, cudaStream_t stream) noexcept ;
36+
37+ size_t getSerializationSize () const noexcept override ;
38+ void serialize (void * buffer) const noexcept override ;
39+ const char * getPluginType () const noexcept override ;
40+ const char * getPluginVersion () const noexcept override ;
41+ void destroy ()noexcept override ;
42+ void setPluginNamespace (const char * pluginNamespace)noexcept override ;
43+ const char * getPluginNamespace () const noexcept override ;
44+ DataType getOutputDataType (int index, const nvinfer1::DataType* inputTypes, int nbInputs) const noexcept ;
45+ bool isOutputBroadcastAcrossBatch (int outputIndex, const bool * inputIsBroadcasted, int nbInputs) const noexcept ;
46+ bool canBroadcastInputAcrossBatch (int inputIndex) const noexcept ;
4347 void attachToContext (
44- cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator) override ;
45- void configurePlugin (const PluginTensorDesc* in, int nbInput, const PluginTensorDesc* out, int nbOutput) override ;
46- void detachFromContext () override ;
47- bool supportsFormatCombination (int pos, const PluginTensorDesc* inOut, int /* nbInputs*/ , int /* nbOutputs*/ ) const override
48+ cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator);
49+ void configurePlugin (const PluginTensorDesc* in, int nbInput, const PluginTensorDesc* out, int nbOutput);
50+ void detachFromContext ();
51+ bool supportsFormatCombination (int pos, const PluginTensorDesc* inOut, int nbInputs, int nbOutputs) const
4852 {
4953 return inOut[pos].format == TensorFormat::kLINEAR && inOut[pos].type == DataType::kFLOAT ;
5054 }
51- IPluginV2IOExt* clone () const override ;
55+ IPluginV2* clone () const noexcept override ;
56+ bool supportsFormat (DataType type, PluginFormat format) const noexcept override ;
57+ void configureWithFormat (const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) noexcept override ;
58+
5259 private:
5360 std::string _s_plugin_namespace;
5461 int _n_size_split;
@@ -59,13 +66,13 @@ namespace nvinfer1
5966 public:
6067 ChunkPluginCreator ();
6168 ~ChunkPluginCreator () override = default ;
62- const char * getPluginName ()const override ;
63- const char * getPluginVersion () const override ;
64- const PluginFieldCollection* getFieldNames () override ;
65- IPluginV2IOExt * createPlugin (const char * name, const PluginFieldCollection* fc) override ;
66- IPluginV2IOExt * deserializePlugin (const char * name, const void * serialData, size_t serialLength) override ;
67- void setPluginNamespace (const char * libNamespace) override ;
68- const char * getPluginNamespace () const override ;
69+ const char * getPluginName ()const noexcept override ;
70+ const char * getPluginVersion () const noexcept override ;
71+ const PluginFieldCollection* getFieldNames ()noexcept override ;
72+ IPluginV2 * createPlugin (const char * name, const PluginFieldCollection* fc)noexcept override ;
73+ IPluginV2 * deserializePlugin (const char * name, const void * serialData, size_t serialLength)noexcept override ;
74+ void setPluginNamespace (const char * libNamespace)noexcept override ;
75+ const char * getPluginNamespace () const noexcept override ;
6976 private:
7077 std::string _s_name_space;
7178 static PluginFieldCollection _fc;
0 commit comments