Added -Wall for Clang and GCC (#15513)
* Added -Wall for Clang and GCC * Fixes * Don't use /J * Fixed warnings * Fixed warnings * More fixes * Fixed for MSVC * Fixed more warnings on Windows * Suppressed some warnings in template plugin * Update src/tests/functional/plugin/shared/include/behavior/plugin/caching_tests.hpp * Added suppression for PT FE * Suppressed warnings in TF FE * Suppressed warnings on Core unit tests * Suppress warnings in python * Suppressed Windows warning for 3rd party modules * Suppresed one more warning
This commit is contained in:
1 parent
6b503099db
commit
1f3e469c5e
312 files changed
+1261
-1290
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ public:
|
||||
class LP_TRANSFORMATIONS_API SharedValueAttribute : public std::enable_shared_from_this<SharedValueAttribute> {
|
||||
public:
|
||||
struct LP_TRANSFORMATIONS_API SharedValue : public std::enable_shared_from_this<SharedValue> {
|
||||
SharedValue() = default;
|
||||
SharedValue() {}
|
||||
SharedValue(const T& value) : value{value} {}
|
||||
T value = {};
|
||||
void addAttribute(std::weak_ptr<SharedValueAttribute> attribute) {
|
||||
|
||||
@@ -104,7 +104,7 @@ bool FakeQuantizeDequantization::checkShape(const std::shared_ptr<ngraph::Node>&
|
||||
}
|
||||
|
||||
if (!inPShape.rank().is_dynamic()) {
|
||||
for (int i = 0; i < inPShape.size(); ++i) {
|
||||
for (size_t i = 0; i < inPShape.size(); ++i) {
|
||||
if (inPShape[i] != outPShape[i] && !inPShape[i].is_dynamic()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ constexpr char LayerTransformation::originalLayerPostfix[];
|
||||
LayerTransformation::LayerTransformation(const Params& params) :
|
||||
updatePrecisions(params.updatePrecisions),
|
||||
deqPrecision(params.deqPrecision),
|
||||
reshapeIgnorePerTensorQuantizationCheck(params.reshapeIgnorePerTensorQuantizationCheck),
|
||||
defaultPrecisions(params.defaultPrecisions),
|
||||
reshapeIgnorePerTensorQuantizationCheck(params.reshapeIgnorePerTensorQuantizationCheck),
|
||||
context(nullptr) {}
|
||||
|
||||
void LayerTransformation::setContext(TransformationContext* context) noexcept {
|
||||
|
||||
@@ -273,7 +273,7 @@ bool ngraph::pass::low_precision::LowPrecision::run_on_model(const std::shared_p
|
||||
bool ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(const std::shared_ptr<const ngraph::Function>& function) {
|
||||
std::set<std::shared_ptr<ngraph::Node>> handledNodes;
|
||||
std::deque<std::shared_ptr<ngraph::Node>> nodes;
|
||||
for (const auto result : function->get_results()) {
|
||||
for (const auto& result : function->get_results()) {
|
||||
nodes.push_front(result);
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ bool ngraph::pass::low_precision::LowPrecision::isFunctionQuantized(const std::s
|
||||
}
|
||||
} else if (const auto multiSubGraph = ov::as_type_ptr<ngraph::op::util::MultiSubGraphOp>(parent)) {
|
||||
// Look inside subraph operations, such as TensorIterator, Loop, If, etc
|
||||
for (int i = 0; i < multiSubGraph->get_internal_subgraphs_size(); i++) {
|
||||
for (size_t i = 0; i < multiSubGraph->get_internal_subgraphs_size(); i++) {
|
||||
if (isFunctionQuantized(multiSubGraph->get_function(i))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ std::vector<size_t> NetworkHelper::updateReshapeValues(
|
||||
}
|
||||
}
|
||||
}
|
||||
return updatedReshapeValues;
|
||||
return std::move(updatedReshapeValues);
|
||||
}
|
||||
|
||||
std::shared_ptr<ngraph::opset1::Multiply> NetworkHelper::optimizeMultipliesAfter(std::shared_ptr<Node> node) {
|
||||
|
||||
@@ -262,8 +262,8 @@ bool WeightableLayerTransformation::isQuantizedStatic(const std::shared_ptr<cons
|
||||
return true;
|
||||
};
|
||||
|
||||
if (dequantizationOnWeights.subtract && !checkConstShape(dequantizationOnWeights.subtractConstant) ||
|
||||
dequantizationOnWeights.multiply && !checkConstShape(dequantizationOnWeights.multiplyConstant)) {
|
||||
if ((dequantizationOnWeights.subtract && !checkConstShape(dequantizationOnWeights.subtractConstant)) ||
|
||||
(dequantizationOnWeights.multiply && !checkConstShape(dequantizationOnWeights.multiplyConstant))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,13 +150,13 @@ const std::vector<GatherTransformationTestValues> testValues = {
|
||||
{ngraph::element::u8,
|
||||
{{ngraph::element::f32},
|
||||
{{128.f}, element::undefined, {1, 3, 1}, false, 1ul, element::u8, true},
|
||||
{{0.1}, ngraph::element::f32, {1, 3, 1}}}},
|
||||
{{0.1f}, ngraph::element::f32, {1, 3, 1}}}},
|
||||
{ngraph::element::u8,
|
||||
{{}, {}, {}},
|
||||
ngraph::element::u8,
|
||||
{{ngraph::element::f32},
|
||||
{{128.f}, element::undefined, {1, 3, 1}, false, 1ul, element::u8, true},
|
||||
{{0.1}, ngraph::element::f32, {1, 3, 1}}}}},
|
||||
{{0.1f}, ngraph::element::f32, {1, 3, 1}}}}},
|
||||
// U8: per-channel quantization, gather axis match with channel
|
||||
{{1},
|
||||
{0},
|
||||
|
||||
+3
-2
@@ -87,9 +87,10 @@ TEST_P(FQDecompositionWithSharedConstants, FQDecompositionWithSharedConstants) {
|
||||
ASSERT_TRUE(res.valid) << res.message;
|
||||
|
||||
// additional check: FQ constants after transformation mustn't be shared
|
||||
for (const auto n : actualFunction->get_ordered_ops()) {
|
||||
if (ov::is_type<opset1::Constant>(n))
|
||||
for (const auto& n : actualFunction->get_ordered_ops()) {
|
||||
if (ov::is_type<opset1::Constant>(n)) {
|
||||
EXPECT_EQ(n->get_output_target_inputs(0).size(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace {
|
||||
|
||||
Reference in new issue
Block a user