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
43bcb2b8
Commit
43bcb2b8
authored
Aug 30, 2018
by
Robert Kimball
Committed by
Scott Cyphers
Aug 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixes (#1525)
parent
394b74fa
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
37 additions
and
8 deletions
+37
-8
function.hpp
src/ngraph/function.hpp
+1
-0
constant.hpp
src/ngraph/op/constant.hpp
+6
-1
parameter_vector.hpp
src/ngraph/op/parameter_vector.hpp
+2
-0
result.cpp
src/ngraph/op/result.cpp
+5
-2
aligned_buffer.cpp
src/ngraph/runtime/aligned_buffer.cpp
+1
-0
aligned_buffer.hpp
src/ngraph/runtime/aligned_buffer.hpp
+4
-0
cpu_tensor_view.hpp
src/ngraph/runtime/cpu/cpu_tensor_view.hpp
+4
-0
mkldnn_emitter.hpp
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
+4
-0
host_tensor_view.hpp
src/ngraph/runtime/host_tensor_view.hpp
+4
-0
element_type.cpp
src/ngraph/type/element_type.cpp
+4
-4
util.hpp
src/ngraph/util.hpp
+2
-1
No files found.
src/ngraph/function.hpp
View file @
43bcb2b8
...
...
@@ -91,6 +91,7 @@ namespace ngraph
private
:
Function
(
const
Function
&
)
=
delete
;
Function
(
const
Function
&&
)
=
delete
;
Function
&
operator
=
(
const
Function
&
)
=
delete
;
static
std
::
atomic
<
size_t
>
m_next_instance_id
;
size_t
m_instance_id
;
...
...
src/ngraph/op/constant.hpp
View file @
43bcb2b8
...
...
@@ -99,7 +99,7 @@ namespace ngraph
{
size_t
size
=
shape_size
(
m_shape
)
*
m_element_type
.
size
();
m_data
=
ngraph
::
aligned_alloc
(
m_element_type
.
size
(),
size
);
memcpy
(
m_data
,
data
,
size
);
std
::
memcpy
(
m_data
,
data
,
size
);
auto
vt
=
std
::
make_shared
<
TensorViewType
>
(
type
,
shape
);
set_value_type_checked
(
vt
);
}
...
...
@@ -242,6 +242,11 @@ namespace ngraph
element
::
Type
m_element_type
;
Shape
m_shape
;
void
*
m_data
;
private
:
Constant
(
const
Constant
&
)
=
delete
;
Constant
(
Constant
&&
)
=
delete
;
Constant
operator
=
(
const
Constant
*
)
=
delete
;
};
}
}
src/ngraph/op/parameter_vector.hpp
View file @
43bcb2b8
...
...
@@ -44,6 +44,8 @@ namespace ngraph
{
}
ParameterVector
&
operator
=
(
const
ParameterVector
&
parameters
)
=
default
;
ParameterVector
()
{}
};
}
...
...
src/ngraph/op/result.cpp
View file @
43bcb2b8
...
...
@@ -50,8 +50,11 @@ shared_ptr<Node> op::Result::copy_with_new_args(const NodeVector& new_args) cons
}
auto
res
=
make_shared
<
Result
>
(
new_args
.
at
(
0
));
res
->
set_needs_copy
(
m_needs_copy
);
res
->
set_needs_default_layout
(
m_needs_default_layout
);
if
(
res
)
{
res
->
set_needs_copy
(
m_needs_copy
);
res
->
set_needs_default_layout
(
m_needs_default_layout
);
}
return
res
;
}
...
...
src/ngraph/runtime/aligned_buffer.cpp
View file @
43bcb2b8
...
...
@@ -24,6 +24,7 @@ using namespace ngraph;
runtime
::
AlignedBuffer
::
AlignedBuffer
()
:
m_allocated_buffer
(
nullptr
)
,
m_aligned_buffer
(
nullptr
)
,
m_byte_size
(
0
)
{
}
...
...
src/ngraph/runtime/aligned_buffer.hpp
View file @
43bcb2b8
...
...
@@ -41,6 +41,10 @@ public:
void
*
get_ptr
(
size_t
offset
)
const
{
return
m_aligned_buffer
+
offset
;
}
void
*
get_ptr
()
const
{
return
m_aligned_buffer
;
}
private
:
AlignedBuffer
(
const
AlignedBuffer
&
)
=
delete
;
AlignedBuffer
(
AlignedBuffer
&&
)
=
delete
;
AlignedBuffer
&
operator
=
(
const
AlignedBuffer
&
)
=
delete
;
char
*
m_allocated_buffer
;
char
*
m_aligned_buffer
;
size_t
m_byte_size
;
...
...
src/ngraph/runtime/cpu/cpu_tensor_view.hpp
View file @
43bcb2b8
...
...
@@ -63,6 +63,10 @@ namespace ngraph
static
constexpr
int
BufferAlignment
=
NGRAPH_CPU_ALIGNMENT
;
private
:
CPUTensorView
(
const
CPUTensorView
&
)
=
delete
;
CPUTensorView
(
CPUTensorView
&&
)
=
delete
;
CPUTensorView
&
operator
=
(
const
CPUTensorView
&
)
=
delete
;
char
*
buffer
;
char
*
aligned_buffer
;
size_t
buffer_size
;
...
...
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
View file @
43bcb2b8
...
...
@@ -50,6 +50,10 @@ namespace ngraph
MKLDNNWorkspace
(
size_t
size
)
{
buf
=
reinterpret_cast
<
char
*>
(
malloc
(
size
));
}
~
MKLDNNWorkspace
()
{
free
(
buf
);
}
char
*
buf
;
MKLDNNWorkspace
(
const
MKLDNNWorkspace
&
)
=
delete
;
MKLDNNWorkspace
(
MKLDNNWorkspace
&&
)
=
delete
;
MKLDNNWorkspace
&
operator
=
(
const
MKLDNNWorkspace
&
)
=
delete
;
};
class
MKLDNNEmitter
...
...
src/ngraph/runtime/host_tensor_view.hpp
View file @
43bcb2b8
...
...
@@ -74,6 +74,10 @@ public:
void
read
(
void
*
p
,
size_t
tensor_offset
,
size_t
n
)
const
override
;
private
:
HostTensorView
(
const
HostTensorView
&
)
=
delete
;
HostTensorView
(
HostTensorView
&&
)
=
delete
;
HostTensorView
&
operator
=
(
const
HostTensorView
&
)
=
delete
;
char
*
m_allocated_buffer_pool
;
char
*
m_aligned_buffer_pool
;
size_t
m_buffer_size
;
...
...
src/ngraph/type/element_type.cpp
View file @
43bcb2b8
...
...
@@ -81,12 +81,12 @@ bool element::Type::operator==(const element::Type& other) const
bool
element
::
Type
::
operator
<
(
const
Type
&
other
)
const
{
size_t
v1
=
m_bitwidth
<<
2
;
v1
|=
(
m_is_real
?
2
:
0
);
v1
|=
(
m_is_signed
?
1
:
0
);
v1
|=
static_cast
<
size_t
>
(
m_is_real
?
2
:
0
);
v1
|=
static_cast
<
size_t
>
(
m_is_signed
?
1
:
0
);
size_t
v2
=
other
.
m_bitwidth
<<
2
;
v2
|=
(
other
.
m_is_real
?
2
:
0
);
v2
|=
(
other
.
m_is_signed
?
1
:
0
);
v2
|=
static_cast
<
size_t
>
(
other
.
m_is_real
?
2
:
0
);
v2
|=
static_cast
<
size_t
>
(
other
.
m_is_signed
?
1
:
0
);
return
v1
<
v2
;
}
...
...
src/ngraph/util.hpp
View file @
43bcb2b8
...
...
@@ -49,9 +49,10 @@ namespace ngraph
std
::
string
join
(
const
T
&
v
,
const
std
::
string
&
sep
=
", "
)
{
std
::
ostringstream
ss
;
size_t
count
=
0
;
for
(
const
auto
&
x
:
v
)
{
if
(
&
x
!=
&*
(
v
.
begin
())
)
if
(
count
++
>
0
)
{
ss
<<
sep
;
}
...
...
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