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
composable_kernel_ROCM
Commits
8c96b18b
"...composable_kernel.git" did not exist on "bce2cfd0b091e20b85859f1ab192ac8d612ce17f"
Unverified
Commit
8c96b18b
authored
Jan 29, 2025
by
Max Podkorytov
Browse files
use custom score for testing
parent
6ef86201
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
example/ck_tile/18_flexattn/fmha_fwd.cpp
example/ck_tile/18_flexattn/fmha_fwd.cpp
+3
-3
example/ck_tile/18_flexattn/generate.py
example/ck_tile/18_flexattn/generate.py
+2
-2
No files found.
example/ck_tile/18_flexattn/fmha_fwd.cpp
View file @
8c96b18b
...
@@ -1375,9 +1375,9 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -1375,9 +1375,9 @@ bool run(const ck_tile::ArgParser& arg_parser)
ck_tile
::
identity
{},
ck_tile
::
identity
{},
ck_tile
::
scales
(
scale_s
));
ck_tile
::
scales
(
scale_s
));
auto
score_mod
=
[]
(
auto
s
core
,
ck_tile
::
index_t
b
,
ck_tile
::
index_t
h
,
ck_tile
::
index_t
q_idx
,
ck_tile
::
index_t
v_idx
)
{
auto
score_mod
=
[]
(
auto
s
,
ck_tile
::
index_t
b
,
ck_tile
::
index_t
h
,
ck_tile
::
index_t
q_idx
,
ck_tile
::
index_t
v_idx
)
{
(
void
)
s
core
;
(
void
)
b
;
(
void
)
h
;
(
void
)
q_idx
;
(
void
)
v_idx
;
(
void
)
s
;
(
void
)
b
;
(
void
)
h
;
(
void
)
q_idx
;
(
void
)
v_idx
;
return
s
core
;
return
s
+
static_cast
<
decltype
(
s
)
>
(
q_idx
-
v_idx
)
;
};
};
s_host_ref
.
ForEach
([
&
](
auto
&
self
,
auto
i
)
{
s_host_ref
.
ForEach
([
&
](
auto
&
self
,
auto
i
)
{
...
...
example/ck_tile/18_flexattn/generate.py
View file @
8c96b18b
...
@@ -108,9 +108,9 @@ if __name__ == "__main__":
...
@@ -108,9 +108,9 @@ if __name__ == "__main__":
parser
.
add_argument
(
parser
.
add_argument
(
"--score_mod_expr"
,
"--score_mod_expr"
,
default
=
"s"
,
#
default="s",
# test with
# test with
#
default="s + static_cast<decltype(s)>(q_idx - v_idx)"
default
=
"s + static_cast<decltype(s)>(q_idx - v_idx)"
,
required
=
False
,
required
=
False
,
help
=
"flex attention's score mod function, a cpp expression with `s`, `b`, `h`, `q_idx`, and `v_idx` variables"
help
=
"flex attention's score mod function, a cpp expression with `s`, `b`, `h`, `q_idx`, and `v_idx` variables"
)
)
...
...
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