Skip to content

Commit 3ac5926

Browse files
authored
fix pp problem and remove err logs when duplicate create (#191)
1 parent 406c548 commit 3ac5926

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

ucm/csrc/ucmnfsstore/cc/api/ucmnfsstore/ucmnfsstore.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int32_t Setup(const SetupParam& param)
6767
int32_t Alloc(const std::string& blockId)
6868
{
6969
auto s = Singleton<SpaceManager>::Instance()->NewBlock(blockId);
70-
if (s.Failure()) {
70+
if (s.Failure() && s != Status::DuplicateKey()) {
7171
UC_ERROR("Failed to allocate kv cache block space, block id: {}, error code: {}.", blockId, s.Underlying());
7272
}
7373
return s.Underlying();

ucm/csrc/ucmnfsstore/cc/domain/space/space_manager.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ Status SpaceManager::NewBlock(const std::string& blockId) const
6060
}
6161
status = file->Open(IFile::OpenFlag::CREATE | IFile::OpenFlag::EXCL | IFile::OpenFlag::READ_WRITE);
6262
if (status.Failure()) {
63-
UC_ERROR("Failed({}) to new block({}).", status, blockId);
63+
if (status != Status::DuplicateKey()) {
64+
UC_ERROR("Failed({}) to new block({}).", status, blockId);
65+
}
6466
return status;
6567
}
6668
status = file->Truncate(this->_blockSize);

ucm/csrc/ucmnfsstore/cc/infra/file/posix_file.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ Status PosixFile::Open(const uint32_t flags)
9898
auto status = this->_handle >= 0 ? Status::OK() : Status::OsApiError();
9999
if (status.Failure()) {
100100
if (eno == EEXIST) { status = Status::DuplicateKey(); }
101-
UC_ERROR("Failed({},{}) to open file({}) with flags({}).", eno, status, this->Path(), flags);
101+
if (status != Status::DuplicateKey()) {
102+
UC_ERROR("Failed({},{}) to open file({}) with flags({}).", eno, status, this->Path(), flags);
103+
}
102104
}
103105
return status;
104106
}

ucm/integration/vllm/uc_connector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def _initialize_dataoffset(self, vllm_config: "VllmConfig"):
174174
# layer_id -> rank -> k_offset
175175
self.k_data_offsets: dict[int, dict[int, int]] = {}
176176

177-
for layer_id in range(self.num_layers):
177+
pp_size = vllm_config.parallel_config.pipeline_parallel_size
178+
for layer_id in range(self.num_layers * pp_size):
178179
self.k_data_offsets[layer_id] = {}
179180
for rank in range(self.total_tp_size):
180181
if self.is_mla:

0 commit comments

Comments
 (0)