Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
de478fc3
Commit
de478fc3
authored
Sep 03, 2019
by
Shucai Xiao
Browse files
clang format
parent
f84580ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
test/quantization.cpp
test/quantization.cpp
+2
-5
No files found.
test/quantization.cpp
View file @
de478fc3
...
@@ -670,8 +670,7 @@ TEST_CASE(dot_float_convert)
...
@@ -670,8 +670,7 @@ TEST_CASE(dot_float_convert)
};
};
auto
p
=
create_program
();
auto
p
=
create_program
();
const
std
::
vector
<
std
::
pair
<
float
,
float
>>&
quant_params
{
const
std
::
vector
<
std
::
pair
<
float
,
float
>>&
quant_params
{{
0.1
f
,
1.0
f
},
{
0.1
f
,
0.0
f
}};
{
0.1
f
,
1.0
f
},
{
0.1
f
,
0.0
f
}};
migraphx
::
quantize_int8
(
p
,
{
"dot"
},
quant_params
);
migraphx
::
quantize_int8
(
p
,
{
"dot"
},
quant_params
);
migraphx
::
run_passes
(
p
,
{
migraphx
::
dead_code_elimination
{}});
migraphx
::
run_passes
(
p
,
{
migraphx
::
dead_code_elimination
{}});
auto
qp
=
create_int8_quantized_prog
();
auto
qp
=
create_int8_quantized_prog
();
...
@@ -679,7 +678,6 @@ TEST_CASE(dot_float_convert)
...
@@ -679,7 +678,6 @@ TEST_CASE(dot_float_convert)
EXPECT
(
p
==
qp
);
EXPECT
(
p
==
qp
);
}
}
TEST_CASE
(
conv_float
)
TEST_CASE
(
conv_float
)
{
{
auto
create_program
=
[]
{
auto
create_program
=
[]
{
...
@@ -905,7 +903,7 @@ TEST_CASE(int8_quantization)
...
@@ -905,7 +903,7 @@ TEST_CASE(int8_quantization)
migraphx
::
program
::
parameter_map
&
m_in
,
migraphx
::
program
::
parameter_map
&
m_in
,
std
::
vector
<
float
>&
res
,
std
::
vector
<
float
>&
res
,
bool
b_quantize
=
false
)
{
bool
b_quantize
=
false
)
{
if
(
b_quantize
)
if
(
b_quantize
)
{
{
std
::
vector
<
migraphx
::
program
::
parameter_map
>
cali_data
;
std
::
vector
<
migraphx
::
program
::
parameter_map
>
cali_data
;
cali_data
.
push_back
(
m_in
);
cali_data
.
push_back
(
m_in
);
...
@@ -960,5 +958,4 @@ TEST_CASE(int8_quantization)
...
@@ -960,5 +958,4 @@ TEST_CASE(int8_quantization)
}
}
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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