Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Unify GGUF and common frontend namespace style (#38326)

Maxim Vafin766fa3ff7504
diff --git a/src/frontends/common/dev_api/openvino/frontend/common/random_normal_helper.hpp b/src/frontends/common/dev_api/openvino/frontend/common/random_normal_helper.hpp
index 05e018fe0bd..b311dc2caf6 100644
--- a/src/frontends/common/dev_api/openvino/frontend/common/random_normal_helper.hpp
+++ b/src/frontends/common/dev_api/openvino/frontend/common/random_normal_helper.hpp
@@ -8,8 +8,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/pass/graph_rewrite.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief Creates a random normal tensor with the given shape and type.
/// \details Uses Box-Mueller algorithm to generate random numbers from a Gauassian distribution
@@ -19,11 +18,11 @@ namespace frontend {
/// \param scale Standard deviation of the distribution
/// \param seed Seed for the random number generator
FRONTEND_API OutputVector make_random_normal(pass::NodeRegistry& registry,
- const Output<Node>& sizes,
- element::Type target_type,
- const Output<Node>& mean,
- const Output<Node>& scale,
- float seed);
+ const Output<Node>& sizes,
+ element::Type target_type,
+ const Output<Node>& mean,
+ const Output<Node>& scale,
+ float seed);
/// \brief Creates a random normal tensor with the given shape and type.
/// \details Uses Box-Mueller algorithm to generate random numbers from a Gauassian distribution
@@ -33,10 +32,9 @@ FRONTEND_API OutputVector make_random_normal(pass::NodeRegistry& registry,
/// \param scale Standard deviation of the distribution
/// \param seed Seed for the random number generator
FRONTEND_API std::pair<OutputVector, pass::NodeRegistry> make_random_normal(const Output<Node>& sizes,
- element::Type target_type,
- const Output<Node>& mean,
- const Output<Node>& scale,
- float seed);
+ element::Type target_type,
+ const Output<Node>& mean,
+ const Output<Node>& scale,
+ float seed);
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp b/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp
index d9d7b73bac5..919121d1d1a 100644
--- a/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp
+++ b/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp
@@ -10,8 +10,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
// ComplexTypeMark serves to mark places that require complex type propagation
// that means to represent native complex type with simulating floating-point tensor
@@ -117,5 +116,4 @@ private:
ov::Output<ov::Node> m_imag;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/concat_from_sequence.hpp b/src/frontends/common/include/openvino/frontend/concat_from_sequence.hpp
index e12f578cdb3..b30d30d9513 100644
--- a/src/frontends/common/include/openvino/frontend/concat_from_sequence.hpp
+++ b/src/frontends/common/include/openvino/frontend/concat_from_sequence.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief ConcatFromSequence is a helper operation that represents concatenating
/// all tensors in a sequence along a specified axis.
@@ -67,5 +66,4 @@ private:
bool m_new_axis = false;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/decoder.hpp b/src/frontends/common/include/openvino/frontend/decoder.hpp
index 98ef2dd8400..f70a9eed1f0 100644
--- a/src/frontends/common/include/openvino/frontend/decoder.hpp
+++ b/src/frontends/common/include/openvino/frontend/decoder.hpp
@@ -8,8 +8,7 @@
#include "openvino/frontend/exception.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
// Extendable type system which reflects Framework data types
// Type nestings are built with the help of ov::Any
@@ -93,5 +92,4 @@ public:
virtual ~DecoderBase();
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/exception.hpp b/src/frontends/common/include/openvino/frontend/exception.hpp
index 62fc11bd833..6e22044e465 100644
--- a/src/frontends/common/include/openvino/frontend/exception.hpp
+++ b/src/frontends/common/include/openvino/frontend/exception.hpp
@@ -4,14 +4,12 @@
#pragma once
-#include <memory>
#include <string>
#include "openvino/core/except.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
class FRONTEND_API GeneralFailure : public AssertFailure {
public:
[[noreturn]] static void create(const char* file,
@@ -121,5 +119,4 @@ protected:
/// \throws ::ov::frontend::GeneralFailure
#define FRONT_END_THROW(MSG) FRONT_END_GENERAL_CHECK(false, MSG)
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/conversion.hpp b/src/frontends/common/include/openvino/frontend/extension/conversion.hpp
index f810edaae5c..36f734f2bca 100644
--- a/src/frontends/common/include/openvino/frontend/extension/conversion.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/conversion.hpp
@@ -8,8 +8,7 @@
#include "openvino/frontend/node_context.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
class FRONTEND_API ConversionExtensionBase : public Extension {
public:
@@ -65,5 +64,4 @@ private:
CreatorFunctionNamedAndIndexed m_converter_named_and_indexed;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/decoder_transformation.hpp b/src/frontends/common/include/openvino/frontend/extension/decoder_transformation.hpp
index fd147832640..324631d3a55 100644
--- a/src/frontends/common/include/openvino/frontend/extension/decoder_transformation.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/decoder_transformation.hpp
@@ -14,8 +14,7 @@
#include "openvino/pass/manager.hpp"
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief Holds a transformation that is applied just after the original model graph is decoded.
/// This class is a holder for transformation. The transformation can be specified as
@@ -53,5 +52,4 @@ protected:
private:
std::function<void(ov::pass::Manager&)> m_registration;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/holder.hpp b/src/frontends/common/include/openvino/frontend/extension/holder.hpp
index fcdaa6cb870..4ddfd49400f 100644
--- a/src/frontends/common/include/openvino/frontend/extension/holder.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/holder.hpp
@@ -8,12 +8,10 @@
#include "openvino/frontend/extension/progress_reporter.hpp"
#include "openvino/frontend/extension/telemetry.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
struct ExtensionHolder {
std::shared_ptr<ProgressReporterExtension> progress_reporter{std::make_shared<ProgressReporterExtension>()};
std::shared_ptr<TelemetryExtension> telemetry;
std::vector<std::shared_ptr<ConversionExtensionBase>> conversions;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/op.hpp b/src/frontends/common/include/openvino/frontend/extension/op.hpp
index b908e74acb9..64c08726417 100644
--- a/src/frontends/common/include/openvino/frontend/extension/op.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/op.hpp
@@ -14,8 +14,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/opsets/opset.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief The helper function to return an instance of OpSet class initialized with
/// operations from provided opset by name.
@@ -510,5 +509,4 @@ using OpExtension = ov::frontend::OpExtensionBase<ov::frontend::ConversionExtens
FRONTEND_CAT(MAKE_MAP_, FRAMEWORK)(__VA_ARGS__) \
} \
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/progress_reporter.hpp b/src/frontends/common/include/openvino/frontend/extension/progress_reporter.hpp
index 795ca9a9f40..5041edaa6cf 100644
--- a/src/frontends/common/include/openvino/frontend/extension/progress_reporter.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/progress_reporter.hpp
@@ -7,8 +7,7 @@
#include "openvino/core/extension.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
class FRONTEND_API ProgressReporterExtension : public ov::Extension {
public:
/// \brief A progress reporting callback signature. A FunctionObject that matches this signature should be passed
@@ -35,5 +34,4 @@ public:
private:
progress_notifier_callback m_callback;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/extension/telemetry.hpp b/src/frontends/common/include/openvino/frontend/extension/telemetry.hpp
index ab15b59aa07..266f5b14c4e 100644
--- a/src/frontends/common/include/openvino/frontend/extension/telemetry.hpp
+++ b/src/frontends/common/include/openvino/frontend/extension/telemetry.hpp
@@ -14,8 +14,7 @@
#include "openvino/pass/manager.hpp"
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief Provides callback to report telemetry information back to Python code
class FRONTEND_API TelemetryExtension : public ov::Extension {
@@ -40,5 +39,4 @@ private:
error_callback m_send_stack_trace;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/frontend.hpp b/src/frontends/common/include/openvino/frontend/frontend.hpp
index 060efc25a79..f61c4696a8e 100644
--- a/src/frontends/common/include/openvino/frontend/frontend.hpp
+++ b/src/frontends/common/include/openvino/frontend/frontend.hpp
@@ -16,8 +16,7 @@
#include "openvino/frontend/input_model.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief An interface for identifying a frontend for a particular framework.
/// Provides an ability to load and convert of input model
class FRONTEND_API FrontEnd {
@@ -177,6 +176,4 @@ inline bool FrontEnd::supported(const std::vector<ov::Any>& variants) const {
return supported_impl(variants);
}
-} // namespace frontend
-
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/graph_iterator.hpp b/src/frontends/common/include/openvino/frontend/graph_iterator.hpp
index f174781e1eb..9b201d63878 100644
--- a/src/frontends/common/include/openvino/frontend/graph_iterator.hpp
+++ b/src/frontends/common/include/openvino/frontend/graph_iterator.hpp
@@ -8,8 +8,7 @@
#include "openvino/frontend/decoder.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// Abstract representation for an input model graph that gives nodes in topologically sorted order
class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute {
@@ -50,5 +49,4 @@ public:
virtual std::map<std::string, std::string> get_output_names_map() const;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/hash_table.hpp b/src/frontends/common/include/openvino/frontend/hash_table.hpp
index 790013d30a6..c83aeefd215 100644
--- a/src/frontends/common/include/openvino/frontend/hash_table.hpp
+++ b/src/frontends/common/include/openvino/frontend/hash_table.hpp
@@ -9,8 +9,7 @@
#include "openvino/frontend/variable.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief HashTable is a special type of Variable that has a complex value including keys and values.
/// Keys and values are represented with two separate graph at each time step
@@ -131,5 +130,4 @@ private:
std::set<ov::Output<ov::Node>> m_other_values;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/input_model.hpp b/src/frontends/common/include/openvino/frontend/input_model.hpp
index 7c149aa92bc..f1245f04690 100644
--- a/src/frontends/common/include/openvino/frontend/input_model.hpp
+++ b/src/frontends/common/include/openvino/frontend/input_model.hpp
@@ -14,8 +14,7 @@
#include "openvino/frontend/place.hpp"
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
class FrontEnd;
/// \brief InputModel class represents an original, not yet converted model graph in a
/// framework format given services to find places of interest in a graph or specialize/edit
@@ -221,5 +220,4 @@ public:
virtual void set_tensor_partial_value(const Place::Ptr& place, const void* min_value, const void* max_value);
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/node_context.hpp b/src/frontends/common/include/openvino/frontend/node_context.hpp
index 93f614c478d..8da7572defa 100644
--- a/src/frontends/common/include/openvino/frontend/node_context.hpp
+++ b/src/frontends/common/include/openvino/frontend/node_context.hpp
@@ -11,8 +11,7 @@
#include "openvino/pass/manager.hpp"
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
class FRONTEND_API NodeContext {
public:
@@ -169,5 +168,4 @@ using CreatorFunction = std::function<OutputVector(const NodeContext&)>;
using CreatorFunctionNamed = std::function<std::map<std::string, OutputVector>(const NodeContext&)>;
using CreatorFunctionNamedAndIndexed = std::function<NamedOutputVector(const NodeContext&)>;
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/place.hpp b/src/frontends/common/include/openvino/frontend/place.hpp
index b5f9923ee26..91ee7c0dd0b 100644
--- a/src/frontends/common/include/openvino/frontend/place.hpp
+++ b/src/frontends/common/include/openvino/frontend/place.hpp
@@ -10,8 +10,7 @@
#include "openvino/frontend/visibility.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief An interface for identifying a place in a graph and iterate over it; can refer to
/// an operation node, tensor, port etc.
///
@@ -302,5 +301,4 @@ public:
/// \param another Another place object
virtual bool is_equal_data(const Ptr& another) const;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/sequence_at.hpp b/src/frontends/common/include/openvino/frontend/sequence_at.hpp
index 9a20d4f4e37..cba2b025eb7 100644
--- a/src/frontends/common/include/openvino/frontend/sequence_at.hpp
+++ b/src/frontends/common/include/openvino/frontend/sequence_at.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief SequenceAt is a helper operation that represents extracting a single element
/// from a sequence at a given position. It is emitted by frontends when the sequence
@@ -39,5 +38,4 @@ public:
}
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/sequence_erase.hpp b/src/frontends/common/include/openvino/frontend/sequence_erase.hpp
index d0e5e244d2f..bb51cac53f5 100644
--- a/src/frontends/common/include/openvino/frontend/sequence_erase.hpp
+++ b/src/frontends/common/include/openvino/frontend/sequence_erase.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief SequenceErase is a helper operation that represents removing one element
/// from a sequence. Emitted by frontends when the sequence input is not yet
@@ -44,5 +43,4 @@ public:
}
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/sequence_insert.hpp b/src/frontends/common/include/openvino/frontend/sequence_insert.hpp
index 6c8757c14e4..18760fadc22 100644
--- a/src/frontends/common/include/openvino/frontend/sequence_insert.hpp
+++ b/src/frontends/common/include/openvino/frontend/sequence_insert.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief SequenceInsert is a helper operation that represents inserting a tensor into a sequence.
/// This operation is used during frontend conversion to mark sequence insert operations
@@ -59,5 +58,4 @@ public:
}
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/sequence_length.hpp b/src/frontends/common/include/openvino/frontend/sequence_length.hpp
index beb50f53b77..064075999e3 100644
--- a/src/frontends/common/include/openvino/frontend/sequence_length.hpp
+++ b/src/frontends/common/include/openvino/frontend/sequence_length.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief SequenceLength is a helper operation that represents the length of a sequence.
/// Emitted by frontends when the sequence input is not yet resolvable to a SequenceMark.
@@ -33,5 +32,4 @@ public:
}
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/sequence_mark.hpp b/src/frontends/common/include/openvino/frontend/sequence_mark.hpp
index 1b966f5e8d6..9b169e8c0e6 100644
--- a/src/frontends/common/include/openvino/frontend/sequence_mark.hpp
+++ b/src/frontends/common/include/openvino/frontend/sequence_mark.hpp
@@ -7,8 +7,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief SequenceMark serves to mark places that require a sequence type propagation.
/// This class represents list or tuple constructs in frameworks like PyTorch, ONNX, etc.
@@ -36,5 +35,4 @@ public:
ov::OutputVector get_sequence() const;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/include/openvino/frontend/variable.hpp b/src/frontends/common/include/openvino/frontend/variable.hpp
index 2da1b91bc27..113b286e95b 100644
--- a/src/frontends/common/include/openvino/frontend/variable.hpp
+++ b/src/frontends/common/include/openvino/frontend/variable.hpp
@@ -8,8 +8,7 @@
#include "openvino/frontend/visibility.hpp"
#include "openvino/op/util/framework_node.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief Variable is a special node used in a conversion step
/// It can have several values (or states) during the conversion.
@@ -113,5 +112,4 @@ protected:
uint64_t m_init_counter;
};
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/complex_type_mark.cpp b/src/frontends/common/src/complex_type_mark.cpp
index 9ddef35ac35..0c641facbb8 100644
--- a/src/frontends/common/src/complex_type_mark.cpp
+++ b/src/frontends/common/src/complex_type_mark.cpp
@@ -15,7 +15,6 @@
#include "openvino/op/divide.hpp"
#include "openvino/op/exp.hpp"
#include "openvino/op/gather.hpp"
-#include "openvino/op/maximum.hpp"
#include "openvino/op/multiply.hpp"
#include "openvino/op/negative.hpp"
#include "openvino/op/power.hpp"
@@ -26,7 +25,8 @@
#include "openvino/op/subtract.hpp"
#include "openvino/op/unsqueeze.hpp"
-using namespace ov::frontend;
+namespace ov::frontend {
+
using namespace ov::op;
using namespace std;
@@ -365,3 +365,5 @@ ov::Output<ov::Node> ComplexTypeMark::exp(const NodeContext& context, const ov::
return context.mark_node(make_shared<v0::Exp>(data));
}
+
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/concat_from_sequence.cpp b/src/frontends/common/src/concat_from_sequence.cpp
index 3eddc8f80df..1aad3a586fc 100644
--- a/src/frontends/common/src/concat_from_sequence.cpp
+++ b/src/frontends/common/src/concat_from_sequence.cpp
@@ -4,8 +4,7 @@
#include "openvino/frontend/concat_from_sequence.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
ConcatFromSequence::ConcatFromSequence(const Output<Node>& input_sequence, int64_t axis, bool new_axis)
: FrameworkNode({input_sequence}, 1),
@@ -17,5 +16,4 @@ std::shared_ptr<Node> ConcatFromSequence::clone_with_new_inputs(const OutputVect
return std::make_shared<ConcatFromSequence>(inputs[0], m_axis, m_new_axis);
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/extension/progress_reporter.cpp b/src/frontends/common/src/extension/progress_reporter.cpp
index 70a7b5fdc01..cf0e9f84aa9 100644
--- a/src/frontends/common/src/extension/progress_reporter.cpp
+++ b/src/frontends/common/src/extension/progress_reporter.cpp
@@ -6,8 +6,7 @@
#include "openvino/frontend/exception.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
void ProgressReporterExtension::report_progress(float progress,
unsigned int total_steps,
unsigned int completed_steps) const {
@@ -18,5 +17,4 @@ void ProgressReporterExtension::report_progress(float progress,
"The reported progress needs to be a value between 0.0 and 1.0");
m_callback(progress, total_steps, completed_steps);
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/plugin_loader.hpp b/src/frontends/common/src/plugin_loader.hpp
index 87ed867e515..59206a233d3 100644
--- a/src/frontends/common/src/plugin_loader.hpp
+++ b/src/frontends/common/src/plugin_loader.hpp
@@ -12,8 +12,7 @@
#include "openvino/frontend/manager.hpp"
#include "openvino/util/file_util.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
std::unordered_map<std::string, std::shared_ptr<void>>& get_shared_objects_map();
std::mutex& get_shared_objects_mutex();
@@ -79,5 +78,4 @@ public:
// Appends found plugins to existing list
void find_plugins(const std::filesystem::path& dir_name, std::vector<PluginInfo>& res);
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/random_normal_helper.cpp b/src/frontends/common/src/random_normal_helper.cpp
index c904fb71beb..3f745aef5df 100644
--- a/src/frontends/common/src/random_normal_helper.cpp
+++ b/src/frontends/common/src/random_normal_helper.cpp
@@ -13,8 +13,7 @@
#include "openvino/pass/graph_rewrite.hpp"
#include "transformations/rt_info/disable_precision_conversion.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
OutputVector make_random_normal(pass::NodeRegistry& registry,
const Output<Node>& sizes,
@@ -80,5 +79,4 @@ std::pair<OutputVector, pass::NodeRegistry> make_random_normal(const Output<Node
return std::make_pair(res, registry);
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/sequence_at.cpp b/src/frontends/common/src/sequence_at.cpp
index d98163adb34..3f8cbbe92d8 100644
--- a/src/frontends/common/src/sequence_at.cpp
+++ b/src/frontends/common/src/sequence_at.cpp
@@ -4,8 +4,7 @@
#include "openvino/frontend/sequence_at.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
SequenceAt::SequenceAt(const Output<Node>& input_sequence, const Output<Node>& position)
: FrameworkNode({input_sequence, position}, 1) {}
@@ -15,5 +14,4 @@ std::shared_ptr<Node> SequenceAt::clone_with_new_inputs(const OutputVector& inpu
return std::make_shared<SequenceAt>(inputs[0], inputs[1]);
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/sequence_erase.cpp b/src/frontends/common/src/sequence_erase.cpp
index 962b1b32902..c7e3fa3a504 100644
--- a/src/frontends/common/src/sequence_erase.cpp
+++ b/src/frontends/common/src/sequence_erase.cpp
@@ -4,8 +4,7 @@
#include "openvino/frontend/sequence_erase.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
SequenceErase::SequenceErase(const Output<Node>& input_sequence) : FrameworkNode({input_sequence}, 1) {}
@@ -21,5 +20,4 @@ std::shared_ptr<Node> SequenceErase::clone_with_new_inputs(const OutputVector& i
OPENVINO_THROW("SequenceErase requires 1 or 2 inputs");
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/sequence_insert.cpp b/src/frontends/common/src/sequence_insert.cpp
index 842c993964d..caff4789455 100644
--- a/src/frontends/common/src/sequence_insert.cpp
+++ b/src/frontends/common/src/sequence_insert.cpp
@@ -4,8 +4,7 @@
#include "openvino/frontend/sequence_insert.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
SequenceInsert::SequenceInsert(const Output<Node>& input_sequence, const Output<Node>& tensor)
: FrameworkNode({input_sequence, tensor}, 1) {}
@@ -24,5 +23,4 @@ std::shared_ptr<Node> SequenceInsert::clone_with_new_inputs(const OutputVector&
OPENVINO_THROW("SequenceInsert requires 2 or 3 inputs");
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/sequence_length.cpp b/src/frontends/common/src/sequence_length.cpp
index 014999ee718..f1a4d6c860c 100644
--- a/src/frontends/common/src/sequence_length.cpp
+++ b/src/frontends/common/src/sequence_length.cpp
@@ -6,8 +6,7 @@
#include "openvino/core/type/element_type.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
SequenceLength::SequenceLength(const Output<Node>& input_sequence) : FrameworkNode({input_sequence}, 1) {
validate_and_infer_types();
@@ -22,5 +21,4 @@ std::shared_ptr<Node> SequenceLength::clone_with_new_inputs(const OutputVector&
return std::make_shared<SequenceLength>(inputs[0]);
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common/src/sequence_mark.cpp b/src/frontends/common/src/sequence_mark.cpp
index 0eb6576991c..97d8281741f 100644
--- a/src/frontends/common/src/sequence_mark.cpp
+++ b/src/frontends/common/src/sequence_mark.cpp
@@ -12,8 +12,7 @@
#include "openvino/op/identity.hpp"
#include "openvino/util/log.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
namespace {
@@ -186,5 +185,4 @@ ov::OutputVector SequenceMark::get_sequence() const {
return result;
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common_translators/include/common_translators.hpp b/src/frontends/common_translators/include/common_translators.hpp
index c63190afc57..fd488c6bf3e 100644
--- a/src/frontends/common_translators/include/common_translators.hpp
+++ b/src/frontends/common_translators/include/common_translators.hpp
@@ -7,9 +7,7 @@
#include "openvino/core/node_vector.hpp"
#include "openvino/frontend/node_context.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
#define COMMON_OP_CONVERTER(op) OutputVector op(const ov::frontend::NodeContext& node)
COMMON_OP_CONVERTER(translate_complex);
@@ -32,6 +30,4 @@ OutputVector translate_bincount_common(const NodeContext& context,
const Output<Node>& size,
const Output<Node>& weights = Output<Node>());
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/include/sequence_array_lowering.hpp b/src/frontends/common_translators/include/sequence_array_lowering.hpp
index 9cf01b0e883..6867d6df6d0 100644
--- a/src/frontends/common_translators/include/sequence_array_lowering.hpp
+++ b/src/frontends/common_translators/include/sequence_array_lowering.hpp
@@ -6,9 +6,7 @@
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
/// \brief Lowers loop-carried "sequence-of-N" patterns into N parallel tensors.
///
@@ -42,6 +40,4 @@ public:
bool run_on_model(const std::shared_ptr<ov::Model>& model) override;
};
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/include/sequence_concat_replacer.hpp b/src/frontends/common_translators/include/sequence_concat_replacer.hpp
index c06d76b4122..e7bcfd9e2b7 100644
--- a/src/frontends/common_translators/include/sequence_concat_replacer.hpp
+++ b/src/frontends/common_translators/include/sequence_concat_replacer.hpp
@@ -6,9 +6,7 @@
#include "openvino/pass/matcher_pass.hpp"
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
/// \brief Replaces ConcatFromSequence operations with standard OpenVINO ops.
///
@@ -23,6 +21,4 @@ public:
SequenceConcatReplacer();
};
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/include/sequence_if_replacer.hpp b/src/frontends/common_translators/include/sequence_if_replacer.hpp
index 185e2fad054..db334e25ccc 100644
--- a/src/frontends/common_translators/include/sequence_if_replacer.hpp
+++ b/src/frontends/common_translators/include/sequence_if_replacer.hpp
@@ -6,9 +6,7 @@
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
/// \brief Resolves SequenceAt / SequenceLength / SequenceErase helper operations.
///
@@ -26,6 +24,4 @@ public:
bool run_on_model(const std::shared_ptr<ov::Model>& model) override;
};
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/include/unconverted_ops_report.hpp b/src/frontends/common_translators/include/unconverted_ops_report.hpp
index c239fe80856..9731ce867a4 100644
--- a/src/frontends/common_translators/include/unconverted_ops_report.hpp
+++ b/src/frontends/common_translators/include/unconverted_ops_report.hpp
@@ -16,8 +16,7 @@
#include "openvino/op/util/framework_node.hpp"
#include "openvino/op/util/multi_subgraph_base.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
/// \brief Structure containing information about unconverted operations
/// Map of operation types with no conversion rule (op_type -> empty string)
@@ -72,5 +71,4 @@ void check_unconverted_ops(const UnconvertedOpsReport& report,
const AdditionalErrorCallback& additional_callback = nullptr,
bool throw_on_issues = true);
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common_translators/src/op/angle.cpp b/src/frontends/common_translators/src/op/angle.cpp
index 85aeb22ec15..738a465e46e 100644
--- a/src/frontends/common_translators/src/op/angle.cpp
+++ b/src/frontends/common_translators/src/op/angle.cpp
@@ -9,9 +9,7 @@
#include "openvino/op/select.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
using namespace ov::op;
using namespace std;
@@ -50,6 +48,4 @@ OutputVector translate_angle(const NodeContext& context) {
return {angle};
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/atan2.cpp b/src/frontends/common_translators/src/op/atan2.cpp
index 39b0754af93..d0c8324b7b9 100644
--- a/src/frontends/common_translators/src/op/atan2.cpp
+++ b/src/frontends/common_translators/src/op/atan2.cpp
@@ -19,9 +19,7 @@
#include "openvino/op/subtract.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
using namespace ov::op;
using namespace std;
@@ -127,6 +125,4 @@ OutputVector translate_atan2(const NodeContext& context) {
return translate_atan2_util(context, lhs, rhs);
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/bincount.cpp b/src/frontends/common_translators/src/op/bincount.cpp
index 2591835e9f6..d739587a795 100644
--- a/src/frontends/common_translators/src/op/bincount.cpp
+++ b/src/frontends/common_translators/src/op/bincount.cpp
@@ -13,9 +13,7 @@
#include "openvino/op/reshape.hpp"
#include "openvino/op/unsqueeze.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
using namespace ov::op;
@@ -53,6 +51,4 @@ OutputVector translate_bincount_common(const NodeContext& context,
return {result};
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/complex.cpp b/src/frontends/common_translators/src/op/complex.cpp
index 80c7654e553..9616fb9646c 100644
--- a/src/frontends/common_translators/src/op/complex.cpp
+++ b/src/frontends/common_translators/src/op/complex.cpp
@@ -18,9 +18,7 @@
using namespace std;
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
OutputVector translate_complex(const NodeContext& context) {
num_inputs_check(context, 2, 2);
@@ -54,6 +52,4 @@ OutputVector translate_imag(const NodeContext& context) {
return {complex_type_mark->get_imag()};
};
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/equal.cpp b/src/frontends/common_translators/src/op/equal.cpp
index 9bd4f1f9fc3..ff9ad0978ad 100644
--- a/src/frontends/common_translators/src/op/equal.cpp
+++ b/src/frontends/common_translators/src/op/equal.cpp
@@ -14,9 +14,7 @@
using namespace std;
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
OutputVector translate_equal(const NodeContext& node) {
num_inputs_check(node, 2, 2, true);
@@ -48,6 +46,4 @@ OutputVector translate_equal(const NodeContext& node) {
return {result};
};
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/erfc.cpp b/src/frontends/common_translators/src/op/erfc.cpp
index 13758b296ee..b8f1932c93f 100644
--- a/src/frontends/common_translators/src/op/erfc.cpp
+++ b/src/frontends/common_translators/src/op/erfc.cpp
@@ -7,9 +7,7 @@
#include "openvino/op/subtract.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
using namespace ov::op;
using namespace std;
@@ -28,6 +26,4 @@ OutputVector translate_erfc(const NodeContext& context) {
return translate_erfc_util(context, data);
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/op/unsqueeze.cpp b/src/frontends/common_translators/src/op/unsqueeze.cpp
index 9f0eda7227b..51c521649a0 100644
--- a/src/frontends/common_translators/src/op/unsqueeze.cpp
+++ b/src/frontends/common_translators/src/op/unsqueeze.cpp
@@ -15,9 +15,7 @@
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
OutputVector translate_unsqueeze(const NodeContext& context) {
num_inputs_check(context, 2, 2, true);
@@ -51,6 +49,4 @@ OutputVector translate_unsqueeze(const NodeContext& context) {
return {res};
};
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
\ No newline at end of file
+} // namespace ov::frontend::common_translators
\ No newline at end of file
diff --git a/src/frontends/common_translators/src/sequence_array_lowering.cpp b/src/frontends/common_translators/src/sequence_array_lowering.cpp
index 1b778890493..082f41f7cbd 100644
--- a/src/frontends/common_translators/src/sequence_array_lowering.cpp
+++ b/src/frontends/common_translators/src/sequence_array_lowering.cpp
@@ -40,9 +40,7 @@
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
namespace sal_detail {
namespace {
@@ -588,6 +586,4 @@ bool SequenceArrayLowering::run_on_model(const std::shared_ptr<ov::Model>& model
return overall_changed || resolver.changed();
}
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/src/sequence_concat_replacer.cpp b/src/frontends/common_translators/src/sequence_concat_replacer.cpp
index 1f92bbb2bcf..03738d2562d 100644
--- a/src/frontends/common_translators/src/sequence_concat_replacer.cpp
+++ b/src/frontends/common_translators/src/sequence_concat_replacer.cpp
@@ -26,9 +26,7 @@
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
namespace {
constexpr size_t INVALID_INDEX = std::numeric_limits<size_t>::max();
@@ -302,6 +300,4 @@ SequenceConcatReplacer::SequenceConcatReplacer() {
register_matcher(m, callback);
}
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/src/sequence_if_replacer.cpp b/src/frontends/common_translators/src/sequence_if_replacer.cpp
index eeb4364c5c9..3a84b047f18 100644
--- a/src/frontends/common_translators/src/sequence_if_replacer.cpp
+++ b/src/frontends/common_translators/src/sequence_if_replacer.cpp
@@ -25,9 +25,7 @@
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace pass {
+namespace ov::frontend::pass {
namespace {
// Strip v16::Identity wrappers to expose the underlying node.
@@ -297,6 +295,4 @@ bool SequenceIfReplacer::run_on_model(const std::shared_ptr<ov::Model>& model) {
return overall_changed;
}
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass
diff --git a/src/frontends/common_translators/src/slot_resolver.cpp b/src/frontends/common_translators/src/slot_resolver.cpp
index d5b44bf0961..58b5ec8ea02 100644
--- a/src/frontends/common_translators/src/slot_resolver.cpp
+++ b/src/frontends/common_translators/src/slot_resolver.cpp
@@ -43,10 +43,7 @@
using namespace ov::op;
-namespace ov {
-namespace frontend {
-namespace pass {
-namespace sal_detail {
+namespace ov::frontend::pass::sal_detail {
// Shape-preserving select using v8::If; unlike v1::Select, does not broadcast inputs.
ov::Output<ov::Node> make_shape_preserving_select(const ov::Output<ov::Node>& cond_in,
@@ -965,7 +962,4 @@ std::optional<Slots> SlotResolver::slots_of_msg_output(const std::shared_ptr<ov:
return outer_outputs;
}
-} // namespace sal_detail
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass::sal_detail
diff --git a/src/frontends/common_translators/src/slot_resolver.hpp b/src/frontends/common_translators/src/slot_resolver.hpp
index 5ecba6cd823..4cdc9b8abb3 100644
--- a/src/frontends/common_translators/src/slot_resolver.hpp
+++ b/src/frontends/common_translators/src/slot_resolver.hpp
@@ -19,10 +19,7 @@
#include "openvino/op/parameter.hpp"
#include "openvino/op/util/multi_subgraph_base.hpp"
-namespace ov {
-namespace frontend {
-namespace pass {
-namespace sal_detail {
+namespace ov::frontend::pass::sal_detail {
using Slots = std::vector<ov::Output<ov::Node>>;
@@ -118,10 +115,10 @@ private:
// possible. Returns false when the branch cannot be safely expanded (opaque-
// forward with no mirrorable Parameters).
bool expand_branch_to_n_slots(const std::shared_ptr<ov::op::util::MultiSubGraphOp>& msg,
- size_t b,
- size_t ref,
- size_t N,
- std::vector<Slots>& per_body_slots);
+ size_t b,
+ size_t ref,
+ size_t N,
+ std::vector<Slots>& per_body_slots);
std::optional<LengthTemplate> find_template_via_chain(const ov::Output<ov::Node>& root_value, ov::Node* exclude_p);
std::shared_ptr<ov::Model> root_;
@@ -133,7 +130,4 @@ private:
bool changed_ = false;
};
-} // namespace sal_detail
-} // namespace pass
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::pass::sal_detail
diff --git a/src/frontends/common_translators/src/unconverted_ops_report.cpp b/src/frontends/common_translators/src/unconverted_ops_report.cpp
index 64b99857359..8f2be2b1833 100644
--- a/src/frontends/common_translators/src/unconverted_ops_report.cpp
+++ b/src/frontends/common_translators/src/unconverted_ops_report.cpp
@@ -9,8 +9,7 @@
#include "openvino/frontend/exception.hpp"
#include "openvino/util/common_util.hpp"
-namespace ov {
-namespace frontend {
+namespace ov::frontend {
bool UnconvertedOpsReport::has_issues() const {
return !unconverted_ops.empty();
@@ -153,5 +152,4 @@ void check_unconverted_ops(const UnconvertedOpsReport& report,
}
}
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend
diff --git a/src/frontends/common_translators/src/utils.cpp b/src/frontends/common_translators/src/utils.cpp
index 0381a53a613..28f629b499b 100644
--- a/src/frontends/common_translators/src/utils.cpp
+++ b/src/frontends/common_translators/src/utils.cpp
@@ -7,9 +7,7 @@
#include "openvino/frontend/complex_type_mark.hpp"
#include "openvino/frontend/exception.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
void num_inputs_check(const NodeContext& context, size_t min_inputs, size_t max_inputs, bool allow_complex) {
auto num_inputs = context.get_input_size();
@@ -32,6 +30,4 @@ void num_inputs_check(const NodeContext& context, size_t min_inputs, size_t max_
}
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/common_translators/src/utils.hpp b/src/frontends/common_translators/src/utils.hpp
index b80af4dc664..8a6a2d8bf2f 100644
--- a/src/frontends/common_translators/src/utils.hpp
+++ b/src/frontends/common_translators/src/utils.hpp
@@ -8,9 +8,7 @@
#include "openvino/op/constant.hpp"
#include "openvino/op/convert_like.hpp"
-namespace ov {
-namespace frontend {
-namespace common_translators {
+namespace ov::frontend::common_translators {
void num_inputs_check(const NodeContext& context, size_t min_inputs, size_t max_inputs, bool allow_complex = false);
@@ -39,6 +37,4 @@ ov::Output<ov::Node> create_same_type_const(const ov::Output<ov::Node>& same_typ
}
}
-} // namespace common_translators
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::common_translators
diff --git a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/graph_context.hpp b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/graph_context.hpp
index 50ee5fc8b9c..ef8b133e3e9 100644
--- a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/graph_context.hpp
+++ b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/graph_context.hpp
@@ -17,9 +17,7 @@
#include "openvino/frontend/gguf/decoder.hpp"
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Graph operations and shared decoder blocks. Operands use GGML order; shapes use OpenVINO order.
class GGUF_FRONTEND_API GgufGraphContext {
@@ -87,6 +85,4 @@ private:
std::unique_ptr<Impl> m_impl;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/metadata.hpp b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/metadata.hpp
index 351cc3211e2..f6272a61fbd 100644
--- a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/metadata.hpp
+++ b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/metadata.hpp
@@ -11,9 +11,7 @@
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace detail {
// Keep the parser metadata representation out of the developer API.
@@ -48,6 +46,4 @@ private:
const detail::MetadataStore* m_store;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/model_builder.hpp b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/model_builder.hpp
index d3071d0ffeb..03e2ce8d3cb 100644
--- a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/model_builder.hpp
+++ b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/model_builder.hpp
@@ -10,9 +10,7 @@
#include "openvino/frontend/gguf/builder/metadata.hpp"
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Opaque graph produced by GgufGraphContext; defined in builder/gguf_graph.hpp.
struct GgufGraph;
@@ -43,6 +41,4 @@ public:
virtual std::shared_ptr<GgufGraph> build() = 0;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/tensor_table.hpp b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/tensor_table.hpp
index 31ba4bea836..8087701686e 100644
--- a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/tensor_table.hpp
+++ b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/tensor_table.hpp
@@ -9,9 +9,7 @@
#include "openvino/frontend/gguf/builder/value.hpp"
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
class GgufGraphContext;
@@ -36,6 +34,4 @@ private:
GgufGraphContext* m_ctx;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/value.hpp b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/value.hpp
index 19a5eb9e423..37a74760aa6 100644
--- a/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/value.hpp
+++ b/src/frontends/gguf/dev_api/openvino/frontend/gguf/builder/value.hpp
@@ -12,9 +12,7 @@
#include "openvino/core/type/element_type.hpp"
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Named OpenVINO output; shape and type come from OpenVINO inference.
// Default construction yields an empty handle, also used for absent optional weights.
@@ -57,6 +55,4 @@ private:
ov::Output<ov::Node> m_value;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/include/openvino/frontend/gguf/adapt_to_genai.hpp b/src/frontends/gguf/include/openvino/frontend/gguf/adapt_to_genai.hpp
index cfbb3255568..fe0b47781a3 100644
--- a/src/frontends/gguf/include/openvino/frontend/gguf/adapt_to_genai.hpp
+++ b/src/frontends/gguf/include/openvino/frontend/gguf/adapt_to_genai.hpp
@@ -7,10 +7,7 @@
#include "openvino/frontend/gguf/visibility.hpp"
#include "openvino/pass/pass.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace pass {
+namespace ov::frontend::gguf::pass {
/// \brief Rewrite a GGUF-frontend model's llama.cpp-style IO into the OpenVINO GenAI
/// LLMPipeline IO contract, so the model can be driven by genai's stateful pipeline.
@@ -60,7 +57,4 @@ private:
InputMode m_mode;
};
-} // namespace pass
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::pass
diff --git a/src/frontends/gguf/include/openvino/frontend/gguf/tokenizer_metadata.hpp b/src/frontends/gguf/include/openvino/frontend/gguf/tokenizer_metadata.hpp
index 7c1b9c7af8d..eecb401db10 100644
--- a/src/frontends/gguf/include/openvino/frontend/gguf/tokenizer_metadata.hpp
+++ b/src/frontends/gguf/include/openvino/frontend/gguf/tokenizer_metadata.hpp
@@ -8,9 +8,7 @@
#include "openvino/core/runtime_attribute.hpp"
#include "openvino/frontend/gguf/visibility.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
/// \brief Carries the GGUF tokenizer metadata (the `tokenizer.*` ggml keys) on a converted
/// model's runtime info, so a downstream consumer (e.g. OpenVINO GenAI) can build the
@@ -53,6 +51,4 @@ public:
/// Runtime-info key under which GGUFTokenizerMetadata is stored on the model.
GGUF_FRONTEND_API const std::string& gguf_tokenizer_metadata_key();
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/api/graph_context.cpp b/src/frontends/gguf/src/builder/api/graph_context.cpp
index 58c34a95aaa..71e31ebe525 100644
--- a/src/frontends/gguf/src/builder/api/graph_context.cpp
+++ b/src/frontends/gguf/src/builder/api/graph_context.cpp
@@ -14,9 +14,7 @@
#include "builder/blocks/gated_delta_net.hpp"
#include "openvino/op/constant.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
using ov::element::f32;
using ov::element::i32;
@@ -256,6 +254,4 @@ std::shared_ptr<GgufGraph> GgufGraphContext::finish() {
return graph;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/api/graph_context_impl.hpp b/src/frontends/gguf/src/builder/api/graph_context_impl.hpp
index 01a7efcf95f..4310fe3ed95 100644
--- a/src/frontends/gguf/src/builder/api/graph_context_impl.hpp
+++ b/src/frontends/gguf/src/builder/api/graph_context_impl.hpp
@@ -13,9 +13,7 @@
#include "openvino/core/except.hpp"
#include "openvino/frontend/gguf/builder/graph_context.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
struct GgufGraphContext::Impl {
explicit Impl(const BuildContext& ctx)
@@ -55,6 +53,4 @@ struct GgufGraphContext::Impl {
}
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/api/metadata_store.hpp b/src/frontends/gguf/src/builder/api/metadata_store.hpp
index 504f417e7d8..33a3a0686df 100644
--- a/src/frontends/gguf/src/builder/api/metadata_store.hpp
+++ b/src/frontends/gguf/src/builder/api/metadata_store.hpp
@@ -14,9 +14,7 @@
#include "openvino/runtime/tensor.hpp"
#include "quant/gguf.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
class GraphEmitter;
@@ -41,6 +39,4 @@ struct WeightStore {
};
} // namespace detail
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/api/tensor_table.cpp b/src/frontends/gguf/src/builder/api/tensor_table.cpp
index e49aa338ce7..96309b2f32f 100644
--- a/src/frontends/gguf/src/builder/api/tensor_table.cpp
+++ b/src/frontends/gguf/src/builder/api/tensor_table.cpp
@@ -11,9 +11,7 @@
#include "openvino/frontend/gguf/builder/value.hpp"
#include "openvino/util/common_util.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
int64_t GgufValue::ne(size_t i) const {
if (empty() || shape().rank().is_dynamic()) {
@@ -65,6 +63,4 @@ GgufValue GgufTensors::layer(int il, const std::string& suffix) const {
return (*this)("blk." + std::to_string(il) + "." + suffix);
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/arch/decoder_builder.cpp b/src/frontends/gguf/src/builder/arch/decoder_builder.cpp
index e33f0444ad6..e664f6c9ce1 100644
--- a/src/frontends/gguf/src/builder/arch/decoder_builder.cpp
+++ b/src/frontends/gguf/src/builder/arch/decoder_builder.cpp
@@ -22,9 +22,7 @@
#include "builder/blocks/gated_delta_net.hpp"
#include "openvino/op/parameter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
using ov::element::f32;
using ov::element::i32;
@@ -353,6 +351,4 @@ std::shared_ptr<GgufGraph> DecoderBuilder::build() {
return graph;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/arch/decoder_builder.hpp b/src/frontends/gguf/src/builder/arch/decoder_builder.hpp
index a19c919a64f..ce3bc5ae9ae 100644
--- a/src/frontends/gguf/src/builder/arch/decoder_builder.hpp
+++ b/src/frontends/gguf/src/builder/arch/decoder_builder.hpp
@@ -16,9 +16,7 @@
#include "openvino/frontend/gguf/builder/model_builder.hpp"
#include "quant/gguf.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Whole-model builder for the causal decoder family: the "llama family" of dense and MoE
// decoder-only transformers (llama-3, qwen2/2.5/3, phi-3, minicpm, gemma 1-4, gpt-oss, OLMoE,
@@ -68,6 +66,4 @@ private:
blocks::KvCachePlan m_kv;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/blocks/attention.cpp b/src/frontends/gguf/src/builder/blocks/attention.cpp
index 231382e6390..64aff831cc2 100644
--- a/src/frontends/gguf/src/builder/blocks/attention.cpp
+++ b/src/frontends/gguf/src/builder/blocks/attention.cpp
@@ -10,10 +10,7 @@
#include "builder/blocks/common.hpp"
#include "builder/blocks/qkv_repack.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
using ov::element::f32;
@@ -273,7 +270,4 @@ std::string attention(GraphEmitter& e,
return attn_out;
}
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/attention.hpp b/src/frontends/gguf/src/builder/blocks/attention.hpp
index 0104e05c00c..34ebe803719 100644
--- a/src/frontends/gguf/src/builder/blocks/attention.hpp
+++ b/src/frontends/gguf/src/builder/blocks/attention.hpp
@@ -9,10 +9,7 @@
#include "builder/decoder_config.hpp"
#include "builder/graph_emitter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
// Per-layer KV-cache routing, precomputed once for the whole stack.
//
@@ -41,7 +38,4 @@ std::string attention(GraphEmitter& e,
int il,
const std::string& attn_norm);
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/common.cpp b/src/frontends/gguf/src/builder/blocks/common.cpp
index 7430aa141db..8806d542c79 100644
--- a/src/frontends/gguf/src/builder/blocks/common.cpp
+++ b/src/frontends/gguf/src/builder/blocks/common.cpp
@@ -4,10 +4,7 @@
#include "builder/blocks/common.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
std::string rms_norm(GraphEmitter& e,
const std::string& in,
@@ -28,7 +25,4 @@ std::string add_bias(GraphEmitter& e, const std::string& x, const std::string& b
return e.add_op("GGML_OP_ADD", name, {x, bias_weight});
}
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/common.hpp b/src/frontends/gguf/src/builder/blocks/common.hpp
index b79961fb29f..3cb2cc99f26 100644
--- a/src/frontends/gguf/src/builder/blocks/common.hpp
+++ b/src/frontends/gguf/src/builder/blocks/common.hpp
@@ -8,10 +8,7 @@
#include "builder/graph_emitter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
// Small, architecture-agnostic graph fragments shared by every model family.
//
@@ -34,7 +31,4 @@ std::string scale(GraphEmitter& e, const std::string& x, float factor, const std
// Elementwise add of a (broadcast) bias weight: GGML_OP_ADD(x, bias_weight).
std::string add_bias(GraphEmitter& e, const std::string& x, const std::string& bias_weight, const std::string& name);
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/ffn.cpp b/src/frontends/gguf/src/builder/blocks/ffn.cpp
index a9a736712e0..a59b218258d 100644
--- a/src/frontends/gguf/src/builder/blocks/ffn.cpp
+++ b/src/frontends/gguf/src/builder/blocks/ffn.cpp
@@ -8,10 +8,7 @@
#include "builder/blocks/common.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
namespace {
@@ -210,7 +207,4 @@ std::string moe_ffn(GraphEmitter& e, const DecoderConfig& cfg, const std::string
return moe_out;
}
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/ffn.hpp b/src/frontends/gguf/src/builder/blocks/ffn.hpp
index 75e7a75ee57..f2dbdd3ed3f 100644
--- a/src/frontends/gguf/src/builder/blocks/ffn.hpp
+++ b/src/frontends/gguf/src/builder/blocks/ffn.hpp
@@ -9,10 +9,7 @@
#include "builder/decoder_config.hpp"
#include "builder/graph_emitter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
// Feed-forward sublayers of the decoder block, mirroring llm_graph_context::build_ffn /
// build_moe_ffn. `prefix` is the layer prefix ("blk.<il>."), `ffn_norm` the pre-FFN normed hidden,
@@ -39,7 +36,4 @@ std::string geglu_ffn(GraphEmitter& e,
// always-active shared experts.
std::string moe_ffn(GraphEmitter& e, const DecoderConfig& cfg, const std::string& prefix, const std::string& ffn_norm);
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/gated_delta_net.cpp b/src/frontends/gguf/src/builder/blocks/gated_delta_net.cpp
index d199e5350e5..37e9844fdab 100644
--- a/src/frontends/gguf/src/builder/blocks/gated_delta_net.cpp
+++ b/src/frontends/gguf/src/builder/blocks/gated_delta_net.cpp
@@ -9,10 +9,7 @@
#include "builder/blocks/common.hpp"
#include "openvino/core/except.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
std::string gated_delta_net(GraphEmitter& e, const DecoderConfig& cfg, int il, const std::string& attn_norm) {
using ov::element::f32;
@@ -148,7 +145,4 @@ std::string gated_delta_net(GraphEmitter& e, const DecoderConfig& cfg, int il, c
return e.add_op("GGML_OP_MUL_MAT", p + "linear_attn_out", {p + "ssm_out.weight", out});
}
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/gated_delta_net.hpp b/src/frontends/gguf/src/builder/blocks/gated_delta_net.hpp
index 308cc4b0f88..956ca92e064 100644
--- a/src/frontends/gguf/src/builder/blocks/gated_delta_net.hpp
+++ b/src/frontends/gguf/src/builder/blocks/gated_delta_net.hpp
@@ -9,10 +9,7 @@
#include "builder/decoder_config.hpp"
#include "builder/graph_emitter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
// qwen35 linear-attention (Gated DeltaNet) layer.
// Mirrors llama.cpp src/models/qwen35.cpp build_layer_attn_linear + delta-net-base.cpp.
@@ -25,7 +22,4 @@ namespace blocks {
// and MakeStateful's Concat path does not apply to them.
std::string gated_delta_net(GraphEmitter& e, const DecoderConfig& cfg, int il, const std::string& attn_norm);
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/qkv_repack.cpp b/src/frontends/gguf/src/builder/blocks/qkv_repack.cpp
index 9e6e2c051fc..6a1ee448d62 100644
--- a/src/frontends/gguf/src/builder/blocks/qkv_repack.cpp
+++ b/src/frontends/gguf/src/builder/blocks/qkv_repack.cpp
@@ -8,10 +8,7 @@
#include "quant/weights.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
void register_fused_qkv(GraphEmitter& e, const DecoderConfig& cfg, int il) {
const std::string p = "blk." + std::to_string(il) + ".";
@@ -44,7 +41,4 @@ void register_qwen35_q_gate(GraphEmitter& e, const DecoderConfig& cfg, int il) {
}
}
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/blocks/qkv_repack.hpp b/src/frontends/gguf/src/builder/blocks/qkv_repack.hpp
index c2aece9e6ec..a2bad382012 100644
--- a/src/frontends/gguf/src/builder/blocks/qkv_repack.hpp
+++ b/src/frontends/gguf/src/builder/blocks/qkv_repack.hpp
@@ -3,16 +3,12 @@
//
#pragma once
-
#include <string>
#include "builder/decoder_config.hpp"
#include "builder/graph_emitter.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace blocks {
+namespace ov::frontend::gguf::blocks {
// Weight-level repacking that happens before any op is emitted for a layer, so the rest of the
// attention path only ever sees the plain blk.<il>.attn_{q,k,v}.weight / attn_gate.weight nodes and
@@ -29,7 +25,4 @@ void register_fused_qkv(GraphEmitter& e, const DecoderConfig& cfg, int il);
// (src/models/qwen35.cpp build_layer_attn).
void register_qwen35_q_gate(GraphEmitter& e, const DecoderConfig& cfg, int il);
-} // namespace blocks
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::blocks
diff --git a/src/frontends/gguf/src/builder/decoder_config.cpp b/src/frontends/gguf/src/builder/decoder_config.cpp
index 887755ddd4e..45b751eea30 100644
--- a/src/frontends/gguf/src/builder/decoder_config.cpp
+++ b/src/frontends/gguf/src/builder/decoder_config.cpp
@@ -16,9 +16,7 @@
#include "arch_registry.hpp"
#include "openvino/core/except.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -330,6 +328,4 @@ bool DecoderConfig::is_recurrent_layer(int il) const {
return full_attn_interval > 0 && ((il + 1) % full_attn_interval != 0);
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/decoder_config.hpp b/src/frontends/gguf/src/builder/decoder_config.hpp
index 263f73d43f9..2865558cf15 100644
--- a/src/frontends/gguf/src/builder/decoder_config.hpp
+++ b/src/frontends/gguf/src/builder/decoder_config.hpp
@@ -13,9 +13,7 @@
#include "openvino/runtime/tensor.hpp"
#include "quant/gguf.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Internal configuration resolved from metadata, tensor shapes and architecture semantics.
// Extensions override ambiguous semantics through DecoderOptions before dependent plans are built.
@@ -148,6 +146,4 @@ struct DecoderConfig {
bool is_recurrent_layer(int il) const;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/gguf_builder.cpp b/src/frontends/gguf/src/builder/gguf_builder.cpp
index c9855cfc9d7..8aed121bd94 100644
--- a/src/frontends/gguf/src/builder/gguf_builder.cpp
+++ b/src/frontends/gguf/src/builder/gguf_builder.cpp
@@ -19,9 +19,7 @@
#include "openvino/util/log.hpp"
#include "quant/gguf.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -97,6 +95,4 @@ GraphBuilder load_gguf_builder(const std::string& file, const ArchRegistry& regi
};
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/gguf_builder.hpp b/src/frontends/gguf/src/builder/gguf_builder.hpp
index f6dd95a45b4..8703e769e36 100644
--- a/src/frontends/gguf/src/builder/gguf_builder.hpp
+++ b/src/frontends/gguf/src/builder/gguf_builder.hpp
@@ -10,9 +10,7 @@
#include "node_context.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
struct GgufGraph; // defined in gguf_graph.hpp; only used here as a shared_ptr return type
class ArchRegistry;
@@ -21,6 +19,4 @@ using GraphBuilder = std::function<std::shared_ptr<GgufGraph>(const std::unorder
// Parse the file and select a definition; invoke the builder with the converters active at conversion.
GraphBuilder load_gguf_builder(const std::string& file, const ArchRegistry& registry);
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/gguf_builder_decoder.cpp b/src/frontends/gguf/src/builder/gguf_builder_decoder.cpp
index 16ca7364916..00977437a2a 100644
--- a/src/frontends/gguf/src/builder/gguf_builder_decoder.cpp
+++ b/src/frontends/gguf/src/builder/gguf_builder_decoder.cpp
@@ -8,9 +8,7 @@
#include "openvino/core/except.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
GgufBuilderDecoder::GgufBuilderDecoder(std::shared_ptr<GgufGraph> graph, int node_index)
: m_graph(std::move(graph)),
@@ -131,6 +129,4 @@ const ov::AnyMap& GgufBuilderDecoder::get_tokenizer_config() const {
return m_graph->tokenizer_config;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/gguf_builder_decoder.hpp b/src/frontends/gguf/src/builder/gguf_builder_decoder.hpp
index 5ccf4fe2331..288f96102d8 100644
--- a/src/frontends/gguf/src/builder/gguf_builder_decoder.hpp
+++ b/src/frontends/gguf/src/builder/gguf_builder_decoder.hpp
@@ -9,9 +9,7 @@
#include "gguf_graph.hpp"
#include "openvino/frontend/gguf/decoder.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// GgufDecoder implementation over a GgufGraph built natively from a .gguf file (no
// llama.cpp / gguf dependency). It is the OpenVINO-side counterpart of llama.cpp's
@@ -58,6 +56,4 @@ private:
const GgufOp& node() const;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/gguf_graph.hpp b/src/frontends/gguf/src/builder/gguf_graph.hpp
index b36c2fe7757..5cd59340186 100644
--- a/src/frontends/gguf/src/builder/gguf_graph.hpp
+++ b/src/frontends/gguf/src/builder/gguf_graph.hpp
@@ -16,9 +16,7 @@
#include "openvino/core/type/element_type.hpp"
#include "openvino/frontend/gguf/decoder.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// One operation node in the GGUF-built graph, expressed in the GGML op vocabulary
// ("GGML_OP_MUL_MAT", "GGML_OP_ROPE", ...). It mirrors exactly what the GgufDecoder
@@ -79,6 +77,4 @@ struct GgufGraph {
ov::AnyMap tokenizer_config;
};
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/graph_emitter.cpp b/src/frontends/gguf/src/builder/graph_emitter.cpp
index 1ec2572b955..2e6c1e46b38 100644
--- a/src/frontends/gguf/src/builder/graph_emitter.cpp
+++ b/src/frontends/gguf/src/builder/graph_emitter.cpp
@@ -10,9 +10,7 @@
#include "openvino/op/constant.hpp"
#include "translate_session.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -181,6 +179,4 @@ void GraphEmitter::add_named_weight(const std::string& ggml_name) {
emit_weight_op(ggml_name, {w, {}, {}}, qtype);
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/graph_emitter.hpp b/src/frontends/gguf/src/builder/graph_emitter.hpp
index 4af1cc29895..446ecded080 100644
--- a/src/frontends/gguf/src/builder/graph_emitter.hpp
+++ b/src/frontends/gguf/src/builder/graph_emitter.hpp
@@ -20,9 +20,7 @@
#include "quant/gguf.hpp"
#include "quant/weights.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Builds OpenVINO values through the shared GGML converters.
class GraphEmitter {
@@ -124,6 +122,4 @@ inline ov::PartialShape ps(std::vector<int64_t> dims) {
return ov::PartialShape(std::move(dims));
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/model_kind.cpp b/src/frontends/gguf/src/builder/model_kind.cpp
index 8f4953bca8a..c7a75f2bf59 100644
--- a/src/frontends/gguf/src/builder/model_kind.cpp
+++ b/src/frontends/gguf/src/builder/model_kind.cpp
@@ -6,9 +6,7 @@
#include <variant>
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -63,6 +61,4 @@ const char* model_kind_name(ModelKind kind) {
}
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/builder/model_kind.hpp b/src/frontends/gguf/src/builder/model_kind.hpp
index a658110cbe5..10882fca1c7 100644
--- a/src/frontends/gguf/src/builder/model_kind.hpp
+++ b/src/frontends/gguf/src/builder/model_kind.hpp
@@ -9,9 +9,7 @@
#include "quant/gguf.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// Which FAMILY of model a .gguf file holds. This is the first thing the builder decides, before
// any hyperparameter is read, because the metadata key layout itself differs per family: a causal
@@ -37,6 +35,4 @@ ModelKind detect_model_kind(const std::unordered_map<std::string, GGUFMetaData>&
// Human-readable name for a kind, used in diagnostics.
const char* model_kind_name(ModelKind kind);
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/frontend.cpp b/src/frontends/gguf/src/frontend.cpp
index b783efb665f..9b3059be023 100644
--- a/src/frontends/gguf/src/frontend.cpp
+++ b/src/frontends/gguf/src/frontend.cpp
@@ -22,9 +22,7 @@
#include "openvino/frontend/manager.hpp"
#include "translate_session.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
// This frontend has two ingest paths, both converging on the same GgufDecoder + op translators:
// 1. a live GgufDecoder passed in by a direct linker (the llama.cpp ggml-openvino cgraph path);
@@ -169,9 +167,7 @@ InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& variants) const
"or a path to a .gguf file.");
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
// Plugin registration. Exports the standard entry points so FrontEndManager can load the library;
// selection is covered by the discoverability note at the top of this file.
diff --git a/src/frontends/gguf/src/helper_ops/set_rows_op.cpp b/src/frontends/gguf/src/helper_ops/set_rows_op.cpp
index 1b36605a270..3d07a3324db 100644
--- a/src/frontends/gguf/src/helper_ops/set_rows_op.cpp
+++ b/src/frontends/gguf/src/helper_ops/set_rows_op.cpp
@@ -4,9 +4,7 @@
#include "openvino/frontend/gguf/set_rows_op.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
SetRows::SetRows(const ov::Output<ov::Node>& data, const ov::Output<ov::Node>& indices, const ov::Output<ov::Node>& dst)
: ov::op::Op({data, indices, dst}) {
@@ -24,6 +22,4 @@ std::shared_ptr<ov::Node> SetRows::clone_with_new_inputs(const ov::OutputVector&
return std::make_shared<SetRows>(new_args[0], new_args[1], new_args[2]);
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/input_model.cpp b/src/frontends/gguf/src/input_model.cpp
index 0f113df25d4..73595f8225e 100644
--- a/src/frontends/gguf/src/input_model.cpp
+++ b/src/frontends/gguf/src/input_model.cpp
@@ -7,9 +7,7 @@
#include "openvino/frontend/exception.hpp"
#include "openvino/frontend/gguf/decoder.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
InputModel::InputModel(const std::shared_ptr<GgufDecoder>& gdecoder) : m_decoder(gdecoder) {}
@@ -44,6 +42,4 @@ const std::shared_ptr<GgufDecoder>& InputModel::get_model_decoder() const {
return m_decoder;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/op/add_id.cpp b/src/frontends/gguf/src/op/add_id.cpp
index b9db386c6e5..309cf53e910 100644
--- a/src/frontends/gguf/src/op/add_id.cpp
+++ b/src/frontends/gguf/src/op/add_id.cpp
@@ -16,10 +16,7 @@
#include "openvino/op/shape_of.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
// Collapse a 4D [1, 1, a, b] input to 2D [a, b] when it isn't already 2D. Bias/id constants may
@@ -74,7 +71,4 @@ OutputVector translate_add_id(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/argsort.cpp b/src/frontends/gguf/src/op/argsort.cpp
index fb47dc48395..471733281af 100644
--- a/src/frontends/gguf/src/op/argsort.cpp
+++ b/src/frontends/gguf/src/op/argsort.cpp
@@ -12,10 +12,7 @@
#include "openvino/op/topk.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_ARGSORT: return the indices that sort the last dimension. The decoder maps ggml's
// GGML_SORT_ORDER_ASC/DESC enum to a plain int "sort_order" (0 = ascending, 1 = descending), so
@@ -48,7 +45,4 @@ OutputVector translate_argsort(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(indices)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/clamp.cpp b/src/frontends/gguf/src/op/clamp.cpp
index 7d7c28d08dd..a6a1955570e 100644
--- a/src/frontends/gguf/src/op/clamp.cpp
+++ b/src/frontends/gguf/src/op/clamp.cpp
@@ -10,10 +10,7 @@
#include "op_table.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_CLAMP: elementwise clamp to [min, max]. The decoder exposes the bounds as typed
// float attributes ("clamp_min"/"clamp_max"), so the translator never reads ggml op_params.
@@ -28,7 +25,4 @@ OutputVector translate_clamp(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/concat.cpp b/src/frontends/gguf/src/op/concat.cpp
index 1056f624c6f..7f0dfa796d6 100644
--- a/src/frontends/gguf/src/op/concat.cpp
+++ b/src/frontends/gguf/src/op/concat.cpp
@@ -12,10 +12,7 @@
#include "openvino/op/convert.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_CONCAT: concatenate two inputs along a ggml axis. The decoder exposes the raw ggml
// dimension index as "concat_axis"; here it is converted to the reversed OV axis order.
@@ -43,7 +40,4 @@ OutputVector translate_concat(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/cont.cpp b/src/frontends/gguf/src/op/cont.cpp
index 38a58c49fe7..0fae905ed65 100644
--- a/src/frontends/gguf/src/op/cont.cpp
+++ b/src/frontends/gguf/src/op/cont.cpp
@@ -12,10 +12,7 @@
#include "openvino/op/reshape.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_cont(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -62,7 +59,4 @@ OutputVector translate_cont(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/cpy.cpp b/src/frontends/gguf/src/op/cpy.cpp
index 5a283010005..0b8e2a6fcf4 100644
--- a/src/frontends/gguf/src/op/cpy.cpp
+++ b/src/frontends/gguf/src/op/cpy.cpp
@@ -21,10 +21,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_cpy(const NodeContext& context) {
const int op_case = context.get_op_case();
@@ -220,7 +217,4 @@ OutputVector translate_cpy(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/cumsum.cpp b/src/frontends/gguf/src/op/cumsum.cpp
index a45fe46fa11..8c7fd62c0c1 100644
--- a/src/frontends/gguf/src/op/cumsum.cpp
+++ b/src/frontends/gguf/src/op/cumsum.cpp
@@ -10,10 +10,7 @@
#include "openvino/op/cum_sum.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_CUMSUM computes a prefix sum along ggml dim 0 (the innermost/fastest dimension).
// The frontend works in OV layout (ggml [ne0, ne1, ne2, ne3] -> OV [ne3, ne2, ne1, ne0]), so
@@ -28,7 +25,4 @@ OutputVector translate_cumsum(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/diag.cpp b/src/frontends/gguf/src/op/diag.cpp
index e666d7715a5..13c4a2002cf 100644
--- a/src/frontends/gguf/src/op/diag.cpp
+++ b/src/frontends/gguf/src/op/diag.cpp
@@ -12,10 +12,7 @@
#include "openvino/op/multiply.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_DIAG turns a vector into a diagonal matrix: a ggml [ne0, 1, ne2, ne3] input becomes
// [ne0, ne0, ne2, ne3] with output[..., i, j] = input[..., 0, j] when i == j, else 0.
@@ -47,7 +44,4 @@ OutputVector translate_diag(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/div.cpp b/src/frontends/gguf/src/op/div.cpp
index b7e16cf53bc..5ad93e7c772 100644
--- a/src/frontends/gguf/src/op/div.cpp
+++ b/src/frontends/gguf/src/op/div.cpp
@@ -19,10 +19,7 @@
#include "openvino/op/util/precision_sensitive_attribute.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
@@ -152,7 +149,4 @@ OutputVector translate_div(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/fill.cpp b/src/frontends/gguf/src/op/fill.cpp
index 7cc739c851a..a82184cc364 100644
--- a/src/frontends/gguf/src/op/fill.cpp
+++ b/src/frontends/gguf/src/op/fill.cpp
@@ -13,10 +13,7 @@
#include "openvino/op/shape_of.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_FILL sets every element of a tensor to a constant. The scalar is provided by the decoder
// as the "fill_value" attribute (ggml stores it as a float in op_params[0]). The output has the same
@@ -36,7 +33,4 @@ OutputVector translate_fill(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/flash_attn_ext.cpp b/src/frontends/gguf/src/op/flash_attn_ext.cpp
index 9abebd743fe..1614656822e 100644
--- a/src/frontends/gguf/src/op/flash_attn_ext.cpp
+++ b/src/frontends/gguf/src/op/flash_attn_ext.cpp
@@ -31,10 +31,7 @@
#include "openvino/op/unsqueeze.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_flash_attn_ext(const NodeContext& context) {
num_inputs_check(context, 4, 5);
@@ -200,7 +197,4 @@ OutputVector translate_flash_attn_ext(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/gated_delta_net.cpp b/src/frontends/gguf/src/op/gated_delta_net.cpp
index f0212f4e3c6..0db4f9e1ebe 100644
--- a/src/frontends/gguf/src/op/gated_delta_net.cpp
+++ b/src/frontends/gguf/src/op/gated_delta_net.cpp
@@ -29,10 +29,7 @@
#include "openvino/op/unsqueeze.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
static OutputVector translate_gated_delta_net_ref(const NodeContext& context);
@@ -270,7 +267,4 @@ static OutputVector translate_gated_delta_net_ref(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/get_rows.cpp b/src/frontends/gguf/src/op/get_rows.cpp
index 81d2b5a002b..fffffb6630d 100644
--- a/src/frontends/gguf/src/op/get_rows.cpp
+++ b/src/frontends/gguf/src/op/get_rows.cpp
@@ -15,10 +15,7 @@
#include "openvino/op/unsqueeze.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_get_rows(const NodeContext& context) {
num_inputs_check(context, 2, 2);
@@ -101,7 +98,4 @@ OutputVector translate_get_rows(const NodeContext& context) {
return rename_outputs_with_suffix({convert_rows(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/glu_geglu.cpp b/src/frontends/gguf/src/op/glu_geglu.cpp
index f6e5996cac8..b87a3b30558 100644
--- a/src/frontends/gguf/src/op/glu_geglu.cpp
+++ b/src/frontends/gguf/src/op/glu_geglu.cpp
@@ -14,10 +14,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_glu_geglu(const NodeContext& context) {
num_inputs_check(context, 1, 2);
@@ -60,7 +57,4 @@ OutputVector translate_glu_geglu(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/glu_swiglu.cpp b/src/frontends/gguf/src/op/glu_swiglu.cpp
index d6070fae30e..5bae16b660c 100644
--- a/src/frontends/gguf/src/op/glu_swiglu.cpp
+++ b/src/frontends/gguf/src/op/glu_swiglu.cpp
@@ -18,10 +18,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
// Resolve the two GLU halves: either two explicit inputs, or one combined tensor split along the
@@ -94,7 +91,4 @@ OutputVector translate_glu_swiglu_oai(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/im2col.cpp b/src/frontends/gguf/src/op/im2col.cpp
index 0fd63f8dd6d..d3a522c7491 100644
--- a/src/frontends/gguf/src/op/im2col.cpp
+++ b/src/frontends/gguf/src/op/im2col.cpp
@@ -20,10 +20,7 @@
#include "openvino/op/util/attr_types.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_IM2COL: unfold a 1D/2D convolution input into column patches (conv / vision models).
// The decoder exposes the conv params (strides/pads/dilations + is_2D) as a typed int vector.
@@ -126,7 +123,4 @@ OutputVector translate_im2col(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/l2_norm.cpp b/src/frontends/gguf/src/op/l2_norm.cpp
index 9864ce33685..456faa2be3e 100644
--- a/src/frontends/gguf/src/op/l2_norm.cpp
+++ b/src/frontends/gguf/src/op/l2_norm.cpp
@@ -14,10 +14,7 @@
#include "openvino/op/sqrt.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// L2 normalization over the last dimension: x / max(sqrt(sum(x^2)), eps).
OutputVector translate_l2_norm(const NodeContext& context) {
@@ -39,7 +36,4 @@ OutputVector translate_l2_norm(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/mul_mat_id.cpp b/src/frontends/gguf/src/op/mul_mat_id.cpp
index 13d1baf8cbf..1bb2d575443 100644
--- a/src/frontends/gguf/src/op/mul_mat_id.cpp
+++ b/src/frontends/gguf/src/op/mul_mat_id.cpp
@@ -28,10 +28,7 @@
#include "transformations/utils/utils.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
@@ -367,7 +364,4 @@ OutputVector translate_mul_mat_id(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(result)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/mulmat.cpp b/src/frontends/gguf/src/op/mulmat.cpp
index baa893458a2..e2597c43869 100644
--- a/src/frontends/gguf/src/op/mulmat.cpp
+++ b/src/frontends/gguf/src/op/mulmat.cpp
@@ -23,10 +23,7 @@
#include "openvino/op/util/op_types.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_mulmat(const NodeContext& context) {
num_inputs_check(context, 2, 2);
@@ -96,7 +93,4 @@ OutputVector translate_mulmat(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/norm.cpp b/src/frontends/gguf/src/op/norm.cpp
index 27e9caf8aac..cea206b157b 100644
--- a/src/frontends/gguf/src/op/norm.cpp
+++ b/src/frontends/gguf/src/op/norm.cpp
@@ -10,10 +10,7 @@
#include "openvino/op/mvn.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// LayerNorm over the last dimension: (x - mean) / sqrt(var + eps).
OutputVector translate_norm(const NodeContext& context) {
@@ -28,7 +25,4 @@ OutputVector translate_norm(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/pad.cpp b/src/frontends/gguf/src/op/pad.cpp
index 0e73e9ebddc..b2ca2a332a1 100644
--- a/src/frontends/gguf/src/op/pad.cpp
+++ b/src/frontends/gguf/src/op/pad.cpp
@@ -17,10 +17,7 @@
#include "openvino/op/shape_of.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
ov::Output<ov::Node> translate_circular_pad(ov::Output<ov::Node> input,
@@ -95,7 +92,4 @@ OutputVector translate_pad(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/permute.cpp b/src/frontends/gguf/src/op/permute.cpp
index d225cedba5d..202805f1d54 100644
--- a/src/frontends/gguf/src/op/permute.cpp
+++ b/src/frontends/gguf/src/op/permute.cpp
@@ -19,10 +19,7 @@
#include "openvino/op/transpose.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_permute(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -152,7 +149,4 @@ OutputVector translate_permute(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/repeat.cpp b/src/frontends/gguf/src/op/repeat.cpp
index 4b74bbac2bf..091a08d8758 100644
--- a/src/frontends/gguf/src/op/repeat.cpp
+++ b/src/frontends/gguf/src/op/repeat.cpp
@@ -14,10 +14,7 @@
#include "openvino/op/tile.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_REPEAT tiles src[0] to fill the destination shape; every destination dimension is an
// integer multiple of the corresponding source dimension.
@@ -93,7 +90,4 @@ OutputVector translate_repeat(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/reshape.cpp b/src/frontends/gguf/src/op/reshape.cpp
index 85bb414f45b..46a2f8cedb3 100644
--- a/src/frontends/gguf/src/op/reshape.cpp
+++ b/src/frontends/gguf/src/op/reshape.cpp
@@ -22,10 +22,7 @@
#include "openvino/op/transpose.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_reshape(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -158,7 +155,4 @@ OutputVector translate_reshape(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/rms_norm.cpp b/src/frontends/gguf/src/op/rms_norm.cpp
index 3b79fd8fa35..77e5feb5561 100644
--- a/src/frontends/gguf/src/op/rms_norm.cpp
+++ b/src/frontends/gguf/src/op/rms_norm.cpp
@@ -13,10 +13,7 @@
#include "openvino/pass/node_registry.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_rms_norm(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -34,7 +31,4 @@ OutputVector translate_rms_norm(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/rope.cpp b/src/frontends/gguf/src/op/rope.cpp
index a65e7f96c89..7d5dae0e22a 100644
--- a/src/frontends/gguf/src/op/rope.cpp
+++ b/src/frontends/gguf/src/op/rope.cpp
@@ -32,10 +32,7 @@
#include "openvino/pass/node_registry.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_rope(const NodeContext& context) {
num_inputs_check(context, 2, 3);
@@ -291,7 +288,4 @@ OutputVector translate_rope(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/scale.cpp b/src/frontends/gguf/src/op/scale.cpp
index b996dc42186..92d4f4cf460 100644
--- a/src/frontends/gguf/src/op/scale.cpp
+++ b/src/frontends/gguf/src/op/scale.cpp
@@ -14,10 +14,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_scale(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -61,7 +58,4 @@ OutputVector translate_scale(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/set.cpp b/src/frontends/gguf/src/op/set.cpp
index 0823dc27588..73c91c4b1db 100644
--- a/src/frontends/gguf/src/op/set.cpp
+++ b/src/frontends/gguf/src/op/set.cpp
@@ -17,10 +17,7 @@
#include "openvino/op/shape_of.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_SET writes src[1] into a contiguous region of src[0] and returns the updated tensor.
// ggml stores the destination byte offset in op_params[3]; the decoder converts it to an element
@@ -63,7 +60,4 @@ OutputVector translate_set(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/set_rows.cpp b/src/frontends/gguf/src/op/set_rows.cpp
index c819be2026b..03fdb733a48 100644
--- a/src/frontends/gguf/src/op/set_rows.cpp
+++ b/src/frontends/gguf/src/op/set_rows.cpp
@@ -16,10 +16,7 @@
#include "openvino/op/squeeze.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// Always emit the internal SetRows placeholder op (never a device-specific ScatterUpdate). A
// normalization-stage lowering replaces it: the built-in LowerSetRows rebuilds the stateless
@@ -58,7 +55,4 @@ OutputVector translate_set_rows(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(set_rows)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/softmax.cpp b/src/frontends/gguf/src/op/softmax.cpp
index 7da5ccae3a7..a029743d8dd 100644
--- a/src/frontends/gguf/src/op/softmax.cpp
+++ b/src/frontends/gguf/src/op/softmax.cpp
@@ -25,10 +25,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
static bool is_static_one(const ov::Dimension& dim) {
return dim.is_static() && dim.get_length() == 1;
@@ -169,7 +166,4 @@ OutputVector translate_soft_max(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/sqr.cpp b/src/frontends/gguf/src/op/sqr.cpp
index 86510bcaa0b..5dacac11ce7 100644
--- a/src/frontends/gguf/src/op/sqr.cpp
+++ b/src/frontends/gguf/src/op/sqr.cpp
@@ -10,10 +10,7 @@
#include "openvino/op/sqrt.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_SQR: element-wise square (x * x).
OutputVector translate_sqr(const NodeContext& context) {
@@ -34,7 +31,4 @@ OutputVector translate_sqrt(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/ssm_conv.cpp b/src/frontends/gguf/src/op/ssm_conv.cpp
index 821d2679200..1c20b0b4ba3 100644
--- a/src/frontends/gguf/src/op/ssm_conv.cpp
+++ b/src/frontends/gguf/src/op/ssm_conv.cpp
@@ -12,10 +12,7 @@
#include "openvino/op/transpose.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_SSM_CONV: depthwise 1D causal convolution over the conv-state window (SSM / Mamba-style
// models, e.g. qwen3next). Implemented as a GroupConvolution with groups == channels.
@@ -61,7 +58,4 @@ OutputVector translate_ssm_conv(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/sum_rows.cpp b/src/frontends/gguf/src/op/sum_rows.cpp
index 7f086a1d602..1c7fd15d264 100644
--- a/src/frontends/gguf/src/op/sum_rows.cpp
+++ b/src/frontends/gguf/src/op/sum_rows.cpp
@@ -10,10 +10,7 @@
#include "openvino/op/reduce_sum.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_SUM_ROWS: sum along the last (row) dimension, keeping rank.
OutputVector translate_sum_rows(const NodeContext& context) {
@@ -28,7 +25,4 @@ OutputVector translate_sum_rows(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/top_k.cpp b/src/frontends/gguf/src/op/top_k.cpp
index f5d12ae5b10..bc0e5a8d548 100644
--- a/src/frontends/gguf/src/op/top_k.cpp
+++ b/src/frontends/gguf/src/op/top_k.cpp
@@ -19,10 +19,7 @@
#include "openvino/op/unsqueeze.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// ggml_top_k(a, k): the indices of the k largest values along ne[0] (the OV last axis).
// The caller supplies k; legacy decoders encode it in the output's last dimension.
@@ -79,7 +76,4 @@ OutputVector translate_top_k(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(indices)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/transpose.cpp b/src/frontends/gguf/src/op/transpose.cpp
index 9d3da3ff086..6f097850903 100644
--- a/src/frontends/gguf/src/op/transpose.cpp
+++ b/src/frontends/gguf/src/op/transpose.cpp
@@ -10,10 +10,7 @@
#include "op_table.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_transpose(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -30,7 +27,4 @@ OutputVector translate_transpose(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/tri.cpp b/src/frontends/gguf/src/op/tri.cpp
index 1d9fca139b0..f119700d2ef 100644
--- a/src/frontends/gguf/src/op/tri.cpp
+++ b/src/frontends/gguf/src/op/tri.cpp
@@ -13,10 +13,7 @@
#include "openvino/op/multiply.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// GGML_OP_TRI zeroes out elements outside a triangular region of a square matrix. The region is
// selected by the decoder-provided "tri_type" attribute (ggml_tri_type, mapped to a plain int):
@@ -73,7 +70,4 @@ OutputVector translate_tri(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/unary_elu.cpp b/src/frontends/gguf/src/op/unary_elu.cpp
index d70575fc4ed..49f96e83b92 100644
--- a/src/frontends/gguf/src/op/unary_elu.cpp
+++ b/src/frontends/gguf/src/op/unary_elu.cpp
@@ -8,10 +8,7 @@
#include "openvino/op/elu.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_unary_elu(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -23,7 +20,4 @@ OutputVector translate_unary_elu(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/unary_gelu.cpp b/src/frontends/gguf/src/op/unary_gelu.cpp
index 067f57d9ab0..7d3d545088c 100644
--- a/src/frontends/gguf/src/op/unary_gelu.cpp
+++ b/src/frontends/gguf/src/op/unary_gelu.cpp
@@ -11,10 +11,7 @@
#include "openvino/op/sigmoid.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_unary_gelu(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -39,7 +36,4 @@ OutputVector translate_unary_gelu_quick(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/unary_silu.cpp b/src/frontends/gguf/src/op/unary_silu.cpp
index 0d6cb14ea91..8b8c5e91771 100644
--- a/src/frontends/gguf/src/op/unary_silu.cpp
+++ b/src/frontends/gguf/src/op/unary_silu.cpp
@@ -9,10 +9,7 @@
#include "openvino/op/sigmoid.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
OutputVector translate_unary_silu(const NodeContext& context) {
num_inputs_check(context, 1, 1);
@@ -24,7 +21,4 @@ OutputVector translate_unary_silu(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(res)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/view.cpp b/src/frontends/gguf/src/op/view.cpp
index ff4effb3c61..97144837b50 100644
--- a/src/frontends/gguf/src/op/view.cpp
+++ b/src/frontends/gguf/src/op/view.cpp
@@ -17,10 +17,7 @@
#include "openvino/op/slice.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
namespace {
// Put the reshape target's single -1 on the axis carrying the runtime token count, recovered by
@@ -455,7 +452,4 @@ OutputVector translate_view(const NodeContext& context) {
return {context.get_input(0)};
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op/weight.cpp b/src/frontends/gguf/src/op/weight.cpp
index ffb1dccd6fa..7d0e7c20d1a 100644
--- a/src/frontends/gguf/src/op/weight.cpp
+++ b/src/frontends/gguf/src/op/weight.cpp
@@ -15,10 +15,7 @@
#include "quant/weights.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace op {
+namespace ov::frontend::gguf::op {
// A GGUF weight surfaced as a node. A weight is a ggml leaf (op type "GGML_OP_NONE") that the
// decoder marks as a weight. Two payload shapes are supported, both dequantized here so the
@@ -91,7 +88,4 @@ OutputVector translate_weight(const NodeContext& context) {
return rename_outputs_with_suffix({std::move(node)}, context.get_name());
}
-} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::op
diff --git a/src/frontends/gguf/src/op_table.cpp b/src/frontends/gguf/src/op_table.cpp
index 8eebff5b267..549b209bca3 100644
--- a/src/frontends/gguf/src/op_table.cpp
+++ b/src/frontends/gguf/src/op_table.cpp
@@ -22,9 +22,7 @@
#include "openvino/op/tanh.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
std::unordered_map<std::string, CreatorFunction> get_supported_ops() {
using namespace ov::op;
@@ -90,6 +88,4 @@ std::unordered_map<std::string, CreatorFunction> get_supported_ops() {
};
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/op_table.hpp b/src/frontends/gguf/src/op_table.hpp
index 52ef1d169e7..e745a858df4 100644
--- a/src/frontends/gguf/src/op_table.hpp
+++ b/src/frontends/gguf/src/op_table.hpp
@@ -6,9 +6,7 @@
#include "node_context.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace op {
@@ -90,6 +88,4 @@ GGUF_OP_CONVERTER(translate_weight);
std::unordered_map<std::string, CreatorFunction> get_supported_ops();
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/pass/adapt_to_genai.cpp b/src/frontends/gguf/src/pass/adapt_to_genai.cpp
index a25779faac0..6b9d3eb1d39 100644
--- a/src/frontends/gguf/src/pass/adapt_to_genai.cpp
+++ b/src/frontends/gguf/src/pass/adapt_to_genai.cpp
@@ -36,10 +36,7 @@
#include "openvino/runtime/properties.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace pass {
+namespace ov::frontend::gguf::pass {
namespace {
@@ -429,7 +426,4 @@ bool AdaptToGenAI::run_on_model(const std::shared_ptr<ov::Model>& model) {
return true;
}
-} // namespace pass
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::pass
diff --git a/src/frontends/gguf/src/pass/lower_set_rows_stateless.cpp b/src/frontends/gguf/src/pass/lower_set_rows_stateless.cpp
index bdd3ecf8cb2..b379d0ef78d 100644
--- a/src/frontends/gguf/src/pass/lower_set_rows_stateless.cpp
+++ b/src/frontends/gguf/src/pass/lower_set_rows_stateless.cpp
@@ -16,10 +16,7 @@
#include "openvino/op/shape_of.hpp"
#include "openvino/pass/pattern/op/wrap_type.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
-namespace pass {
+namespace ov::frontend::gguf::pass {
LowerSetRowsStateless::LowerSetRowsStateless() {
auto set_rows_pattern = ov::pass::pattern::wrap_type<SetRows>();
@@ -64,7 +61,4 @@ LowerSetRowsStateless::LowerSetRowsStateless() {
callback);
}
-} // namespace pass
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf::pass
diff --git a/src/frontends/gguf/src/quant/gguf.cpp b/src/frontends/gguf/src/quant/gguf.cpp
index 725bc8d3b88..c6f1d2a2b17 100644
--- a/src/frontends/gguf/src/quant/gguf.cpp
+++ b/src/frontends/gguf/src/quant/gguf.cpp
@@ -28,9 +28,7 @@
#include "openvino/util/mmap_object.hpp"
#include "weights.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -890,6 +888,4 @@ std::map<std::string, GGUFMetaData> decoder_config_from_meta(
return config;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/quant/gguf_quants.cpp b/src/frontends/gguf/src/quant/gguf_quants.cpp
index 6940768ab23..c0997113da5 100644
--- a/src/frontends/gguf/src/quant/gguf_quants.cpp
+++ b/src/frontends/gguf/src/quant/gguf_quants.cpp
@@ -17,9 +17,7 @@
#include "openvino/core/type/element_type_traits.hpp"
#include "weights.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
using namespace std;
@@ -814,6 +812,4 @@ void gguf_fill_asym(const GgufTensor& tensor, ov::Tensor& weights, ov::Tensor& s
}
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/quant/weights.cpp b/src/frontends/gguf/src/quant/weights.cpp
index 81f7a524c1a..fecb89aca27 100644
--- a/src/frontends/gguf/src/quant/weights.cpp
+++ b/src/frontends/gguf/src/quant/weights.cpp
@@ -28,9 +28,7 @@
#include "openvino/op/subtract.hpp"
#include "openvino/util/common_util.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
namespace {
@@ -696,6 +694,4 @@ std::shared_ptr<ov::Node> make_weight_node(const ov::Tensor& data,
return make_weight_node(tensors, qtype, name);
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/tokenizer_metadata.cpp b/src/frontends/gguf/src/tokenizer_metadata.cpp
index b596c51b002..5981287690f 100644
--- a/src/frontends/gguf/src/tokenizer_metadata.cpp
+++ b/src/frontends/gguf/src/tokenizer_metadata.cpp
@@ -4,15 +4,11 @@
#include "openvino/frontend/gguf/tokenizer_metadata.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
const std::string& gguf_tokenizer_metadata_key() {
static const std::string key = "gguf_tokenizer_metadata";
return key;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/translate_session.cpp b/src/frontends/gguf/src/translate_session.cpp
index 9c763030805..1b3fd5377f2 100644
--- a/src/frontends/gguf/src/translate_session.cpp
+++ b/src/frontends/gguf/src/translate_session.cpp
@@ -50,9 +50,7 @@
#include "transformations/op_conversions/convert_convertlike.hpp"
#include "utils.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
using namespace ov::op;
@@ -391,6 +389,4 @@ std::shared_ptr<Model> TranslateSession::apply_transformations(std::shared_ptr<M
return model;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/utils.cpp b/src/frontends/gguf/src/utils.cpp
index b33457bd9f4..e1dd6c71bae 100644
--- a/src/frontends/gguf/src/utils.cpp
+++ b/src/frontends/gguf/src/utils.cpp
@@ -28,9 +28,7 @@
#include "openvino/op/subtract.hpp"
#include "openvino/op/transpose.hpp"
-namespace ov {
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
void num_inputs_check(const NodeContext& context, size_t min_inputs, size_t max_inputs) {
auto input_size = context.get_input_size();
@@ -303,6 +301,4 @@ ov::Output<ov::Node> process_view_input(const NodeContext& context, int input_in
return sliced;
}
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf
diff --git a/src/frontends/gguf/src/utils.hpp b/src/frontends/gguf/src/utils.hpp
index b95263c9937..86e960722c1 100644
--- a/src/frontends/gguf/src/utils.hpp
+++ b/src/frontends/gguf/src/utils.hpp
@@ -15,17 +15,18 @@
namespace ov {
class Model;
-namespace op {
+} // namespace ov
+
+namespace ov::op {
namespace v0 {
class Parameter;
} // namespace v0
namespace v3 {
class ShapeOf;
} // namespace v3
-} // namespace op
+} // namespace ov::op
-namespace frontend {
-namespace gguf {
+namespace ov::frontend::gguf {
void num_inputs_check(const NodeContext& context, size_t min_inputs, size_t max_inputs);
@@ -85,6 +86,4 @@ OutputVector translate_1to1_match_2_inputs(const NodeContext& context) {
}
} // namespace op
-} // namespace gguf
-} // namespace frontend
-} // namespace ov
+} // namespace ov::frontend::gguf