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
a850f0bc
Commit
a850f0bc
authored
May 30, 2023
by
Ted Themistokleous
Browse files
Bad attempt at a matcher
This doesn't seem to match yet for the gathernd nonzero op.
parent
4418bf77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/simplify_reshapes.cpp
src/simplify_reshapes.cpp
+18
-0
No files found.
src/simplify_reshapes.cpp
View file @
a850f0bc
...
...
@@ -491,6 +491,23 @@ struct find_resize
}
};
struct
find_nonzero_gathernd_filter
{
auto
matcher
()
const
{
return
match
::
name
(
"gathernd"
)(
match
::
args
((
match
::
arg
(
1
)(
match
::
name
(
"transpose"
).
bind
(
"data"
)))));
}
void
apply
(
module
&
m
,
const
match
::
matcher_result
&
r
)
const
{
auto
ins
=
r
.
result
;
auto
reshape
=
r
.
instructions
[
"data"
];
std
::
cout
<<
"Beep"
<<
std
::
endl
;
}
};
struct
find_where_op
{
auto
matcher
()
const
...
...
@@ -804,6 +821,7 @@ void simplify_reshapes::apply(module& m) const
match
::
find_matches
(
m
,
find_where_op
{},
find_resize
{},
find_nonzero_gathernd_filter
{},
find_reshape_cont
{},
find_nop_reshapes
{},
find_reshaper
{},
...
...
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