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
d70fd0df
Commit
d70fd0df
authored
Nov 09, 2021
by
Khalique Ahmed
Browse files
Merge branch 'develop' of
https://github.com/ROCmSoftwarePlatform/AMDMIGraphX
into batch_report
parents
565b5995
fb39e5e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/targets/gpu/fuse_ops.cpp
src/targets/gpu/fuse_ops.cpp
+11
-0
No files found.
src/targets/gpu/fuse_ops.cpp
100755 → 100644
View file @
d70fd0df
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/clip.hpp>
#include <migraphx/gpu/clip.hpp>
#include <migraphx/gpu/convolution.hpp>
#include <migraphx/gpu/convolution.hpp>
#include <migraphx/gpu/device_name.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/gpu/oper.hpp>
#include <migraphx/gpu/add.hpp>
#include <migraphx/gpu/add.hpp>
#include <migraphx/gpu/mul.hpp>
#include <migraphx/gpu/mul.hpp>
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
#include <migraphx/array.hpp>
#include <migraphx/array.hpp>
#include <migraphx/op/clip.hpp>
#include <migraphx/op/clip.hpp>
#include <cmath>
#include <cmath>
#include <set>
namespace
migraphx
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
@@ -152,6 +154,12 @@ struct fusion
...
@@ -152,6 +154,12 @@ struct fusion
}
}
};
};
const
std
::
unordered_set
<
std
::
string
>&
get_supported_archs
()
{
static
std
::
unordered_set
<
std
::
string
>
supported_archs
{
"gfx900"
,
"gfx906"
,
"gfx908"
,
"gfx1030"
};
return
supported_archs
;
}
MIGRAPHX_PRED_MATCHER
(
bias_shape
,
instruction_ref
ins
)
MIGRAPHX_PRED_MATCHER
(
bias_shape
,
instruction_ref
ins
)
{
{
auto
&&
s
=
ins
->
get_shape
();
auto
&&
s
=
ins
->
get_shape
();
...
@@ -161,6 +169,9 @@ MIGRAPHX_PRED_MATCHER(bias_shape, instruction_ref ins)
...
@@ -161,6 +169,9 @@ MIGRAPHX_PRED_MATCHER(bias_shape, instruction_ref ins)
MIGRAPHX_PRED_MATCHER
(
fusable_conv
,
instruction_ref
ins
)
MIGRAPHX_PRED_MATCHER
(
fusable_conv
,
instruction_ref
ins
)
{
{
const
auto
device_name
=
split_string
(
get_device_name
(),
':'
).
front
();
if
(
not
contains
(
get_supported_archs
(),
device_name
))
return
false
;
if
(
enabled
(
MIGRAPHX_DISABLE_MIOPEN_FUSION
{}))
if
(
enabled
(
MIGRAPHX_DISABLE_MIOPEN_FUSION
{}))
return
false
;
return
false
;
if
(
ins
->
name
()
!=
"gpu::convolution"
)
if
(
ins
->
name
()
!=
"gpu::convolution"
)
...
...
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