| 433 | } |
| 434 | |
| 435 | size_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 | |
| 450 | void EmbLayerNormPluginDynamic::serialize(void* buffer) const noexcept |
| 451 | { |
nothing calls this directly
no test coverage detected