Commit 0ef8a53a authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

CPU: Remove 'Instruction' and remaining references to it

The notion of an instruction will probably come back
but with a different implementation.
parent bb3b5c6c
......@@ -15,7 +15,6 @@
#include <algorithm>
#include "ngraph/runtime/cpu/call_frame.hpp"
#include "ngraph/runtime/cpu/instruction.hpp"
using namespace std;
using namespace ngraph::runtime::cpu;
......
......@@ -30,7 +30,6 @@ namespace ngraph
namespace cpu
{
class Instruction;
class CallFrame;
using EntryPoint = std::function<void(ngraph::runtime::cpu::CallFrame*, ngraph::runtime::TensorViewPtrs&)>;
......
......@@ -87,7 +87,6 @@ static const OpMap dispatcher{{TI(ngraph::op::Add), &Emitter::EmitAdd},
ExternalFunction::ExternalFunction(const std::shared_ptr<ngraph::Function>& function,
bool release_function)
: ngraph::runtime::ExternalFunction(function, release_function)
, m_instructions(make_shared<std::vector<std::shared_ptr<Instruction>>>())
, compiled_function(nullptr)
{
}
......
......@@ -31,7 +31,6 @@ namespace ngraph
{
namespace cpu
{
class Instruction;
class ExternalFunction;
class Emitter;
class CallFrame;
......@@ -61,7 +60,6 @@ namespace ngraph
size_t m_n_inputs;
size_t m_n_outputs;
std::shared_ptr<std::vector<std::shared_ptr<Instruction>>> m_instructions;
ngraph::descriptor::TensorViewPtrs m_temp_views;
EntryPoint compiled_function;
};
......
// ----------------------------------------------------------------------------
// Copyright 2017 Nervana Systems Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// ----------------------------------------------------------------------------
#pragma once
#include <memory>
namespace ngraph
{
namespace runtime
{
namespace cpu
{
class CallFrame;
/// @brief An interpreter for an Op
///
/// The call_frame has a vector of instructions and calls execute on each instruction, passing it the call_frame.
/// Instructions get argument, result, and intermediate tensor views from the call frame. Instructions may also
/// set a flag in the call_frame to end execution, or adjust execution by modifying the position in the instruction vector.
class Instruction
{
public:
virtual ~Instruction() {}
virtual void execute(CallFrame& call_frame) const = 0;
};
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment