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
flash-attention
Commits
be1afaa2
"...include/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "76f7ae49f71eb0892c0d531a275c371e3ef61e56"
Commit
be1afaa2
authored
Jan 03, 2023
by
Tri Dao
Browse files
[Gen, FT] Use fp32 accum for FMA
parent
f266fc72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
22 deletions
+1
-22
csrc/ft_attention/decoder_masked_multihead_attention_template.hpp
...attention/decoder_masked_multihead_attention_template.hpp
+1
-22
No files found.
csrc/ft_attention/decoder_masked_multihead_attention_template.hpp
View file @
be1afaa2
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
// Below are knobs to extend FP32 accumulation for higher FP16 accuracy
// Below are knobs to extend FP32 accumulation for higher FP16 accuracy
// Does not seem to affect the accuracy that much
// Does not seem to affect the accuracy that much
//
#define MMHA_USE_FP32_ACUM_FOR_FMA
#define MMHA_USE_FP32_ACUM_FOR_FMA
// Seems to slightly improve the accuracy
// Seems to slightly improve the accuracy
#define MMHA_USE_FP32_ACUM_FOR_OUT
#define MMHA_USE_FP32_ACUM_FOR_OUT
...
@@ -271,27 +271,6 @@ struct Qk_vec_acum_fp32_<bf16_8_t> {
...
@@ -271,27 +271,6 @@ struct Qk_vec_acum_fp32_<bf16_8_t> {
using
Type
=
Float8_
;
using
Type
=
Float8_
;
};
};
template
<
>
struct
Qk_vec_acum_fp32_
<
uint4
>
{
using
Type
=
Float8_
;
};
template
<
>
struct
Qk_vec_acum_fp32_
<
__nv_bfloat16
>
{
using
Type
=
float
;
};
template
<
>
struct
Qk_vec_acum_fp32_
<
__nv_bfloat162
>
{
using
Type
=
float2
;
};
template
<
>
struct
Qk_vec_acum_fp32_
<
bf16_4_t
>
{
using
Type
=
Float4_
;
};
template
<
>
struct
Qk_vec_acum_fp32_
<
bf16_8_t
>
{
using
Type
=
Float8_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
T
>
template
<
typename
T
>
...
...
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