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
9dcbd52b
Commit
9dcbd52b
authored
May 24, 2022
by
Paul
Browse files
Format
parent
4272fff1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/targets/gpu/mlir.cpp
src/targets/gpu/mlir.cpp
+2
-2
test/gpu/mlir.cpp
test/gpu/mlir.cpp
+2
-2
No files found.
src/targets/gpu/mlir.cpp
View file @
9dcbd52b
...
@@ -424,10 +424,10 @@ struct mlir_program
...
@@ -424,10 +424,10 @@ struct mlir_program
static
value
get_operator_value
(
const
operation
&
op
)
static
value
get_operator_value
(
const
operation
&
op
)
{
{
auto
v
=
op
.
to_value
();
auto
v
=
op
.
to_value
();
if
(
op
.
name
()
==
"convolution"
)
if
(
op
.
name
()
==
"convolution"
)
{
{
// Adjust symetrical padding
// Adjust symetrical padding
if
(
v
.
at
(
"padding"
).
size
()
==
v
.
at
(
"stride"
).
size
())
if
(
v
.
at
(
"padding"
).
size
()
==
v
.
at
(
"stride"
).
size
())
{
{
auto
padding
=
v
.
at
(
"padding"
);
auto
padding
=
v
.
at
(
"padding"
);
std
::
copy
(
padding
.
begin
(),
padding
.
end
(),
std
::
back_inserter
(
v
.
at
(
"padding"
)));
std
::
copy
(
padding
.
begin
(),
padding
.
end
(),
std
::
back_inserter
(
v
.
at
(
"padding"
)));
...
...
test/gpu/mlir.cpp
View file @
9dcbd52b
...
@@ -109,8 +109,8 @@ module {
...
@@ -109,8 +109,8 @@ module {
}
}
)__migraphx__"
;
)__migraphx__"
;
migraphx
::
module
m
;
migraphx
::
module
m
;
auto
x
=
m
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
4
,
4
}});
auto
x
=
m
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
,
8
,
4
,
4
}});
auto
w
=
m
.
add_parameter
(
"w"
,
{
migraphx
::
shape
::
float_type
,
{
2
,
8
,
3
,
3
}});
auto
w
=
m
.
add_parameter
(
"w"
,
{
migraphx
::
shape
::
float_type
,
{
2
,
8
,
3
,
3
}});
auto
conv
=
m
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
w
);
auto
conv
=
m
.
add_instruction
(
migraphx
::
make_op
(
"convolution"
),
x
,
w
);
m
.
add_return
({
conv
});
m
.
add_return
({
conv
});
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
auto
s
=
migraphx
::
gpu
::
dump_mlir
(
m
);
...
...
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