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
908511b2
Commit
908511b2
authored
Jul 10, 2024
by
Tri Dao
Browse files
Split into more .cu files to speed up compilation
parent
1d536d7d
Changes
69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
235 additions
and
162 deletions
+235
-162
csrc/flash_attn/src/flash_fwd_hdim256_fp16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim256_fp16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim256_fp16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim256_fp16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim32_bf16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim32_bf16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim32_bf16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim32_bf16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim32_fp16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim32_fp16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim32_fp16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim32_fp16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim64_bf16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim64_bf16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim64_bf16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim64_bf16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim64_fp16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim64_fp16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim64_fp16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim64_fp16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim96_bf16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim96_bf16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim96_bf16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim96_bf16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_hdim96_fp16_causal_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim96_fp16_causal_sm80.cu
+10
-0
csrc/flash_attn/src/flash_fwd_hdim96_fp16_sm80.cu
csrc/flash_attn/src/flash_fwd_hdim96_fp16_sm80.cu
+2
-2
csrc/flash_attn/src/flash_fwd_launch_template.h
csrc/flash_attn/src/flash_fwd_launch_template.h
+128
-146
csrc/flash_attn/src/flash_fwd_split_hdim128_bf16_causal_sm80.cu
...lash_attn/src/flash_fwd_split_hdim128_bf16_causal_sm80.cu
+7
-0
csrc/flash_attn/src/flash_fwd_split_hdim128_bf16_sm80.cu
csrc/flash_attn/src/flash_fwd_split_hdim128_bf16_sm80.cu
+1
-1
csrc/flash_attn/src/flash_fwd_split_hdim128_fp16_causal_sm80.cu
...lash_attn/src/flash_fwd_split_hdim128_fp16_causal_sm80.cu
+7
-0
csrc/flash_attn/src/flash_fwd_split_hdim128_fp16_sm80.cu
csrc/flash_attn/src/flash_fwd_split_hdim128_fp16_sm80.cu
+1
-1
csrc/flash_attn/src/flash_fwd_split_hdim160_bf16_causal_sm80.cu
...lash_attn/src/flash_fwd_split_hdim160_bf16_causal_sm80.cu
+7
-0
No files found.
csrc/flash_attn/src/flash_fwd_hdim256_fp16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
256
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim256
<
cutlass
::
half_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim256_fp16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
256
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim256
<
cutlass
::
half_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
half_t
,
256
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim256
<
cutlass
::
half_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim32_bf16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
32
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
bfloat16_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim32_bf16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
32
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
bfloat16_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
32
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
bfloat16_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim32_fp16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
32
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
half_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim32_fp16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
32
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
half_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
half_t
,
32
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim32
<
cutlass
::
half_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim64_bf16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
64
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
bfloat16_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim64_bf16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
64
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
bfloat16_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
64
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
bfloat16_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim64_fp16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
64
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
half_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim64_fp16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
64
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
half_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
half_t
,
64
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim64
<
cutlass
::
half_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim96_bf16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
96
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
bfloat16_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim96_bf16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
96
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
bfloat16_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
bfloat16_t
,
96
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
bfloat16_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim96_fp16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
96
,
true
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
half_t
,
true
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_hdim96_fp16_sm80.cu
View file @
908511b2
...
...
@@ -5,6 +5,6 @@
#include "flash_fwd_launch_template.h"
template
<
>
void
run_mha_fwd_
<
cutlass
::
half_t
,
96
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
half_t
>
(
params
,
stream
);
void
run_mha_fwd_
<
cutlass
::
half_t
,
96
,
false
>
(
Flash_fwd_params
&
params
,
cudaStream_t
stream
)
{
run_mha_fwd_hdim96
<
cutlass
::
half_t
,
false
>
(
params
,
stream
);
}
csrc/flash_attn/src/flash_fwd_launch_template.h
View file @
908511b2
This diff is collapsed.
Click to expand it.
csrc/flash_attn/src/flash_fwd_split_hdim128_bf16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
bfloat16_t
,
128
,
true
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
csrc/flash_attn/src/flash_fwd_split_hdim128_bf16_sm80.cu
View file @
908511b2
...
...
@@ -4,4 +4,4 @@
#include "flash_fwd_launch_template.h"
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
bfloat16_t
,
128
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
bfloat16_t
,
128
,
false
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
csrc/flash_attn/src/flash_fwd_split_hdim128_fp16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
half_t
,
128
,
true
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
csrc/flash_attn/src/flash_fwd_split_hdim128_fp16_sm80.cu
View file @
908511b2
...
...
@@ -4,4 +4,4 @@
#include "flash_fwd_launch_template.h"
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
half_t
,
128
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
half_t
,
128
,
false
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
csrc/flash_attn/src/flash_fwd_split_hdim160_bf16_causal_sm80.cu
0 → 100644
View file @
908511b2
// Copyright (c) 2023, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template
void
run_mha_fwd_splitkv_dispatch
<
cutlass
::
bfloat16_t
,
160
,
true
>(
Flash_fwd_params
&
params
,
cudaStream_t
stream
);
Prev
1
2
3
4
Next
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