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
000b67f5
Commit
000b67f5
authored
Jan 22, 2024
by
Tri Dao
Browse files
Use int64_t instead of uint32_t for index_t
parent
e43a4cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
csrc/flash_attn/src/flash.h
csrc/flash_attn/src/flash.h
+2
-2
No files found.
csrc/flash_attn/src/flash.h
View file @
000b67f5
...
@@ -22,7 +22,7 @@ constexpr int D_DIM = 2;
...
@@ -22,7 +22,7 @@ constexpr int D_DIM = 2;
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
struct
Qkv_params
{
struct
Qkv_params
{
using
index_t
=
u
int
32
_t
;
using
index_t
=
int
64
_t
;
// The QKV matrices.
// The QKV matrices.
void
*
__restrict__
q_ptr
;
void
*
__restrict__
q_ptr
;
void
*
__restrict__
k_ptr
;
void
*
__restrict__
k_ptr
;
...
@@ -99,7 +99,7 @@ struct Flash_fwd_params : public Qkv_params {
...
@@ -99,7 +99,7 @@ struct Flash_fwd_params : public Qkv_params {
void
*
__restrict__
rotary_sin_ptr
;
void
*
__restrict__
rotary_sin_ptr
;
// The indices to index into the KV cache.
// The indices to index into the KV cache.
int
*
__restrict__
cache_batch_idx
;
int
*
__restrict__
cache_batch_idx
;
// The dropout probability (probability of keeping an activation).
// The dropout probability (probability of keeping an activation).
float
p_dropout
;
float
p_dropout
;
...
...
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