Skip to content

Commit 446d16d

Browse files
authored
Merge pull request #118 from danbev/with_main_gpu
add with_main_gpu to LlamaModelParams
2 parents 52687ca + dd264e7 commit 446d16d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llama-cpp-2/src/model/params.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ impl LlamaModelParams {
5656
self
5757
}
5858

59+
/// sets the main GPU
60+
#[must_use]
61+
pub fn with_main_gpu(mut self, main_gpu: i32) -> Self {
62+
self.params.main_gpu = main_gpu;
63+
self
64+
}
65+
5966
/// sets `vocab_only`
6067
#[must_use]
6168
pub fn with_vocab_only(mut self, vocab_only: bool) -> Self {

0 commit comments

Comments
 (0)