Skip to content

Conversation

@Kang-Meng
Copy link
Collaborator

No description provided.

@Kang-Meng Kang-Meng force-pushed the feat_async_copy branch 3 times, most recently from 17797ce to 034f86e Compare November 5, 2025 10:13
@Kang-Meng Kang-Meng force-pushed the feat_async_copy branch 2 times, most recently from 7cd5bd4 to d4446aa Compare November 6, 2025 06:46
RobbieLeung
RobbieLeung previously approved these changes Nov 6, 2025
Copy link
Collaborator

@RobbieLeung RobbieLeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kang-Meng Kang-Meng force-pushed the feat_async_copy branch 5 times, most recently from 90457da to b996af0 Compare November 8, 2025 12:40
"",
"The address of the kv cache store metadata service.");

DEFINE_string(store_local_hostname,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the different between store_metadata_server and store_local_hostname.

}
}
if (is_completed) {
close_future.wait();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If is_completed was set to false above, does that mean we no longer need to wait() on close_future here?
how brpc to handle stream_handler in this case

And by the way, how can we ensure that multiple batches are delivered in order or received in order?

int Stream::synchronize() const {
#if defined(USE_NPU)
return aclrtSynchronizeStream(stream_.stream());
return aclrtSynchronizeStreamWithTimeout(stream_.stream(), timeout_);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which case we need timeout? and what happen if timeout.

std::move(copy_out_blocks_async(input.input_params)));
{
std::lock_guard<std::mutex> lock(mutex_);
if (layer_wise_load_synchronizer_.count(input.input_params.batch_id) !=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we dont use lock here ? just a suggestion

@Kang-Meng Kang-Meng force-pushed the feat_async_copy branch 5 times, most recently from 629d719 to 1c0f9a2 Compare November 12, 2025 08:13
@magicheng0816 magicheng0816 self-requested a review November 12, 2025 08:26
std::vector<BlockTransferInfo> block_transfer_info;
proto_to_block_transfer_info(*req, block_transfer_info);

copy_threadpool_.schedule(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor to bthread

proto_to_block_transfer_info(*req, block_transfer_info);

auto future = worker_->load_kv_blocks_from_store_async(dst_blocks);
BThreadPool::get_instance().schedule(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need BThreadPool here, just bthread_start_background, bthread.join

walsonyang
walsonyang previously approved these changes Nov 13, 2025
Copy link
Collaborator

@walsonyang walsonyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

walsonyang
walsonyang previously approved these changes Nov 13, 2025
Copy link
Collaborator

@walsonyang walsonyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kang-Meng Kang-Meng force-pushed the feat_async_copy branch 2 times, most recently from 88b12ae to b9cc794 Compare November 14, 2025 05:57
walsonyang
walsonyang previously approved these changes Nov 14, 2025
yq33victor
yq33victor previously approved these changes Nov 17, 2025
@Kang-Meng Kang-Meng merged commit ce7a10a into jd-opensource:main Nov 17, 2025
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants