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
dynamo
Commits
1972f71f
Unverified
Commit
1972f71f
authored
Oct 16, 2025
by
Olga Andreeva
Committed by
GitHub
Oct 16, 2025
Browse files
fix: handling 0 block transfer (#3613)
Signed-off-by:
Olga Andreeva
<
oandreeva@nvidia.com
>
parent
7aa8e0e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
lib/llm/src/block_manager/block/data/logical/distributed_leader_worker.rs
...k_manager/block/data/logical/distributed_leader_worker.rs
+14
-0
lib/llm/src/block_manager/block/locality.rs
lib/llm/src/block_manager/block/locality.rs
+14
-0
lib/llm/src/block_manager/block/transfer.rs
lib/llm/src/block_manager/block/transfer.rs
+14
-0
No files found.
lib/llm/src/block_manager/block/data/logical/distributed_leader_worker.rs
View file @
1972f71f
...
...
@@ -100,6 +100,20 @@ impl LogicalResources for DistributedLeaderWorkerResources {
RB
:
BlockDataProvider
<
Locality
=
Logical
<
Self
>>
,
WB
:
WritableBlock
+
BlockDataProviderMut
<
Locality
=
Logical
<
Self
>>
,
{
// Check for empty slices and length mismatch early
if
sources
.is_empty
()
&&
targets
.is_empty
()
{
tracing
::
warn!
(
"DistributedLeaderWorkerResources::handle_transfer called with both sources and targets empty, skipping transfer"
);
let
(
tx
,
rx
)
=
oneshot
::
channel
();
tx
.send
(())
.unwrap
();
return
Ok
(
rx
);
}
if
sources
.len
()
!=
targets
.len
()
{
return
Err
(
TransferError
::
CountMismatch
(
sources
.len
(),
targets
.len
()));
}
if
let
Some
(
transfer_tx
)
=
&
self
.transfer_tx
{
let
source_pool
=
Self
::
get_pool
(
sources
[
0
]
.block_data
());
let
target_pool
=
Self
::
get_pool
(
targets
[
0
]
.block_data
());
...
...
lib/llm/src/block_manager/block/locality.rs
View file @
1972f71f
...
...
@@ -125,6 +125,20 @@ impl<R: LogicalResources> LocalityProvider for Logical<R> {
RB
:
BlockDataProvider
<
Locality
=
Self
>
,
WB
:
WritableBlock
+
BlockDataProviderMut
<
Locality
=
Self
>
,
{
// Check for empty slices and length mismatch early
if
sources
.is_empty
()
&&
targets
.is_empty
()
{
tracing
::
warn!
(
"Logical::handle_transfer called with both sources and targets empty, skipping transfer"
);
let
(
tx
,
rx
)
=
oneshot
::
channel
();
tx
.send
(())
.unwrap
();
return
Ok
(
rx
);
}
if
sources
.len
()
!=
targets
.len
()
{
return
Err
(
TransferError
::
CountMismatch
(
sources
.len
(),
targets
.len
()));
}
let
source_resources
=
Self
::
load_resources
(
sources
);
let
target_resources
=
Self
::
load_resources_mut
(
targets
);
...
...
lib/llm/src/block_manager/block/transfer.rs
View file @
1972f71f
...
...
@@ -179,6 +179,20 @@ where
<
RB
as
StorageTypeProvider
>
::
StorageType
:
NixlDescriptor
,
<
WB
as
StorageTypeProvider
>
::
StorageType
:
NixlDescriptor
,
{
// Check for empty slices and length mismatch early
if
sources
.is_empty
()
&&
targets
.is_empty
()
{
tracing
::
warn!
(
"handle_local_transfer called with both sources and targets empty, skipping transfer"
);
let
(
tx
,
rx
)
=
oneshot
::
channel
();
tx
.send
(())
.unwrap
();
return
Ok
(
rx
);
}
if
sources
.len
()
!=
targets
.len
()
{
return
Err
(
TransferError
::
CountMismatch
(
sources
.len
(),
targets
.len
()));
}
let
(
tx
,
rx
)
=
oneshot
::
channel
();
match
RB
::
write_to_strategy
()
{
...
...
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