Skip to content

[Feat] AsuClient modifies the process of registration - #1135

Open
Fengli5355 wants to merge 2 commits into
ModelEngine-Group:feature_26h1from
Fengli5355:br_BindMem
Open

[Feat] AsuClient modifies the process of registration#1135
Fengli5355 wants to merge 2 commits into
ModelEngine-Group:feature_26h1from
Fengli5355:br_BindMem

Conversation

@Fengli5355

@Fengli5355 Fengli5355 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

Adapt AsuClient to senarios where there are multiple ASUs.
For temprary implementation, the very first transport (ASU) does the actual registering and unregistering; the followers does binding and unbinding to avoid redundant operations.
In the future, we plan to remove the owner transport and let Client chooses which transport does the action of reg and unreg. This needs several modifications or refactors in AIV / AICPU TransProvider.

Modifications

  1. In commit 28b3fc4, asu_port is modified from an integer to a vector.
  2. In commit e90178e, we add Bind and Unbind interface in Client, Transport, and TransProvider which is currently placeholder to be discussed.

Test

Only for discussion in this stage.

MRHandle mrHandle;
};

virtual std::vector<Status> UnbindMemory(const std::vector<UnbindMemoryDesc>& memoryDescs) = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can pass the mrHandle directly here; there is no need to use UnbindMemoryDesc.

"asuId=" + std::to_string(id));
}
} else {
auto status = iter->second->UnregisterRegions(handles);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When a follower unbind fails, finalStatus is already non-OK, but the owner is still unregistered; since the cache is not removed afterward, registeredResources_ retains a handle that is no longer valid on the owner.

Comment thread ucm/transport/kv/asu/client/src/asu_client_impl.cpp
std::lock_guard<std::mutex> lock(registeredRegionsMu_);
std::vector<MRHandle> boundHandles;
boundHandles.reserve(boundRegisteredRegionHandles_.size());
for (const auto& item : boundRegisteredRegionHandles_) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

boundRegisteredRegionHandles_ duplicates information already stored in registeredRegions_: the bound local handle is available as registeredRegions_[ownerHandle].handle.

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.

3 participants