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
1f352d61
"vscode:/vscode.git/clone" did not exist on "c1844898336202166102b037c5c385fd9398b04b"
Commit
1f352d61
authored
May 25, 2023
by
Paul
Browse files
Format
parent
b621b28f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
src/targets/gpu/fuse_ck.cpp
src/targets/gpu/fuse_ck.cpp
+5
-4
src/targets/gpu/jit/ck_gemm.cpp
src/targets/gpu/jit/ck_gemm.cpp
+1
-4
No files found.
src/targets/gpu/fuse_ck.cpp
View file @
1f352d61
...
...
@@ -68,8 +68,8 @@ struct find_ck_gemm_pointwise
// Find a gemm followed by a pointwise operation.
auto
matcher
()
const
{
auto
gemm
=
match
::
skip
(
match
::
name
(
"contiguous"
))(
match
::
name
(
"dot"
,
"quant_dot"
)(
is_ck_gemm
().
bind
(
"gemm"
)));
auto
gemm
=
match
::
skip
(
match
::
name
(
"contiguous"
))(
match
::
name
(
"dot"
,
"quant_dot"
)(
is_ck_gemm
().
bind
(
"gemm"
)));
return
match
::
name
(
"pointwise"
)(
match
::
any_of
[
match
::
inputs
()](
gemm
.
bind
(
"x"
)));
}
...
...
@@ -85,7 +85,8 @@ struct find_ck_gemm_pointwise
auto
gemm_it
=
std
::
find
(
inputs
.
begin
(),
inputs
.
end
(),
x_ins
);
auto
gemm_idx
=
gemm_it
-
inputs
.
begin
();
assert
(
gemm_it
!=
inputs
.
end
());
if
(
not
contains
({
shape
::
half_type
,
shape
::
int8_type
,
shape
::
int32_type
},
ins
->
get_shape
().
type
()))
if
(
not
contains
({
shape
::
half_type
,
shape
::
int8_type
,
shape
::
int32_type
},
ins
->
get_shape
().
type
()))
return
;
if
(
gemm_idx
!=
0
)
{
...
...
@@ -121,7 +122,7 @@ struct find_ck_gemm
void
fuse_ck
::
apply
(
module_pass_manager
&
mpm
)
const
{
if
(
enabled
(
MIGRAPHX_ENABLE_CK_GEMM
{}))
if
(
enabled
(
MIGRAPHX_ENABLE_CK_GEMM
{}))
{
match
::
find_matches
(
mpm
,
find_ck_gemm_pointwise
{});
match
::
find_matches
(
mpm
,
find_ck_gemm
{});
...
...
src/targets/gpu/jit/ck_gemm.cpp
View file @
1f352d61
...
...
@@ -220,10 +220,7 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
s
=
shape
{
s
.
type
(),
{
m1
,
m2
}};
}
std
::
vector
<
std
::
string
>
names
()
const
{
return
{
"ck_gemm"
,
"gpu::ck_gemm"
};
}
std
::
vector
<
std
::
string
>
names
()
const
{
return
{
"ck_gemm"
,
"gpu::ck_gemm"
};
}
operation
compile_op
(
context
&
/* ctx */
,
const
std
::
vector
<
shape
>&
inputs
,
const
value
&
v
)
const
{
...
...
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