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
ecb1608b
Commit
ecb1608b
authored
May 08, 2019
by
gaurides
Committed by
Scott Cyphers
May 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix data type for conv builder (#2885)
* Fix data type for conv builder * Added support for other data types
parent
02c56a01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
convolution.cpp
src/ngraph/runtime/cpu/builder/convolution.cpp
+2
-1
cpu_builder.hpp
src/ngraph/runtime/cpu/cpu_builder.hpp
+46
-0
No files found.
src/ngraph/runtime/cpu/builder/convolution.cpp
View file @
ecb1608b
...
...
@@ -91,7 +91,8 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
convolution
<
float
,
float
,
float
>
)
>
kernel
;
kernel
=
runtime
::
cpu
::
kernel
::
convolution
<
float
,
float
,
float
>
;
SELECT_KERNEL_3ARGS
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convolution
);
auto
window_movement_strides
=
convolution
->
get_window_movement_strides
();
auto
window_dilation_strides
=
convolution
->
get_window_dilation_strides
();
...
...
src/ngraph/runtime/cpu/cpu_builder.hpp
View file @
ecb1608b
...
...
@@ -76,6 +76,52 @@
KV = K<uint64_t>; \
}
#define SELECT_KERNEL_3ARGS(KV, ET, K) \
if (ET == element::boolean) \
{ \
KV = K<char, char, char>; \
} \
else if (ET == element::f32) \
{ \
KV = K<float, float, float>; \
} \
else if (ET == element::f64) \
{ \
KV = K<double, double, double>; \
} \
else if (ET == element::i8) \
{ \
KV = K<int8_t, int8_t, int8_t>; \
} \
else if (ET == element::i16) \
{ \
KV = K<int16_t, int16_t, int16_t>; \
} \
else if (ET == element::i32) \
{ \
KV = K<int32_t, int32_t, int32_t>; \
} \
else if (ET == element::i64) \
{ \
KV = K<int64_t, int64_t, int64_t>; \
} \
else if (ET == element::u8) \
{ \
KV = K<uint8_t, uint8_t, uint8_t>; \
} \
else if (ET == element::u16) \
{ \
KV = K<uint16_t, uint16_t, uint16_t>; \
} \
else if (ET == element::u32) \
{ \
KV = K<uint32_t, uint32_t, uint32_t>; \
} \
else if (ET == element::u64) \
{ \
KV = K<uint64_t, uint64_t, uint64_t>; \
}
#define SELECT_RANK(KV, ET, R, K) \
if (R == 1) \
KV = K<ET, 1>; \
...
...
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