MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / getOutputDimensions

Method getOutputDimensions

plugin/fcPlugin/fcPlugin.cpp:435–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435DimsExprs FCPluginDynamic::getOutputDimensions(
436 int32_t outputIndex, DimsExprs const* inputs, int32_t nbInputs, IExprBuilder& exprBuilder) noexcept
437{
438 try
439 {
440 PLUGIN_VALIDATE(nbInputs == 1);
441 PLUGIN_VALIDATE(outputIndex == 0);
442 PLUGIN_VALIDATE(inputs != nullptr);
443 DimsExprs ret;
444 ret.nbDims = 5;
445 ret.d[0] = inputs[0].d[0];
446 ret.d[1] = inputs[0].d[1];
447 ret.d[2] = exprBuilder.constant(mOutDim);
448 ret.d[3] = exprBuilder.constant(1);
449 ret.d[4] = exprBuilder.constant(1);
450 return ret;
451 }
452 catch (std::exception const& e)
453 {
454 caughtError(e);
455 }
456 return DimsExprs{};
457}
458
459bool FCPluginDynamic::supportsFormatCombination(
460 int32_t pos, PluginTensorDesc const* inOut, int32_t nbInputs, int32_t nbOutputs) noexcept

Callers 1

pyPlugin.cppFile · 0.45

Calls 2

caughtErrorFunction · 0.85
constantMethod · 0.80

Tested by

no test coverage detected