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
7eaffe8f
Commit
7eaffe8f
authored
Aug 05, 2019
by
Shucai Xiao
Browse files
clang format
parent
90cfe474
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
src/targets/gpu/include/migraphx/gpu/int8_gemm_pack.hpp
src/targets/gpu/include/migraphx/gpu/int8_gemm_pack.hpp
+2
-4
src/targets/gpu/int8_conv_pack.cpp
src/targets/gpu/int8_conv_pack.cpp
+2
-2
src/targets/gpu/int8_gemm_pack.cpp
src/targets/gpu/int8_gemm_pack.cpp
+4
-6
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+6
-4
No files found.
src/targets/gpu/include/migraphx/gpu/int8_gemm_pack.hpp
View file @
7eaffe8f
...
...
@@ -15,8 +15,7 @@ struct hip_int8_gemm_pack_a
{
std
::
string
name
()
const
{
return
"gpu::int8_gemm_pack_a"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
;
std
::
ptrdiff_t
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
...
...
@@ -27,8 +26,7 @@ struct hip_int8_gemm_pack_b
{
std
::
string
name
()
const
{
return
"gpu::int8_gemm_pack_b"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
;
argument
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
;
std
::
ptrdiff_t
output_alias
(
const
std
::
vector
<
shape
>&
shapes
)
const
{
return
shapes
.
size
()
-
1
;
...
...
src/targets/gpu/int8_conv_pack.cpp
View file @
7eaffe8f
src/targets/gpu/int8_gemm_pack.cpp
View file @
7eaffe8f
...
...
@@ -12,9 +12,8 @@ shape hip_int8_gemm_pack_a::compute_shape(const std::vector<shape>& inputs) cons
return
inputs
.
at
(
0
);
}
argument
hip_int8_gemm_pack_a
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
argument
hip_int8_gemm_pack_a
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
device
::
int8_gemm_pack_a
(
ctx
.
get_stream
().
get
(),
args
[
1
],
args
[
0
]);
return
args
[
1
];
...
...
@@ -26,9 +25,8 @@ shape hip_int8_gemm_pack_b::compute_shape(const std::vector<shape>& inputs) cons
return
inputs
.
at
(
0
);
}
argument
hip_int8_gemm_pack_b
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
argument
hip_int8_gemm_pack_b
::
compute
(
context
&
ctx
,
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
device
::
int8_gemm_pack_b
(
ctx
.
get_stream
().
get
(),
args
[
1
],
args
[
0
]);
return
args
[
1
];
...
...
src/targets/gpu/lowering.cpp
View file @
7eaffe8f
...
...
@@ -133,7 +133,7 @@ struct miopen_apply
add_lrn_op
();
add_convolution_op
();
add_quant_convolution_op
();
//add_quant_dot_op();
//
add_quant_dot_op();
add_pooling_op
();
add_batch_norm_inference_op
();
}
...
...
@@ -189,10 +189,12 @@ struct miopen_apply
auto
args
=
ins
->
inputs
();
auto
arg_x_vec4
=
insert_allocation
(
ins
,
conv
.
pack_int8_shape
(
args
[
0
]
->
get_shape
()));
auto
arg_x_packed
=
prog
->
insert_instruction
(
ins
,
miopen_int8_conv_pack
{},
{
args
[
0
],
arg_x_vec4
});
auto
arg_x_packed
=
prog
->
insert_instruction
(
ins
,
miopen_int8_conv_pack
{},
{
args
[
0
],
arg_x_vec4
});
auto
arg_y_vec4
=
insert_allocation
(
ins
,
conv
.
pack_int8_shape
(
args
[
1
]
->
get_shape
()));
auto
arg_y_packed
=
prog
->
insert_instruction
(
ins
,
miopen_int8_conv_pack
{},
{
args
[
1
],
arg_y_vec4
});
auto
arg_y_packed
=
prog
->
insert_instruction
(
ins
,
miopen_int8_conv_pack
{},
{
args
[
1
],
arg_y_vec4
});
auto
workspace
=
insert_allocation
(
ins
,
ws
,
"workspace"
);
auto
output
=
insert_allocation
(
ins
,
ins
->
get_shape
());
...
...
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