mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: `SerialGraphExecutor` inherits from `GraphExecutorBase` and executes all nodes in the graph in a serial manner Test Plan: CI Rollback Plan: Differential Revision: D76917966 Pull Request resolved: https://github.com/pytorch/pytorch/pull/156459 Approved by: https://github.com/zhxchen17, https://github.com/jingsh
24 lines
634 B
C++
24 lines
634 B
C++
#pragma once
|
|
|
|
#include <torch/nativert/executor/GraphExecutorBase.h>
|
|
|
|
namespace torch::nativert {
|
|
|
|
class SerialGraphExecutor : public GraphExecutorBase {
|
|
public:
|
|
SerialGraphExecutor(
|
|
const Graph& graph,
|
|
std::vector<std::unique_ptr<OpKernel>> nodeKernels,
|
|
const ExecutorConfig& executorConfig)
|
|
: GraphExecutorBase(graph, std::move(nodeKernels), executorConfig) {}
|
|
|
|
std::vector<c10::IValue> execute(
|
|
ExecutionFrame& frame,
|
|
std::vector<c10::IValue> inputs) override;
|
|
|
|
std::vector<c10::IValue> executeWithPrefilledFrame(
|
|
ExecutionFrame& frame) override;
|
|
};
|
|
|
|
} // namespace torch::nativert
|