Unverified Commit 046a85c0 authored by Jai Menon's avatar Jai Menon Committed by GitHub

Merge pull request #238 from NervanaSystems/bob/compile_cleanup

cleanup headers used by generated code
parents a6928236 2655b1f9
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#pragma once #pragma once
#include "ngraph/types/element_type.hpp" #include <cinttypes>
#include <cstddef>
// CBLAS types and wrappers // CBLAS types and wrappers
...@@ -73,17 +74,17 @@ namespace cblas ...@@ -73,17 +74,17 @@ namespace cblas
void cblas_sgemm(const Layout layout, void cblas_sgemm(const Layout layout,
const Transpose TransA, const Transpose TransA,
const Transpose TransB, const Transpose TransB,
const ngraph::element::Int64::type M, const int64_t M,
const ngraph::element::Int64::type N, const int64_t N,
const ngraph::element::Int64::type K, const int64_t K,
const ngraph::element::Float32::type alpha, const float alpha,
const ngraph::element::Float32::type* A, const float* A,
const ngraph::element::Int64::type lda, const int64_t lda,
const ngraph::element::Float32::type* B, const float* B,
const ngraph::element::Int64::type ldb, const int64_t ldb,
const ngraph::element::Float32::type beta, const float beta,
ngraph::element::Float32::type* C, float* C,
const ngraph::element::Int64::type ldc); const int64_t ldc);
} }
} }
...@@ -94,10 +95,10 @@ namespace mkl ...@@ -94,10 +95,10 @@ namespace mkl
char trans, char trans,
size_t rows, size_t rows,
size_t cols, size_t cols,
const ngraph::element::Float32::type alpha, const float alpha,
const ngraph::element::Float32::type* A, const float* A,
size_t lda, size_t lda,
ngraph::element::Float32::type* B, float* B,
size_t ldb); size_t ldb);
} }
} }
...@@ -14,13 +14,9 @@ ...@@ -14,13 +14,9 @@
#pragma once #pragma once
#include <memory>
#include <Eigen/Dense> #include <Eigen/Dense>
#include "ngraph/descriptor/layout/dense_tensor_view_layout.hpp" #include "ngraph/common.hpp"
#include "ngraph/runtime/cpu/call_frame.hpp"
#include "ngraph/runtime/tensor_view_info.hpp"
namespace ngraph namespace ngraph
{ {
...@@ -62,14 +58,6 @@ namespace ngraph ...@@ -62,14 +58,6 @@ namespace ngraph
class V class V
{ {
public: public:
V(const TensorViewInfo& tensor_view_info)
: l0(tensor_view_info
.get_layout<
ngraph::descriptor::layout::DenseTensorViewLayout>()
->get_size())
{
}
V(size_t s) V(size_t s)
: l0(s) : l0(s)
{ {
...@@ -84,12 +72,6 @@ namespace ngraph ...@@ -84,12 +72,6 @@ namespace ngraph
class M class M
{ {
M(const std::shared_ptr<ngraph::descriptor::layout::DenseTensorViewLayout>&
layout)
: M(layout->get_shape(), layout->get_strides())
{
}
public: public:
M(const Shape& shape, const Strides& strides) M(const Shape& shape, const Strides& strides)
: l0(shape.at(0)) : l0(shape.at(0))
...@@ -99,12 +81,6 @@ namespace ngraph ...@@ -99,12 +81,6 @@ namespace ngraph
{ {
} }
M(const TensorViewInfo& tensor_view_info)
: M(tensor_view_info.get_layout<
ngraph::descriptor::layout::DenseTensorViewLayout>())
{
}
public: public:
size_t l0; size_t l0;
size_t l1; size_t l1;
...@@ -113,7 +89,7 @@ namespace ngraph ...@@ -113,7 +89,7 @@ namespace ngraph
}; };
} }
// T element type // ET element type
// FMT array format (fmt::V for vector, etc.) // FMT array format (fmt::V for vector, etc.)
// BASE select array/matrix // BASE select array/matrix
template <typename T, template <typename T,
...@@ -130,14 +106,6 @@ namespace ngraph ...@@ -130,14 +106,6 @@ namespace ngraph
{ {
} }
EigenWrapper(
T* t,
const std::shared_ptr<ngraph::descriptor::layout::DenseTensorViewLayout>&
layout)
: base(t, layout->get_size(), 1, DynamicStrides(1, 1))
{
}
template <typename U> template <typename U>
EigenWrapper& operator=(const U& other) EigenWrapper& operator=(const U& other)
{ {
...@@ -160,4 +128,4 @@ namespace ngraph ...@@ -160,4 +128,4 @@ namespace ngraph
} }
} }
} }
} }
\ No newline at end of file
...@@ -199,14 +199,9 @@ void ExternalFunction::compile() ...@@ -199,14 +199,9 @@ void ExternalFunction::compile()
#include <Eigen/Dense> #include <Eigen/Dense>
#include "ngraph/descriptor/layout/dense_tensor_view_layout.hpp"
#include "ngraph/runtime/cpu/call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_kernels.hpp" #include "ngraph/runtime/cpu/cpu_kernels.hpp"
#include "ngraph/runtime/cpu/eigen_utils.hpp" #include "ngraph/runtime/cpu/eigen_utils.hpp"
#include "ngraph/runtime/utils.hpp"
using namespace ngraph::element;
using namespace ngraph::runtime;
using namespace ngraph::runtime::cpu::eigen; using namespace ngraph::runtime::cpu::eigen;
extern "C" void allocate_aligned_buffer( extern "C" void allocate_aligned_buffer(
......
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