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
cf296f0c
Commit
cf296f0c
authored
Sep 17, 2022
by
Paul
Browse files
Format
parent
ab855a89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
src/fuse_pointwise.cpp
src/fuse_pointwise.cpp
+1
-1
src/include/migraphx/check_shapes.hpp
src/include/migraphx/check_shapes.hpp
+5
-4
src/targets/gpu/convolution.cpp
src/targets/gpu/convolution.cpp
+2
-1
No files found.
src/fuse_pointwise.cpp
View file @
cf296f0c
...
...
@@ -56,7 +56,7 @@ static void create_pointwise_modules(module_pass_manager& mpm)
{
if
(
not
ins
->
get_operator
().
attributes
().
get
(
"pointwise"
,
false
))
continue
;
if
(
ins
->
get_operator
().
name
()
==
"layout"
)
if
(
ins
->
get_operator
().
name
()
==
"layout"
)
continue
;
assert
(
ins
->
get_operator
().
attributes
().
contains
(
"point_op"
));
auto
*
pm
=
mpm
.
create_module
(
mpm
.
get_module
().
name
()
+
":pointwise"
+
std
::
to_string
(
n
++
));
...
...
src/include/migraphx/check_shapes.hpp
View file @
cf296f0c
...
...
@@ -236,11 +236,12 @@ struct check_shapes
/*!
* Check all shapes are packed with certain layouts
*/
const
check_shapes
&
packed_layouts
(
const
std
::
initializer_list
<
std
::
vector
<
int64_t
>>&
layouts
)
const
const
check_shapes
&
packed_layouts
(
const
std
::
initializer_list
<
std
::
vector
<
int64_t
>>&
layouts
)
const
{
if
(
not
this
->
all_of
([
&
](
const
shape
&
s
)
{
return
s
.
packed
()
and
contains
(
layouts
,
find_permutation
(
s
));
}))
if
(
not
this
->
all_of
([
&
](
const
shape
&
s
)
{
return
s
.
packed
()
and
contains
(
layouts
,
find_permutation
(
s
));
}))
MIGRAPHX_THROW
(
prefix
()
+
"Shapes are not packed with correct layout"
);
return
*
this
;
}
...
...
src/targets/gpu/convolution.cpp
View file @
cf296f0c
...
...
@@ -33,7 +33,8 @@ shape miopen_convolution::compute_shape(const std::vector<shape>& inputs) const
{
check_shapes
{
inputs
,
*
this
}.
has
(
4
);
std
::
vector
<
shape
>
conv_inputs
(
inputs
.
begin
(),
inputs
.
begin
()
+
2
);
check_shapes
{
conv_inputs
,
*
this
}.
max_ndims
(
5
).
packed_layouts
({{
0
,
1
,
2
},
{
0
,
1
,
2
,
3
},
{
0
,
2
,
3
,
1
},
{
0
,
1
,
2
,
3
,
4
}});
check_shapes
{
conv_inputs
,
*
this
}.
max_ndims
(
5
).
packed_layouts
(
{{
0
,
1
,
2
},
{
0
,
1
,
2
,
3
},
{
0
,
2
,
3
,
1
},
{
0
,
1
,
2
,
3
,
4
}});
return
op
.
normalize_compute_shape
(
conv_inputs
);
}
...
...
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