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

Method getSerializationSize

plugin/embLayerNormPlugin/embLayerNormPlugin.cpp:435–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435size_t EmbLayerNormPluginDynamic::getSerializationSize() const noexcept
436{
437 size_t const wordSize = getElementSize(mType);
438 return sizeof(mType) // type
439 + sizeof(mMhaType) // mha plugin datatype
440 + sizeof(mLd) * 5 // mLd, mS, m*VocabSize
441 + sizeof(mUseFullMask) // mask type
442 + sizeof(mSM) // smversion
443 + 2 * sizeof(float) * mLd // beta + gamma
444 + wordSize * mLd * mWordVocabSize // word emb
445 + wordSize * mLd * mPosVocabSize // pos emb
446 + wordSize * mLd * mTokVocabSize // tok emb
447 ;
448}
449
450void EmbLayerNormPluginDynamic::serialize(void* buffer) const noexcept
451{

Callers

nothing calls this directly

Calls 1

getElementSizeFunction · 0.50

Tested by

no test coverage detected