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
a210efa6
"lib/vscode:/vscode.git/clone" did not exist on "7b941d7e29fbca99189ff73d8846cf7d5edc4024"
Unverified
Commit
a210efa6
authored
Apr 08, 2026
by
ishandhanani
Committed by
GitHub
Apr 08, 2026
Browse files
fix: dp_rank always 0 in non-KV router mode (#7984)
parent
56f87797
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
lib/bindings/c/src/lib.rs
lib/bindings/c/src/lib.rs
+3
-1
lib/llm/src/kv_router/prefill_router/execution.rs
lib/llm/src/kv_router/prefill_router/execution.rs
+6
-7
lib/llm/src/kv_router/prefill_router/mod.rs
lib/llm/src/kv_router/prefill_router/mod.rs
+1
-1
lib/llm/src/kv_router/prefill_router/types.rs
lib/llm/src/kv_router/prefill_router/types.rs
+1
-1
No files found.
lib/bindings/c/src/lib.rs
View file @
a210efa6
...
...
@@ -455,7 +455,7 @@ impl RouterHandles {
lora_name
:
Option
<
String
>
,
priority_jump
:
f64
,
allowed_worker_ids
:
Option
<
HashSet
<
WorkerId
>>
,
)
->
Result
<
(
u64
,
u32
),
QueryRouterResult
>
{
)
->
Result
<
(
u64
,
Option
<
u32
>
),
QueryRouterResult
>
{
if
let
Some
(
ref
ids
)
=
allowed_worker_ids
{
self
.prefill_router
.register_workers
(
ids
);
}
...
...
@@ -1214,6 +1214,8 @@ pub unsafe extern "C" fn route_prefill_request(
.query_prefill_worker
(
&
tokens
,
None
,
false
,
None
,
0.0
,
allowed_worker_ids
)
.await
?
;
let
prefill_dp_rank
=
prefill_dp_rank
.unwrap_or
(
u32
::
MAX
);
tracing
::
info!
(
prefill_worker_id
=
prefill_worker_id
,
prefill_dp_rank
=
prefill_dp_rank
,
...
...
lib/llm/src/kv_router/prefill_router/execution.rs
View file @
a210efa6
...
...
@@ -43,11 +43,10 @@ impl PrefillRouter {
let
dp_rank
=
req
.routing
.as_ref
()
.and_then
(|
r
|
r
.prefill_dp_rank
.or
(
r
.dp_rank
))
.unwrap_or
(
0
);
.and_then
(|
r
|
r
.prefill_dp_rank
.or
(
r
.dp_rank
));
tracing
::
debug!
(
worker_id
=
id
,
dp_rank
=
dp_rank
,
dp_rank
=
?
dp_rank
,
"Using pre-selected prefill worker for bootstrap"
);
(
id
,
dp_rank
)
...
...
@@ -99,7 +98,7 @@ impl PrefillRouter {
tracing
::
debug!
(
worker_id
=
worker_id
,
dp_rank
=
dp_rank
,
dp_rank
=
?
dp_rank
,
bootstrap_host
=
%
host
,
bootstrap_port
=
port
,
bootstrap_room
=
bootstrap_room
,
...
...
@@ -266,7 +265,7 @@ impl PrefillRouter {
lora_name
:
Option
<
String
>
,
priority_jump
:
f64
,
allowed_worker_ids
:
Option
<
HashSet
<
WorkerId
>>
,
)
->
Result
<
(
u64
,
u32
)
>
{
)
->
Result
<
(
u64
,
Option
<
u32
>
)
>
{
let
prefill_router
=
self
.prefill_router
.get
()
...
...
@@ -288,7 +287,7 @@ impl PrefillRouter {
allowed_worker_ids
,
)
.await
?
;
Ok
((
worker
.worker_id
,
worker
.dp_rank
))
Ok
((
worker
.worker_id
,
Some
(
worker
.dp_rank
))
)
}
InnerPrefillRouter
::
SimpleRouter
(
r
)
=>
{
let
worker_id
=
if
update_states
{
...
...
@@ -297,7 +296,7 @@ impl PrefillRouter {
r
.peek_next_worker
()
}
.ok_or_else
(||
anyhow
::
anyhow!
(
"No workers available for prefill"
))
?
;
Ok
((
worker_id
,
0
))
Ok
((
worker_id
,
None
))
}
}
}
...
...
lib/llm/src/kv_router/prefill_router/mod.rs
View file @
a210efa6
...
...
@@ -141,7 +141,7 @@ impl
let
routing
=
prefill_req
.routing_mut
();
routing
.prefill_worker_id
=
Some
(
worker_id
);
routing
.dp_rank
=
Some
(
dp_rank
)
;
routing
.dp_rank
=
dp_rank
;
prefill_req
.bootstrap_info
=
Some
(
bootstrap_info
.clone
());
let
prefill_context
=
...
...
lib/llm/src/kv_router/prefill_router/types.rs
View file @
a210efa6
...
...
@@ -36,7 +36,7 @@ pub(super) enum PrefillOutcome {
pub
(
super
)
enum
PrefillResolveDecision
{
Resolved
{
worker_id
:
u64
,
dp_rank
:
u32
,
dp_rank
:
Option
<
u32
>
,
bootstrap_info
:
BootstrapInfo
,
},
Unavailable
,
...
...
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