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
d36a88ed
Unverified
Commit
d36a88ed
authored
Mar 13, 2020
by
Robert Kimball
Committed by
GitHub
Mar 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix u1 allocation size (#4443)
parent
d0d63c30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
constant.cpp
src/ngraph/op/constant.cpp
+5
-5
No files found.
src/ngraph/op/constant.cpp
View file @
d36a88ed
...
...
@@ -52,8 +52,8 @@ op::Constant::Constant(const element::Type& type,
const
std
::
vector
<
std
::
string
>&
values
)
:
m_element_type
(
type
)
,
m_shape
(
shape
)
,
m_data
(
new
runtime
::
AlignedBuffer
(
shape_size
(
m_shape
)
*
m_element_type
.
size
(),
host_alignment
()))
,
m_data
(
new
runtime
::
AlignedBuffer
(
ceil
(
shape_size
(
m_shape
)
*
m_element_type
.
bitwidth
()
/
8.
f
),
host_alignment
()))
{
NODE_VALIDATION_CHECK
(
this
,
values
.
size
()
==
shape_size
(
m_shape
)
||
values
.
size
()
==
1
,
...
...
@@ -290,10 +290,10 @@ op::Constant::Constant(const element::Type& type,
op
::
Constant
::
Constant
(
const
element
::
Type
&
type
,
const
Shape
&
shape
,
const
void
*
data
)
:
m_element_type
(
type
)
,
m_shape
(
shape
)
,
m_data
(
new
runtime
::
AlignedBuffer
(
shape_size
(
m_shape
)
*
m_element_type
.
size
(),
host_alignment
()))
,
m_data
(
new
runtime
::
AlignedBuffer
(
ceil
(
shape_size
(
m_shape
)
*
m_element_type
.
bitwidth
()
/
8.
f
),
host_alignment
()))
{
size_t
size
=
shape_size
(
m_shape
)
*
m_element_type
.
size
(
);
size_t
size
=
ceil
(
shape_size
(
m_shape
)
*
m_element_type
.
bitwidth
()
/
8.
f
);
std
::
memcpy
(
m_data
->
get_ptr
(),
data
,
size
);
constructor_validate_and_infer_types
();
m_all_elements_bitwise_identical
=
are_all_data_elements_bitwise_identical
();
...
...
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