| 342 | } |
| 343 | |
| 344 | size_t QKVToContextPluginDynamic::getWorkspaceSize(PluginTensorDesc const* /*inputs*/, int32_t /*nbInputs*/, |
| 345 | PluginTensorDesc const* /*outputs*/, int32_t /*nbOutputs*/) const noexcept |
| 346 | { |
| 347 | // only unfused kernel need workspace, and we need larger workspace for larger sequence length |
| 348 | // we have already setup unfusedDispatcher with max sequence in configurePlugin |
| 349 | // if unfusedDispatcher is not initialized in configurePlugin |
| 350 | PLUGIN_ASSERT(unfusedDispatcher.get()); |
| 351 | return unfusedDispatcher->getWorkspaceSize(); |
| 352 | } |
| 353 | |
| 354 | // IPluginV2Ext Methods |
| 355 | DataType QKVToContextPluginDynamic::getOutputDataType( |