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
d4de8495
Commit
d4de8495
authored
Oct 08, 2024
by
danyao12
Browse files
rename & ensure thread safety
parent
871c7556
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
146 deletions
+146
-146
example/ck_tile/01_fmha/CMakeLists.txt
example/ck_tile/01_fmha/CMakeLists.txt
+1
-1
example/ck_tile/01_fmha/codegen/ops/fmha_bwd.py
example/ck_tile/01_fmha/codegen/ops/fmha_bwd.py
+96
-96
example/ck_tile/01_fmha/fmha_bwd.cpp
example/ck_tile/01_fmha/fmha_bwd.cpp
+19
-19
example/ck_tile/01_fmha/fmha_bwd.hpp
example/ck_tile/01_fmha/fmha_bwd.hpp
+4
-4
example/ck_tile/01_fmha/hsaco/bwd_bf16_spec_a32.cpp
example/ck_tile/01_fmha/hsaco/bwd_bf16_spec_a32.cpp
+1
-1
example/ck_tile/01_fmha/hsaco/bwd_bf16_spec_causal_a32.cpp
example/ck_tile/01_fmha/hsaco/bwd_bf16_spec_causal_a32.cpp
+1
-1
example/ck_tile/01_fmha/hsaco/bwd_fp16_spec_a32.cpp
example/ck_tile/01_fmha/hsaco/bwd_fp16_spec_a32.cpp
+1
-1
example/ck_tile/01_fmha/hsaco/bwd_fp16_spec_causal_a32.cpp
example/ck_tile/01_fmha/hsaco/bwd_fp16_spec_causal_a32.cpp
+1
-1
example/ck_tile/01_fmha/hsaco/fmha_hsaco.hpp
example/ck_tile/01_fmha/hsaco/fmha_hsaco.hpp
+4
-4
example/ck_tile/01_fmha/script/benchmark_bwd_ext.sh
example/ck_tile/01_fmha/script/benchmark_bwd_ext.sh
+12
-12
example/ck_tile/01_fmha/script/smoke_test_bwd_ext.sh
example/ck_tile/01_fmha/script/smoke_test_bwd_ext.sh
+4
-4
example/ck_tile/01_fmha/script/smoke_test_bwd_xqa_ext.sh
example/ck_tile/01_fmha/script/smoke_test_bwd_xqa_ext.sh
+2
-2
No files found.
example/ck_tile/01_fmha/CMakeLists.txt
View file @
d4de8495
...
@@ -67,7 +67,7 @@ set(EXAMPLE_FMHA_BWD "tile_example_fmha_bwd")
...
@@ -67,7 +67,7 @@ set(EXAMPLE_FMHA_BWD "tile_example_fmha_bwd")
# to be included in "make all/install/check"
# to be included in "make all/install/check"
message
(
"adding example
${
EXAMPLE_FMHA_BWD
}
"
)
message
(
"adding example
${
EXAMPLE_FMHA_BWD
}
"
)
add_executable
(
${
EXAMPLE_FMHA_BWD
}
EXCLUDE_FROM_ALL hsaco/bwd_bf16_a16.cpp hsaco/bwd_bf16_a16_rtz.cpp hsaco/bwd_bf16_a32.cpp hsaco/bwd_bf16_causal_a16.cpp hsaco/bwd_bf16_causal_a16_rtz.cpp hsaco/bwd_bf16_causal_a32.cpp hsaco/bwd_bf16_
nocoex
_a32.cpp hsaco/bwd_bf16_
nocoex
_causal_a32.cpp hsaco/bwd_fp16_a16.cpp hsaco/bwd_fp16_a32.cpp hsaco/bwd_fp16_causal_a16.cpp hsaco/bwd_fp16_causal_a32.cpp hsaco/bwd_fp16_
nocoex
_a32.cpp hsaco/bwd_fp16_
nocoex
_causal_a32.cpp fmha_bwd.cpp
)
add_executable
(
${
EXAMPLE_FMHA_BWD
}
EXCLUDE_FROM_ALL hsaco/bwd_bf16_a16.cpp hsaco/bwd_bf16_a16_rtz.cpp hsaco/bwd_bf16_a32.cpp hsaco/bwd_bf16_causal_a16.cpp hsaco/bwd_bf16_causal_a16_rtz.cpp hsaco/bwd_bf16_causal_a32.cpp hsaco/bwd_bf16_
spec
_a32.cpp hsaco/bwd_bf16_
spec
_causal_a32.cpp hsaco/bwd_fp16_a16.cpp hsaco/bwd_fp16_a32.cpp hsaco/bwd_fp16_causal_a16.cpp hsaco/bwd_fp16_causal_a32.cpp hsaco/bwd_fp16_
spec
_a32.cpp hsaco/bwd_fp16_
spec
_causal_a32.cpp fmha_bwd.cpp
)
target_include_directories
(
${
EXAMPLE_FMHA_BWD
}
PRIVATE
${
CMAKE_CURRENT_LIST_DIR
}
)
target_include_directories
(
${
EXAMPLE_FMHA_BWD
}
PRIVATE
${
CMAKE_CURRENT_LIST_DIR
}
)
target_sources
(
${
EXAMPLE_FMHA_BWD
}
PRIVATE
${
FMHA_BWD_GEN_BLOBS
}
)
target_sources
(
${
EXAMPLE_FMHA_BWD
}
PRIVATE
${
FMHA_BWD_GEN_BLOBS
}
)
...
...
example/ck_tile/01_fmha/codegen/ops/fmha_bwd.py
View file @
d4de8495
This diff is collapsed.
Click to expand it.
example/ck_tile/01_fmha/fmha_bwd.cpp
View file @
d4de8495
...
@@ -92,17 +92,17 @@ auto create_args(int argc, char* argv[])
...
@@ -92,17 +92,17 @@ auto create_args(int argc, char* argv[])
"0"
,
"0"
,
"if set to 1 will use multi-buffer reduction strategy for dq, atomic opeartion "
"if set to 1 will use multi-buffer reduction strategy for dq, atomic opeartion "
"will not be used"
)
"will not be used"
)
.
insert
(
"
ext_asm
"
,
"0"
,
"if set to 1, some cases will call the
ext asm
dqdkdv kernel"
)
.
insert
(
"
bwd_v3
"
,
"0"
,
"if set to 1, some cases will call the
bwd v3
dqdkdv kernel"
)
.
insert
(
.
insert
(
"
asm
_atomic_fp32"
,
"
v3
_atomic_fp32"
,
"1"
,
"1"
,
"if set to 0 will use atomic fp16/bf16(w/o convert_dq kernel) when
ext_asm
is set to 1"
)
"if set to 0 will use atomic fp16/bf16(w/o convert_dq kernel) when
bwd_v3
is set to 1"
)
.
insert
(
"
asm_no_coex
"
,
.
insert
(
"
v3_spec
"
,
"0"
,
"0"
,
"if set to 1 will
use non-coexectuion
kernel when
ext_asm
is set to 1"
)
"if set to 1 will
call the specialized v3
kernel when
bwd_v3
is set to 1"
)
.
insert
(
"
asm
_rtz_cvt"
,
.
insert
(
"
v3
_rtz_cvt"
,
"0"
,
"0"
,
"if set to 1 will use float to bf16 RTZ convert when
ext_asm
is set to 1"
);
"if set to 1 will use float to bf16 RTZ convert when
bwd_v3
is set to 1"
);
bool
result
=
arg_parser
.
parse
(
argc
,
argv
);
bool
result
=
arg_parser
.
parse
(
argc
,
argv
);
return
std
::
make_tuple
(
result
,
arg_parser
);
return
std
::
make_tuple
(
result
,
arg_parser
);
...
@@ -187,14 +187,14 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -187,14 +187,14 @@ bool run(const ck_tile::ArgParser& arg_parser)
seed
.
reset
();
seed
.
reset
();
}
}
int
stream_warmup
=
arg_parser
.
get_int
(
"warmup"
);
int
stream_warmup
=
arg_parser
.
get_int
(
"warmup"
);
int
stream_repeat
=
arg_parser
.
get_int
(
"repeat"
);
int
stream_repeat
=
arg_parser
.
get_int
(
"repeat"
);
bool
kname
=
arg_parser
.
get_bool
(
"kname"
);
bool
kname
=
arg_parser
.
get_bool
(
"kname"
);
bool
deterministic
=
arg_parser
.
get_bool
(
"deterministic"
);
bool
deterministic
=
arg_parser
.
get_bool
(
"deterministic"
);
bool
ext_asm
=
arg_parser
.
get_bool
(
"
ext_asm
"
);
bool
bwd_v3
=
arg_parser
.
get_bool
(
"
bwd_v3
"
);
bool
asm
_atomic_fp32
=
arg_parser
.
get_bool
(
"
asm
_atomic_fp32"
);
bool
v3
_atomic_fp32
=
arg_parser
.
get_bool
(
"
v3
_atomic_fp32"
);
bool
asm_no_coex
=
arg_parser
.
get_bool
(
"
asm_no_coex
"
);
bool
v3_spec
=
arg_parser
.
get_bool
(
"
v3_spec
"
);
bool
asm
_rtz_cvt
=
arg_parser
.
get_bool
(
"
asm
_rtz_cvt"
);
bool
v3
_rtz_cvt
=
arg_parser
.
get_bool
(
"
v3
_rtz_cvt"
);
ck_tile
::
stream_config
stream_config
{
nullptr
,
ck_tile
::
stream_config
stream_config
{
nullptr
,
true
,
true
,
...
@@ -430,10 +430,10 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -430,10 +430,10 @@ bool run(const ck_tile::ArgParser& arg_parser)
p_drop
>
0.0
f
,
p_drop
>
0.0
f
,
s_randval
,
s_randval
,
deterministic
,
deterministic
,
ext_asm
,
bwd_v3
,
asm
_atomic_fp32
,
v3
_atomic_fp32
,
asm_no_coex
,
v3_spec
,
asm
_rtz_cvt
};
v3
_rtz_cvt
};
auto
fmha_args
=
[
&
]()
{
auto
fmha_args
=
[
&
]()
{
assert
(
nhead
%
nhead_k
==
0
);
assert
(
nhead
%
nhead_k
==
0
);
/// NOTE: we broadcast bias from [1, 1, seqlen_q, seqlen_k] to [batch, nhead, seqlen_q,
/// NOTE: we broadcast bias from [1, 1, seqlen_q, seqlen_k] to [batch, nhead, seqlen_q,
...
...
example/ck_tile/01_fmha/fmha_bwd.hpp
View file @
d4de8495
...
@@ -438,10 +438,10 @@ struct fmha_bwd_traits
...
@@ -438,10 +438,10 @@ struct fmha_bwd_traits
bool
has_dropout
;
bool
has_dropout
;
bool
is_store_randval
;
bool
is_store_randval
;
bool
is_deterministic
;
bool
is_deterministic
;
bool
uses_
ext_asm
;
bool
uses_
bwd_v3
;
bool
is_
asm
_atomic_fp32
;
bool
is_
v3
_atomic_fp32
;
bool
is_
asm_no_coex
;
bool
is_
v3_spec
;
bool
is_
asm
_rtz_cvt
;
bool
is_
v3
_rtz_cvt
;
// TODO: padding check is inside this api
// TODO: padding check is inside this api
};
};
float
fmha_bwd
(
fmha_bwd_traits
,
fmha_bwd_args
,
const
ck_tile
::
stream_config
&
);
float
fmha_bwd
(
fmha_bwd_traits
,
fmha_bwd_args
,
const
ck_tile
::
stream_config
&
);
example/ck_tile/01_fmha/hsaco/bwd_bf16_
nocoex
_a32.cpp
→
example/ck_tile/01_fmha/hsaco/bwd_bf16_
spec
_a32.cpp
View file @
d4de8495
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
#include "fmha_hsaco.hpp"
#include "fmha_hsaco.hpp"
unsigned
char
bwd_bf16_
nocoex
_a32
[]
=
{
unsigned
char
bwd_bf16_
spec
_a32
[]
=
{
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xB0
,
0x7D
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xB0
,
0x7D
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
...
...
example/ck_tile/01_fmha/hsaco/bwd_bf16_
nocoex
_causal_a32.cpp
→
example/ck_tile/01_fmha/hsaco/bwd_bf16_
spec
_causal_a32.cpp
View file @
d4de8495
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
#include "fmha_hsaco.hpp"
#include "fmha_hsaco.hpp"
unsigned
char
bwd_bf16_
nocoex
_causal_a32
[]
=
{
unsigned
char
bwd_bf16_
spec
_causal_a32
[]
=
{
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x08
,
0x85
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x08
,
0x85
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
...
...
example/ck_tile/01_fmha/hsaco/bwd_fp16_
nocoex
_a32.cpp
→
example/ck_tile/01_fmha/hsaco/bwd_fp16_
spec
_a32.cpp
View file @
d4de8495
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
#include "fmha_hsaco.hpp"
#include "fmha_hsaco.hpp"
unsigned
char
bwd_fp16_
nocoex
_a32
[]
=
{
unsigned
char
bwd_fp16_
spec
_a32
[]
=
{
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x98
,
0x5B
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x98
,
0x5B
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
...
...
example/ck_tile/01_fmha/hsaco/bwd_fp16_
nocoex
_causal_a32.cpp
→
example/ck_tile/01_fmha/hsaco/bwd_fp16_
spec
_causal_a32.cpp
View file @
d4de8495
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
#include "fmha_hsaco.hpp"
#include "fmha_hsaco.hpp"
unsigned
char
bwd_fp16_
nocoex
_causal_a32
[]
=
{
unsigned
char
bwd_fp16_
spec
_causal_a32
[]
=
{
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7F
,
0x45
,
0x4C
,
0x46
,
0x02
,
0x01
,
0x01
,
0x40
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0xE0
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xF0
,
0x62
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xF0
,
0x62
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
...
...
example/ck_tile/01_fmha/hsaco/fmha_hsaco.hpp
View file @
d4de8495
...
@@ -9,11 +9,11 @@ extern unsigned char bwd_bf16_a32[];
...
@@ -9,11 +9,11 @@ extern unsigned char bwd_bf16_a32[];
extern
unsigned
char
bwd_bf16_causal_a16
[];
extern
unsigned
char
bwd_bf16_causal_a16
[];
extern
unsigned
char
bwd_bf16_causal_a16_rtz
[];
extern
unsigned
char
bwd_bf16_causal_a16_rtz
[];
extern
unsigned
char
bwd_bf16_causal_a32
[];
extern
unsigned
char
bwd_bf16_causal_a32
[];
extern
unsigned
char
bwd_bf16_
nocoex
_a32
[];
extern
unsigned
char
bwd_bf16_
spec
_a32
[];
extern
unsigned
char
bwd_bf16_
nocoex
_causal_a32
[];
extern
unsigned
char
bwd_bf16_
spec
_causal_a32
[];
extern
unsigned
char
bwd_fp16_a16
[];
extern
unsigned
char
bwd_fp16_a16
[];
extern
unsigned
char
bwd_fp16_a32
[];
extern
unsigned
char
bwd_fp16_a32
[];
extern
unsigned
char
bwd_fp16_causal_a16
[];
extern
unsigned
char
bwd_fp16_causal_a16
[];
extern
unsigned
char
bwd_fp16_causal_a32
[];
extern
unsigned
char
bwd_fp16_causal_a32
[];
extern
unsigned
char
bwd_fp16_
nocoex
_a32
[];
extern
unsigned
char
bwd_fp16_
spec
_a32
[];
extern
unsigned
char
bwd_fp16_
nocoex
_causal_a32
[];
extern
unsigned
char
bwd_fp16_
spec
_causal_a32
[];
example/ck_tile/01_fmha/script/benchmark_bwd_ext.sh
View file @
d4de8495
...
@@ -9,23 +9,23 @@ for hdim in 128 ; do
...
@@ -9,23 +9,23 @@ for hdim in 128 ; do
nhead
=
$((
2048
/
$hdim
))
# follow fav2 setup
nhead
=
$((
2048
/
$hdim
))
# follow fav2 setup
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
32
-h
=
$nhead
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
16
-h
=
$nhead
-d
=
$hdim
-s
=
1024
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
8
-h
=
$nhead
-d
=
$hdim
-s
=
2048
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
4
-h
=
$nhead
-d
=
$hdim
-s
=
4096
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
2
-h
=
$nhead
-d
=
$hdim
-s
=
8192
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
$EXE
-prec
=
$prec
-b
=
1
-h
=
$nhead
-d
=
$hdim
-s
=
16384
-iperm
=
$perm
-operm
=
$perm
-kname
=
1
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-v
=
$VALID
;
sleep
3
done
done
done
done
...
...
example/ck_tile/01_fmha/script/smoke_test_bwd_ext.sh
View file @
d4de8495
...
@@ -11,12 +11,12 @@ set -x
...
@@ -11,12 +11,12 @@ set -x
for
prec
in
"fp16"
"bf16"
;
do
for
prec
in
"fp16"
"bf16"
;
do
for
perm
in
0 1
;
do
for
perm
in
0 1
;
do
for
hdim
in
128
;
do
for
hdim
in
128
;
do
for
asm
_atomic_fp32
in
0 1
;
do
for
v3
_atomic_fp32
in
0 1
;
do
for
asm_no_coex
in
0 1
;
do
for
v3_spec
in
0 1
;
do
for
mask
in
0 1
;
do
for
mask
in
0 1
;
do
$EXE
-prec
=
$prec
-b
=
4
-h
=
2
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
ext_asm
=
1
-
asm
_atomic_fp32
=
$
asm
_atomic_fp32
-
asm_no_coex
=
$asm_no_coex
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
4
-h
=
2
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
$
v3
_atomic_fp32
-
v3_spec
=
$v3_spec
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
1
-h
=
3
-d
=
$hdim
-s
=
768
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
ext_asm
=
1
-
asm
_atomic_fp32
=
$
asm
_atomic_fp32
-
asm_no_coex
=
$asm_no_coex
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
1
-h
=
3
-d
=
$hdim
-s
=
768
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
$
v3
_atomic_fp32
-
v3_spec
=
$v3_spec
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
done
done
done
done
...
...
example/ck_tile/01_fmha/script/smoke_test_bwd_xqa_ext.sh
View file @
d4de8495
...
@@ -13,8 +13,8 @@ for perm in 0 1 ; do
...
@@ -13,8 +13,8 @@ for perm in 0 1 ; do
for
hdim
in
128
;
do
for
hdim
in
128
;
do
for
mask
in
0 1
;
do
for
mask
in
0 1
;
do
$EXE
-prec
=
$prec
-b
=
2
-h
=
4
-h_k
=
2
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-
asm
_rtz_cvt
=
1
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
2
-h
=
4
-h_k
=
2
-d
=
$hdim
-s
=
512
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-
v3
_rtz_cvt
=
1
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
1
-h
=
3
-h_k
=
1
-d
=
$hdim
-s
=
768
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
ext_asm
=
1
-
asm
_atomic_fp32
=
0
-
asm
_rtz_cvt
=
1
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
$EXE
-prec
=
$prec
-b
=
1
-h
=
3
-h_k
=
1
-d
=
$hdim
-s
=
768
-iperm
=
$perm
-operm
=
$perm
-mask
=
$mask
-
bwd_v3
=
1
-
v3
_atomic_fp32
=
0
-
v3
_rtz_cvt
=
1
-mode
=
0
-kname
=
$KNAME
$COMMON_ARGS
done
done
done
done
...
...
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