Unverified Commit 47a5dcf5 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

Merge branch 'master' into bob/function_memory

parents d431e15f efe4ba18
......@@ -45,7 +45,7 @@ void CallFrame::tensor_call(
}
// Invoke compiled computation
m_compiled_function(inputs, outputs);
m_compiled_function(inputs.data(), outputs.data());
}
void CallFrame::operator()(const std::vector<std::shared_ptr<ngraph::runtime::Value>>& arguments,
......
......@@ -32,8 +32,7 @@ namespace ngraph
{
class CallFrame;
using EntryPoint_t = void(const std::vector<void*>& inputs,
const std::vector<void*>& outputs);
using EntryPoint_t = void(void** inputs, void** outputs);
using EntryPoint = std::function<EntryPoint_t>;
......
This diff is collapsed.
......@@ -24,7 +24,6 @@
#define EMITTER_DECL(E) \
E(const ngraph::Node* n, \
ExternalFunction* ef, \
const std::vector<TensorViewInfo>& inputs, \
const std::vector<TensorViewInfo>& outputs)
......
......@@ -186,7 +186,6 @@ void ExternalFunction::compile()
TU +=
R"(// Generated by the NGraph CPU backend
#include <cmath>
#include <vector>
#include <Eigen/Dense>
......@@ -202,17 +201,14 @@ using namespace ngraph::runtime::cpu::eigen;
TU << "// Declare all functions\n";
for (shared_ptr<Function> f : pass_manager.get_state().get_functions())
{
TU << "extern \"C\" void " << f->get_name() << "(\n";
TU << " const std::vector<void*>& inputs,\n";
TU << " const std::vector<void*>& outputs);\n";
TU << "extern \"C\" void " << f->get_name() << "(void** inputs, void** outputs);\n";
}
TU << "\n";
for (shared_ptr<Function> current_function : pass_manager.get_state().get_functions())
{
TU << "extern \"C\" void " << current_function->get_name() << "(\n";
TU << " const std::vector<void*>& inputs,\n";
TU << " const std::vector<void*>& outputs)\n";
TU << "extern \"C\" void " << current_function->get_name();
TU << "(void** inputs, void** outputs)\n";
TU << "{\n";
TU.indent++;
......@@ -297,7 +293,7 @@ using namespace ngraph::runtime::cpu::eigen;
auto tv = output.get_tensor_view();
out.push_back({0, tv});
}
handler->second(&emitter, node.get(), this, in, out);
handler->second(&emitter, node.get(), in, out);
}
TU.indent--;
......
......@@ -41,7 +41,6 @@ namespace ngraph
using OpFunction = std::function<void(Emitter*,
const ngraph::Node*,
ExternalFunction*,
const std::vector<TensorViewInfo>& inputs,
const std::vector<TensorViewInfo>& outputs)>;
......
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