-
Notifications
You must be signed in to change notification settings - Fork 596
[GCU] Enable gcu CI #3190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GCU] Enable gcu CI #3190
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,7 +295,7 @@ def get_attr_from_request(request, attr, default_value=None): | |
|
||
if self.speculative_method in ["mtp"]: | ||
self.proposer.insert_prefill_inputs(req_dicts) | ||
self.share_inputs["seq_lens_this_time"] = self.seq_lens_this_time_buffer[:num_running_requests] | ||
self.share_inputs["seq_lens_this_time"] = self.seq_lens_this_time_buffer | ||
|
||
def _dummy_prefill_inputs(self, num_tokens: int, batch_size: int, expected_decode_len: int): | ||
"""Set dummy prefill inputs to share_inputs""" | ||
|
@@ -675,7 +675,7 @@ def initialize_attn_backend(self) -> None: | |
) | ||
self.share_inputs["decoder_batch_ids"] = paddle.full([int(decode_max_tile_size)], 0, dtype="int32") | ||
self.share_inputs["decoder_tile_ids_per_batch"] = paddle.full([int(decode_max_tile_size)], 0, dtype="int32") | ||
self.share_inputs["decoder_num_blocks_cpu"] = paddle.full([1], 0, dtype="int32").pin_memory() | ||
self.share_inputs["decoder_num_blocks_cpu"] = paddle.full([1], 0, dtype="int32").cpu() | ||
self.share_inputs["max_len_tensor_cpu"] = paddle.full([8], 0, dtype="int32").cpu() | ||
|
||
# Get the attention backend | ||
|
@@ -1062,9 +1062,7 @@ class at the server level, which is too granular for ModelRunner. | |
|
||
self._update_chunked_prefill(model_forward_batch) | ||
self._add_cache(model_forward_batch) | ||
self.seq_lens_this_time_buffer[:num_running_requests].copy_( | ||
self.share_inputs["seq_lens_this_time"][:num_running_requests], False | ||
) | ||
self.seq_lens_this_time_buffer.copy_(self.share_inputs["seq_lens_this_time"], False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这一块改动的原因是啥? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
return None | ||
|
||
def _add_cache(self, model_forward_batch) -> None: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么直接删掉了,删掉后变成一个gpu tensor 了。不使用pinned memory 的话也应该加上.cpu() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 tensor 最终会在 get_block_shape_and_split_kv_block kernel 中被用到
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done