added assert for supportsFormat in plugins
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user