added assert for supportsFormat in plugins

This commit is contained in:
perseusdg
2021-11-10 14:37:16 +05:30
parent 936b680f2f
commit 7dd33cd118
12 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ const char *ActivationMishRT::getPluginVersion() const NOEXCEPT {
}
bool ActivationMishRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *ActivationMishRT::getPluginNamespace() const NOEXCEPT {
+1 -1
View File
@@ -287,7 +287,7 @@ void DeformableConvRT::detachFromContext() NOEXCEPT {
}
bool DeformableConvRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
DeformableConvRTPluginCreator::DeformableConvRTPluginCreator() {
+1 -1
View File
@@ -158,7 +158,7 @@ FlattenConcatRT::configurePlugin(const Dims *inputDims, int32_t nbInputs, const
}
bool FlattenConcatRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
FlattenConcatRTPluginCreator::FlattenConcatRTPluginCreator() {
+1 -2
View File
@@ -93,8 +93,7 @@ delete this;
}
bool MaxPoolFixedSizeRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
//todo assert
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *MaxPoolFixedSizeRT::getPluginNamespace() const NOEXCEPT {
+1 -1
View File
@@ -131,7 +131,7 @@ void RegionRT::setPluginNamespace(const char *pluginNamespace) NOEXCEPT {
}
bool RegionRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
IPluginV2Ext *RegionRT::clone() const NOEXCEPT {
+1 -1
View File
@@ -75,7 +75,7 @@ void ReorgRT::serialize(void *buffer) const NOEXCEPT {
}
bool ReorgRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *ReorgRT::getPluginType() const NOEXCEPT {
+1 -2
View File
@@ -76,8 +76,7 @@ void ReshapeRT::serialize(void *buffer) const NOEXCEPT {
}
bool ReshapeRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
//todo assert
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *ReshapeRT::getPluginType() const NOEXCEPT {
+1 -2
View File
@@ -77,8 +77,7 @@ void ResizeLayerRT::serialize(void *buffer) const NOEXCEPT {
}
bool ResizeLayerRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
//todo assert
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *ResizeLayerRT::getPluginType() const NOEXCEPT {
+1 -2
View File
@@ -131,8 +131,7 @@ void RouteRT::setPluginNamespace(const char *pluginNamespace) NOEXCEPT {
}
bool RouteRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
//todo assert
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
IPluginV2 *RouteRT::clone() const NOEXCEPT {
+1 -1
View File
@@ -91,7 +91,7 @@ void ShortcutRT::serialize(void *buffer) const NOEXCEPT {
}
bool ShortcutRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *ShortcutRT::getPluginType() const NOEXCEPT {
+1 -1
View File
@@ -81,7 +81,7 @@ void UpsampleRT::serialize(void *buffer) const NOEXCEPT {
}
bool UpsampleRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
const char *UpsampleRT::getPluginType() const NOEXCEPT {
+1 -1
View File
@@ -152,7 +152,7 @@ size_t YoloRT::getSerializationSize() const NOEXCEPT {
}
bool YoloRT::supportsFormat(DataType type, PluginFormat format) const NOEXCEPT {
return true;
return (type == DataType::kFLOAT && format == PluginFormat::kLINEAR);
}
void YoloRT::serialize(void *buffer) const NOEXCEPT {