未验证 提交 128ef1ae 编写于 作者: Z zhangxin81 提交者: GitHub

fix loopup_table plugin deserialize size error (#48379)

* fix loopup_table plugin deserialize size error
上级 57a5403e
...@@ -98,9 +98,11 @@ LookupTablePluginDynamic::LookupTablePluginDynamic(void const* data, ...@@ -98,9 +98,11 @@ LookupTablePluginDynamic::LookupTablePluginDynamic(void const* data,
deserialize_value(&data, &length, &mWeightSize); deserialize_value(&data, &length, &mWeightSize);
deserialize_value(&data, &length, &mWeightWidth); deserialize_value(&data, &length, &mWeightWidth);
char const* d = static_cast<char const*>(data); char const* d = static_cast<char const*>(data);
cudaMalloc(&mWeightDev, mWeightSize * sizeof(mType)); cudaMalloc(&mWeightDev, mWeightSize * getElementSize(mType));
cudaMemcpy( cudaMemcpy(mWeightDev,
mWeightDev, d, mWeightSize * sizeof(mType), cudaMemcpyHostToDevice); d,
mWeightSize * getElementSize(mType),
cudaMemcpyHostToDevice);
} }
// IPluginV2DynamicExt Methods // IPluginV2DynamicExt Methods
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册