From bb9b2d523f9203316946ea1905ad26599983a1d4 Mon Sep 17 00:00:00 2001 From: Michal Zientkiewicz Date: Thu, 4 Jul 2024 14:50:42 +0200 Subject: [PATCH] Lint. Signed-off-by: Michal Zientkiewicz --- dali/pipeline/executor/executor2/exec2.cc | 7 ++++--- dali/pipeline/executor/executor2/exec_graph.h | 2 +- .../pipeline/executor/executor2/stream_assignment.h | 13 +++++++++---- .../executor/executor2/stream_assignment_test.cc | 6 +++++- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/dali/pipeline/executor/executor2/exec2.cc b/dali/pipeline/executor/executor2/exec2.cc index 5d37e86b3a3..8343aa465eb 100644 --- a/dali/pipeline/executor/executor2/exec2.cc +++ b/dali/pipeline/executor/executor2/exec2.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include +#include #include "dali/pipeline/executor/executor2/exec2.h" #include "dali/pipeline/executor/executor2/exec_graph.h" #include "dali/pipeline/executor/executor2/stream_assignment.h" @@ -76,12 +78,12 @@ class Executor2::Impl { int InferBatchSize() { - + assert(!"Not implemented!"); } void AnalyzeGraph() { CountNodes(); - //FindInputNodes(); + // FindInputNodes(); } void CountNodes() { @@ -207,7 +209,6 @@ class Executor2::Impl { // Executor2 Executor2::Executor2(const Config &config) : impl_(std::make_unique(config)) { - } Executor2::~Executor2() = default; diff --git a/dali/pipeline/executor/executor2/exec_graph.h b/dali/pipeline/executor/executor2/exec_graph.h index 679bbedd391..7e39a1127df 100644 --- a/dali/pipeline/executor/executor2/exec_graph.h +++ b/dali/pipeline/executor/executor2/exec_graph.h @@ -67,7 +67,7 @@ struct PipelineOutputTag {}; class DLL_PUBLIC ExecNode { public: ExecNode() = default; - ExecNode(std::unique_ptr op, const graph::OpNode *def = nullptr); + explicit ExecNode(std::unique_ptr op, const graph::OpNode *def = nullptr); explicit ExecNode(PipelineOutputTag) : is_pipeline_output(true) {} std::vector inputs, outputs; diff --git a/dali/pipeline/executor/executor2/stream_assignment.h b/dali/pipeline/executor/executor2/stream_assignment.h index 27e8e3c05f8..b30f172ded0 100644 --- a/dali/pipeline/executor/executor2/stream_assignment.h +++ b/dali/pipeline/executor/executor2/stream_assignment.h @@ -15,10 +15,15 @@ #ifndef DALI_PIPELINE_EXECUTOR_EXECUTOR2_STREAM_ASSIGNMENT_H_ #define DALI_PIPELINE_EXECUTOR_EXECUTOR2_STREAM_ASSIGNMENT_H_ -#include "dali/pipeline/graph/graph_util.h" #include +#include #include +#include #include +#include +#include +#include +#include "dali/pipeline/graph/graph_util.h" #include "dali/pipeline/executor/executor2/exec_graph.h" #include "dali/pipeline/executor/executor2/exec2.h" @@ -62,7 +67,7 @@ inline OpType NodeType(const ExecNode *node) { template <> class StreamAssignment { public: - StreamAssignment(ExecGraph &graph) { + explicit StreamAssignment(ExecGraph &graph) { for (auto &node : graph.nodes) { if (NeedsStream(&node)) { needs_stream_ = true; @@ -89,7 +94,7 @@ class StreamAssignment { template <> class StreamAssignment { public: - StreamAssignment(ExecGraph &graph) { + explicit StreamAssignment(ExecGraph &graph) { for (auto &node : graph.nodes) { switch (NodeType(&node)) { case OpType::GPU: @@ -157,7 +162,7 @@ class StreamAssignment { template <> class StreamAssignment { public: - StreamAssignment(ExecGraph &graph) { + explicit StreamAssignment(ExecGraph &graph) { Assign(graph); } diff --git a/dali/pipeline/executor/executor2/stream_assignment_test.cc b/dali/pipeline/executor/executor2/stream_assignment_test.cc index 8c51396ab7c..e3568ff2715 100644 --- a/dali/pipeline/executor/executor2/stream_assignment_test.cc +++ b/dali/pipeline/executor/executor2/stream_assignment_test.cc @@ -13,6 +13,11 @@ // limitations under the License. #include +#include +#include +#include +#include +#include #include "dali/pipeline/executor/executor2/stream_assignment.h" #include "dali/pipeline/operator/operator.h" #include "dali/pipeline/operator/operator_factory.h" @@ -29,7 +34,6 @@ class StreamAssignmentDummyOp : public Operator { bool SetupImpl(std::vector &output_desc, const Workspace &ws) override { return false; } - }; DALI_SCHEMA(StreamAssignmentDummyOp)