Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <[email protected]>
  • Loading branch information
mzient committed Jul 4, 2024
1 parent 10a1584 commit bb9b2d5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
7 changes: 4 additions & 3 deletions dali/pipeline/executor/executor2/exec2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <queue>
#include <unordered_map>
#include <utility>
#include "dali/pipeline/executor/executor2/exec2.h"
#include "dali/pipeline/executor/executor2/exec_graph.h"
#include "dali/pipeline/executor/executor2/stream_assignment.h"
Expand Down Expand Up @@ -76,12 +78,12 @@ class Executor2::Impl {


int InferBatchSize() {

assert(!"Not implemented!");
}

void AnalyzeGraph() {
CountNodes();
//FindInputNodes();
// FindInputNodes();
}

void CountNodes() {
Expand Down Expand Up @@ -207,7 +209,6 @@ class Executor2::Impl {
// Executor2

Executor2::Executor2(const Config &config) : impl_(std::make_unique<Impl>(config)) {

}

Executor2::~Executor2() = default;
Expand Down
2 changes: 1 addition & 1 deletion dali/pipeline/executor/executor2/exec_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct PipelineOutputTag {};
class DLL_PUBLIC ExecNode {
public:
ExecNode() = default;
ExecNode(std::unique_ptr<OperatorBase> op, const graph::OpNode *def = nullptr);
explicit ExecNode(std::unique_ptr<OperatorBase> op, const graph::OpNode *def = nullptr);
explicit ExecNode(PipelineOutputTag) : is_pipeline_output(true) {}

std::vector<ExecEdge *> inputs, outputs;
Expand Down
13 changes: 9 additions & 4 deletions dali/pipeline/executor/executor2/stream_assignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <algorithm>
#include <functional>
#include <optional>
#include <queue>
#include <unordered_map>
#include <set>
#include <utility>
#include <vector>
#include "dali/pipeline/graph/graph_util.h"
#include "dali/pipeline/executor/executor2/exec_graph.h"
#include "dali/pipeline/executor/executor2/exec2.h"

Expand Down Expand Up @@ -62,7 +67,7 @@ inline OpType NodeType(const ExecNode *node) {
template <>
class StreamAssignment<StreamPolicy::Single> {
public:
StreamAssignment(ExecGraph &graph) {
explicit StreamAssignment(ExecGraph &graph) {
for (auto &node : graph.nodes) {
if (NeedsStream(&node)) {
needs_stream_ = true;
Expand All @@ -89,7 +94,7 @@ class StreamAssignment<StreamPolicy::Single> {
template <>
class StreamAssignment<StreamPolicy::PerBackend> {
public:
StreamAssignment(ExecGraph &graph) {
explicit StreamAssignment(ExecGraph &graph) {
for (auto &node : graph.nodes) {
switch (NodeType(&node)) {
case OpType::GPU:
Expand Down Expand Up @@ -157,7 +162,7 @@ class StreamAssignment<StreamPolicy::PerBackend> {
template <>
class StreamAssignment<StreamPolicy::PerOperator> {
public:
StreamAssignment(ExecGraph &graph) {
explicit StreamAssignment(ExecGraph &graph) {
Assign(graph);
}

Expand Down
6 changes: 5 additions & 1 deletion dali/pipeline/executor/executor2/stream_assignment_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// limitations under the License.

#include <gtest/gtest.h>
#include <functional>
#include <map>
#include <optional>
#include <string>
#include <vector>
#include "dali/pipeline/executor/executor2/stream_assignment.h"
#include "dali/pipeline/operator/operator.h"
#include "dali/pipeline/operator/operator_factory.h"
Expand All @@ -29,7 +34,6 @@ class StreamAssignmentDummyOp : public Operator<Backend> {
bool SetupImpl(std::vector<OutputDesc> &output_desc, const Workspace &ws) override {
return false;
}

};

DALI_SCHEMA(StreamAssignmentDummyOp)
Expand Down

0 comments on commit bb9b2d5

Please sign in to comment.