Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
046a85c0
Unverified
Commit
046a85c0
authored
Nov 15, 2017
by
Jai Menon
Committed by
GitHub
Nov 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #238 from NervanaSystems/bob/compile_cleanup
cleanup headers used by generated code
parents
a6928236
2655b1f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
55 deletions
+20
-55
cpu_kernels.hpp
src/ngraph/runtime/cpu/cpu_kernels.hpp
+16
-15
eigen_utils.hpp
src/ngraph/runtime/cpu/eigen_utils.hpp
+4
-35
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+0
-5
No files found.
src/ngraph/runtime/cpu/cpu_kernels.hpp
View file @
046a85c0
...
@@ -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
);
}
}
}
}
src/ngraph/runtime/cpu/eigen_utils.hpp
View file @
046a85c0
...
@@ -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
//
E
T 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
src/ngraph/runtime/cpu/external_function.cpp
View file @
046a85c0
...
@@ -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(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment