Commit 11b612ca authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

CPU: clang-format fixes and header cleanup for generated code

parent fc50420f
......@@ -92,9 +92,12 @@ namespace mkl
extern "C" {
void MKL_Somatcopy(char ordering,
char trans,
size_t rows, size_t cols,
size_t rows,
size_t cols,
const ngraph::element::Float32::type alpha,
const ngraph::element::Float32::type* A, size_t lda,
ngraph::element::Float32::type* B, size_t ldb);
const ngraph::element::Float32::type* A,
size_t lda,
ngraph::element::Float32::type* B,
size_t ldb);
}
}
This diff is collapsed.
......@@ -208,19 +208,18 @@ void ExternalFunction::compile(FunctionMap& function_map)
Emitter emitter;
auto& TU = emitter.GetTU();
TU += R"(// Generated by the NGraph CPU backend
#include <memory>
#include <vector>
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
#include <Eigen/Dense>
#include "ngraph/descriptor/layout/dense_tensor_view_layout.hpp"
#include "ngraph/runtime/tensor_view_info.hpp"
#include "ngraph/runtime/utils.hpp"
#include "ngraph/runtime/cpu/call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_kernels.hpp"
#include "ngraph/runtime/cpu/eigen_utils.hpp"
#include "ngraph/runtime/utils.hpp"
using namespace ngraph::element;
using namespace ngraph::runtime;
......@@ -281,10 +280,10 @@ extern "C" void __entrypoint(ngraph::runtime::cpu::CallFrame* call_frame,
assert(llvm_module);
estate.add_module(llvm_module);
estate.finalize();
compiled_function = estate.find_function<void(
ngraph::runtime::cpu::CallFrame*,
ngraph::runtime::TensorViewPtrs&,
const std::vector<std::shared_ptr<CallFrame>>&)>("__entrypoint");
compiled_function =
estate.find_function<void(ngraph::runtime::cpu::CallFrame*,
ngraph::runtime::TensorViewPtrs&,
const std::vector<std::shared_ptr<CallFrame>>&)>("__entrypoint");
assert(compiled_function);
m_is_compiled = true;
......
......@@ -20,8 +20,8 @@
#include <typeinfo>
#include <unordered_map>
#include "ngraph/function.hpp"
#include "ngraph/codegen/compiler.hpp"
#include "ngraph/function.hpp"
#include "ngraph/runtime/external_function.hpp"
#include "ngraph/runtime/tensor_view_info.hpp"
......@@ -47,9 +47,10 @@ namespace ngraph
using OpMap = std::unordered_map<std::type_index, OpFunction>;
using EntryPoint = std::function<void(ngraph::runtime::cpu::CallFrame*,
ngraph::runtime::TensorViewPtrs&,
const std::vector<std::shared_ptr<ngraph::runtime::cpu::CallFrame>>&)>;
using EntryPoint = std::function<void(
ngraph::runtime::cpu::CallFrame*,
ngraph::runtime::TensorViewPtrs&,
const std::vector<std::shared_ptr<ngraph::runtime::cpu::CallFrame>>&)>;
class ExternalFunction : public ngraph::runtime::ExternalFunction
{
......@@ -57,8 +58,7 @@ namespace ngraph
ExternalFunction(const std::shared_ptr<ngraph::Function>& function,
bool release_function = true);
std::shared_ptr<ngraph::runtime::CallFrame> make_call_frame();
std::vector<std::shared_ptr<CallFrame>> &get_callees() { return callees; }
std::vector<std::shared_ptr<CallFrame>>& get_callees() { return callees; }
protected:
void compile(FunctionMap& function_map);
......
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