Skip to content

Commit

Permalink
[WIP]
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
  • Loading branch information
mzient committed Jun 24, 2024
1 parent 679f9e3 commit 3dd85e6
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 6 deletions.
45 changes: 45 additions & 0 deletions dali/pipeline/executor/executor2/exec2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,50 @@
namespace dali {
namespace exec2 {

void Executor2::Init() {
}

void Executor2::Run() {
}

void Executor2::Prefetch() {
}


void Executor2::Outputs(Workspace *ws) {
}

void Executor2::ShareOutputs(Workspace *ws) {
}

void Executor2::ReleaseOutputs() {
}

void Executor2::EnableMemoryStats(bool enable_memory_stats) {
}

void Executor2::EnableCheckpointing(bool checkpointing) {
}

ExecutorMetaMap Executor2::GetExecutorMeta() {
return {};
}

void Executor2::Shutdown() {
}

Checkpoint &Executor2::GetCurrentCheckpoint() {
}

void Executor2::RestoreStateFromCheckpoint(const Checkpoint &cpt) {
}

int Executor2::InputFeedCount(std::string_view input_name) {
}

OperatorBase *Executor2::GetOperator(std::string_view name) {
}


} // namespace exec2
} // namespace dali
33 changes: 27 additions & 6 deletions dali/pipeline/executor/executor2/exec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,41 @@
#include "dali/pipeline/graph/op_graph2.h"
#include "dali/pipeline/executor/executor2/exec_graph.h"
#include "dali/pipeline/workspace/workspace.h"
#include "dali/pipeline/executor/executor.h"

namespace dali {
namespace exec2 {

class Executor2 {
class DLL_PUBLIC Executor2 : public ExecutorBase {
public:
void Initialize(std::shared_ptr<graph::OpGraph> graph) {
graph_ = graph;
}
explicit Executor2(int queue_depth);

void Run() {
void Build(const graph::OpGraph &graph) override {

}
// TODO(michalz): Remove
void Build(OpGraph *graph, std::vector<std::string> output_names) override {
throw std::logic_error("This function is maintained in the interface for legacy tests only.");
}

void GetOutputs(Workspace &ws) {
void Init() override;
void Run() override;
void Prefetch() override;

void Outputs(Workspace *ws) override;
void ShareOutputs(Workspace *ws) override;
void ReleaseOutputs() override;
void EnableMemoryStats(bool enable_memory_stats = false) override;
void EnableCheckpointing(bool checkpointing = false) override;
ExecutorMetaMap GetExecutorMeta() override;
void Shutdown() override;
Checkpoint& GetCurrentCheckpoint() override;
void RestoreStateFromCheckpoint(const Checkpoint &cpt) override;
int InputFeedCount(std::string_view input_name) override;
OperatorBase *GetOperator(std::string_view name) override;

void Initialize(std::shared_ptr<graph::OpGraph> graph) {
graph_ = graph;
}

ExecGraph exec_graph_;
Expand Down

0 comments on commit 3dd85e6

Please sign in to comment.