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
bf6cf5b0
Commit
bf6cf5b0
authored
May 05, 2022
by
Paul
Browse files
Format
parent
f7a59edb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/targets/gpu/fuse_mlir.cpp
src/targets/gpu/fuse_mlir.cpp
+4
-3
src/targets/gpu/mlir.cpp
src/targets/gpu/mlir.cpp
+1
-1
No files found.
src/targets/gpu/fuse_mlir.cpp
View file @
bf6cf5b0
...
@@ -29,9 +29,10 @@ struct find_conv_pointwise
...
@@ -29,9 +29,10 @@ struct find_conv_pointwise
auto
pm
=
ins
->
module_inputs
().
front
();
auto
pm
=
ins
->
module_inputs
().
front
();
auto
names
=
pm
->
get_parameter_names
();
auto
names
=
pm
->
get_parameter_names
();
// Whitelist pointwise operators
// Whitelist pointwise operators
if
(
std
::
any_of
(
pm
->
begin
(),
pm
->
end
(),
[](
const
auto
&
i
)
{
if
(
std
::
any_of
(
pm
->
begin
(),
pm
->
end
(),
[](
const
auto
&
i
)
{
return
not
contains
({
"@literal"
,
"@param"
,
"@return"
,
"convolution"
,
"add"
,
"relu"
},
i
.
name
());
return
not
contains
({
"@literal"
,
"@param"
,
"@return"
,
"convolution"
,
"add"
,
"relu"
},
}))
i
.
name
());
}))
return
;
return
;
std
::
sort
(
names
.
begin
(),
names
.
end
());
std
::
sort
(
names
.
begin
(),
names
.
end
());
module
mm
{};
module
mm
{};
...
...
src/targets/gpu/mlir.cpp
View file @
bf6cf5b0
...
@@ -467,7 +467,7 @@ struct mlir_program
...
@@ -467,7 +467,7 @@ struct mlir_program
// 2nd pipeline to call
// 2nd pipeline to call
std
::
string
tname
=
get_device_name
();
std
::
string
tname
=
get_device_name
();
// HACK: Since MLIR can't handle the full target name
// HACK: Since MLIR can't handle the full target name
auto
hacked_tname
=
tname
.
substr
(
0
,
tname
.
find
(
":"
));
auto
hacked_tname
=
tname
.
substr
(
0
,
tname
.
find
(
":"
));
auto
hacked_features
=
tname
.
substr
(
tname
.
find
(
":"
));
auto
hacked_features
=
tname
.
substr
(
tname
.
find
(
":"
));
mlirMIGraphXAddBackendPipeline
(
pm
.
get
(),
hacked_tname
.
c_str
(),
""
,
hacked_features
.
c_str
());
mlirMIGraphXAddBackendPipeline
(
pm
.
get
(),
hacked_tname
.
c_str
(),
""
,
hacked_features
.
c_str
());
mlirPassManagerRun
(
pm
.
get
(),
mmodule
.
get
());
mlirPassManagerRun
(
pm
.
get
(),
mmodule
.
get
());
...
...
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