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
a7f59336
Commit
a7f59336
authored
Jul 09, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert change
parent
0dbeb06e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
benchmark.cpp
src/tools/nbench/benchmark.cpp
+13
-13
No files found.
src/tools/nbench/benchmark.cpp
View file @
a7f59336
...
...
@@ -106,9 +106,9 @@ void init_real_tv(shared_ptr<runtime::Tensor> tv, T min, T max)
tv
->
write
(
vec
.
data
(),
vec
.
size
()
*
sizeof
(
T
));
}
static
void
random_init
(
shared_ptr
<
runtime
::
Tensor
>
t
ensor
)
static
void
random_init
(
shared_ptr
<
runtime
::
Tensor
>
t
v
)
{
element
::
Type
et
=
t
ensor
->
get_element_type
();
element
::
Type
et
=
t
v
->
get_element_type
();
#if !(defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 8))
#pragma GCC diagnostic push
#pragma GCC diagnostic error "-Wswitch"
...
...
@@ -116,17 +116,17 @@ static void random_init(shared_ptr<runtime::Tensor> tensor)
#endif
switch
(
et
.
get_type_enum
())
{
case
element
:
:
Type_t
::
boolean
:
init_int_tv
<
char
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
f32
:
init_real_tv
<
float
>
(
t
ensor
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
f64
:
init_real_tv
<
double
>
(
t
ensor
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i8
:
init_int_tv
<
int8_t
>
(
t
ensor
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i16
:
init_int_tv
<
int16_t
>
(
t
ensor
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i32
:
init_int_tv
<
int32_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
i64
:
init_int_tv
<
int64_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u8
:
init_int_tv
<
uint8_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u16
:
init_int_tv
<
uint16_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u32
:
init_int_tv
<
uint32_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u64
:
init_int_tv
<
uint64_t
>
(
t
ensor
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
boolean
:
init_int_tv
<
char
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
f32
:
init_real_tv
<
float
>
(
t
v
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
f64
:
init_real_tv
<
double
>
(
t
v
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i8
:
init_int_tv
<
int8_t
>
(
t
v
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i16
:
init_int_tv
<
int16_t
>
(
t
v
,
-
1
,
1
);
break
;
case
element
:
:
Type_t
::
i32
:
init_int_tv
<
int32_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
i64
:
init_int_tv
<
int64_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u8
:
init_int_tv
<
uint8_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u16
:
init_int_tv
<
uint16_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u32
:
init_int_tv
<
uint32_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
u64
:
init_int_tv
<
uint64_t
>
(
t
v
,
0
,
1
);
break
;
case
element
:
:
Type_t
::
undefined
:
case
element
:
:
Type_t
::
dynamic
:
case
element
:
:
Type_t
::
bf16
:
...
...
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