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
0da960f1
Unverified
Commit
0da960f1
authored
Mar 03, 2026
by
Ziqi Fan
Committed by
GitHub
Mar 03, 2026
Browse files
fix: pass in device_id to KVBM PinnedAllocator instead of hard code to 0 (#6809)
Signed-off-by:
Ziqi Fan
<
ziqif@nvidia.com
>
parent
e4601811
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
lib/llm/src/block_manager/distributed/worker.rs
lib/llm/src/block_manager/distributed/worker.rs
+2
-1
lib/llm/src/block_manager/storage/cuda.rs
lib/llm/src/block_manager/storage/cuda.rs
+6
-3
No files found.
lib/llm/src/block_manager/distributed/worker.rs
View file @
0da960f1
...
...
@@ -148,7 +148,8 @@ async fn perform_allocation_and_build_handler(
)
?
);
// host
let
host_blocks
=
if
leader_meta
.num_host_blocks
>
0
{
let
host_allocator
=
Arc
::
new
(
PinnedAllocator
::
default
());
let
host_allocator
=
Arc
::
new
(
PinnedAllocator
::
new
(
device_id
)
?
);
let
host_layout
=
layout_builder
.num_blocks
(
leader_meta
.num_host_blocks
)
.build
()
?
...
...
lib/llm/src/block_manager/storage/cuda.rs
View file @
0da960f1
...
...
@@ -332,10 +332,13 @@ impl Default for PinnedAllocator {
}
impl
PinnedAllocator
{
/// Create a new pinned allocator
pub
fn
new
()
->
Result
<
Self
,
StorageError
>
{
/// Create a new pinned allocator for the specified device.
///
/// The device_id determines which NUMA node pinned memory will be allocated
/// on when NUMA-aware allocation is enabled.
pub
fn
new
(
device_id
:
usize
)
->
Result
<
Self
,
StorageError
>
{
Ok
(
Self
{
ctx
:
Cuda
::
device_or_create
(
0
)
?
,
ctx
:
Cuda
::
device_or_create
(
device_id
)
?
,
})
}
}
...
...
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