IPluginV2DynamicExt Methods
| 124 | |
| 125 | // IPluginV2DynamicExt Methods |
| 126 | nvinfer1::IPluginV2DynamicExt* QKVToContextPluginDynamic::clone() const noexcept |
| 127 | { |
| 128 | BERT_DEBUG_MSG("QKV Clone"); |
| 129 | |
| 130 | QKVToContextPluginDynamic* ret = nullptr; |
| 131 | // the workspacesize is 0 if we have not call setup the dispatcher yet. |
| 132 | if (unfusedDispatcher.get() && unfusedDispatcher->getWorkspaceSize()) |
| 133 | { |
| 134 | std::vector<char> buff; |
| 135 | buff.resize(getSerializationSize()); |
| 136 | serialize(buff.data()); |
| 137 | |
| 138 | ret = new QKVToContextPluginDynamic(mLayerName, buff.data(), buff.size()); |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | ret = new QKVToContextPluginDynamic(mLayerName, mType, mHiddenSize, mNumHeads, mDqProbs, mHasImask); |
| 143 | } |
| 144 | |
| 145 | ret->setPluginNamespace(mNamespace.c_str()); |
| 146 | BERT_DEBUG_MSG("QKV Clone done"); |
| 147 | return ret; |
| 148 | } |
| 149 | |
| 150 | DimsExprs QKVToContextPluginDynamic::getOutputDimensions( |
| 151 | int32_t outputIndex, DimsExprs const* inputs, int32_t /*nbInputs*/, IExprBuilder& exprBuilder) noexcept |
nothing calls this directly
no test coverage detected