Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
82e8ca03
Commit
82e8ca03
authored
May 21, 2025
by
zhangshao
Browse files
优化pa_opt的编译速度
parent
e02d110d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
csrc/attention/attention_kernels_opt.cu
csrc/attention/attention_kernels_opt.cu
+2
-2
csrc/attention/attention_with_mask_kernels_opt.cu
csrc/attention/attention_with_mask_kernels_opt.cu
+2
-2
No files found.
csrc/attention/attention_kernels_opt.cu
View file @
82e8ca03
...
...
@@ -861,7 +861,7 @@ void paged_attention_v1_launcher(
dim3
block
(
NUM_THREADS
);
const
at
::
hip
::
OptionalHIPGuardMasqueradingAsCUDA
device_guard
(
device_of
(
query
));
const
hipStream_t
stream
=
at
::
hip
::
getCurrentHIPStreamMasqueradingAsCUDA
();
LAUNCH_PAGED_ATTENTION_V1
(
HEAD_SIZE
);
if
constexpr
(
BLOCK_SIZE
==
16
&&
IS_BLOCK_SPARSE
==
false
&&
sizeof
(
T
)
==
2
){
LAUNCH_PAGED_ATTENTION_V1
(
HEAD_SIZE
);
}
});
});
});
...
...
@@ -1006,7 +1006,7 @@ void paged_attention_v2_launcher(
dim3
block
(
NUM_THREADS
);
const
at
::
hip
::
OptionalHIPGuardMasqueradingAsCUDA
device_guard
(
device_of
(
query
));
const
hipStream_t
stream
=
at
::
hip
::
getCurrentHIPStreamMasqueradingAsCUDA
();
LAUNCH_PAGED_ATTENTION_V2
(
HEAD_SIZE
);
if
constexpr
(
BLOCK_SIZE
==
16
&&
IS_BLOCK_SPARSE
==
false
&&
sizeof
(
T
)
==
2
){
LAUNCH_PAGED_ATTENTION_V2
(
HEAD_SIZE
);
}
});
});
});
...
...
csrc/attention/attention_with_mask_kernels_opt.cu
View file @
82e8ca03
...
...
@@ -883,7 +883,7 @@ void paged_attention_v1_launcher(
dim3
block
(
NUM_THREADS
);
const
at
::
hip
::
OptionalHIPGuardMasqueradingAsCUDA
device_guard
(
device_of
(
query
));
const
hipStream_t
stream
=
at
::
hip
::
getCurrentHIPStreamMasqueradingAsCUDA
();
LAUNCH_PAGED_ATTENTION_V1
(
HEAD_SIZE
);
if
constexpr
(
BLOCK_SIZE
==
16
&&
IS_BLOCK_SPARSE
==
false
&&
sizeof
(
T
)
==
2
){
LAUNCH_PAGED_ATTENTION_V1
(
HEAD_SIZE
);
}
});
});
});
...
...
@@ -1041,7 +1041,7 @@ void paged_attention_v2_launcher(
dim3
block
(
NUM_THREADS
);
const
at
::
hip
::
OptionalHIPGuardMasqueradingAsCUDA
device_guard
(
device_of
(
query
));
const
hipStream_t
stream
=
at
::
hip
::
getCurrentHIPStreamMasqueradingAsCUDA
();
LAUNCH_PAGED_ATTENTION_V2
(
HEAD_SIZE
);
if
constexpr
(
BLOCK_SIZE
==
16
&&
IS_BLOCK_SPARSE
==
false
&&
sizeof
(
T
)
==
2
){
LAUNCH_PAGED_ATTENTION_V2
(
HEAD_SIZE
);
}
});
});
});
...
...
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