Fixed FP16 crashing

- None of the custom layers support anything than FP32 with default format, so I changed the support function to reflect that.

Many of the layers could be optimized if F16 was actually supported. Especially for big ones like MISH activation.
This commit is contained in:
Harijs Grinbergs
2021-11-01 22:28:12 +02:00
parent 76c978a200
commit 646c5aa4d1
15 changed files with 15 additions and 15 deletions
@@ -70,7 +70,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -71,7 +71,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
@@ -75,7 +75,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
@@ -70,7 +70,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -185,7 +185,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -93,7 +93,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
@@ -86,7 +86,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -99,7 +99,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -76,7 +76,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -78,7 +78,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -83,7 +83,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -105,7 +105,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -89,7 +89,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -78,7 +78,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {
+1 -1
View File
@@ -137,7 +137,7 @@ public:
// Extra IPluginV2 overrides
bool supportsFormat(nvinfer1::DataType type, nvinfer1::PluginFormat format) const noexcept override {
return true;
return (type == nvinfer1::DataType::kFLOAT && format == nvinfer1::PluginFormat::kLINEAR);
}
nvinfer1::IPluginV2 * clone() const noexcept override {