@@ -20,8 +20,8 @@ use llama_cpp_2::ggml_time_us;
20
20
use llama_cpp_2:: llama_backend:: LlamaBackend ;
21
21
use llama_cpp_2:: llama_batch:: LlamaBatch ;
22
22
use llama_cpp_2:: model:: params:: LlamaModelParams ;
23
- use llama_cpp_2:: model:: { AddBos , Special } ;
24
23
use llama_cpp_2:: model:: LlamaModel ;
24
+ use llama_cpp_2:: model:: { AddBos , Special } ;
25
25
26
26
#[ derive( clap:: Parser , Debug , Clone ) ]
27
27
struct Args {
@@ -35,7 +35,7 @@ struct Args {
35
35
#[ clap( short) ]
36
36
normalise : bool ,
37
37
/// Disable offloading layers to the gpu
38
- #[ cfg( feature = "cublas " ) ]
38
+ #[ cfg( feature = "cuda " ) ]
39
39
#[ clap( long) ]
40
40
disable_gpu : bool ,
41
41
}
@@ -78,7 +78,7 @@ fn main() -> Result<()> {
78
78
model,
79
79
prompt,
80
80
normalise,
81
- #[ cfg( feature = "cublas " ) ]
81
+ #[ cfg( feature = "cuda " ) ]
82
82
disable_gpu,
83
83
} = Args :: parse ( ) ;
84
84
@@ -87,13 +87,13 @@ fn main() -> Result<()> {
87
87
88
88
// offload all layers to the gpu
89
89
let model_params = {
90
- #[ cfg( feature = "cublas " ) ]
90
+ #[ cfg( feature = "cuda " ) ]
91
91
if !disable_gpu {
92
92
LlamaModelParams :: default ( ) . with_n_gpu_layers ( 1000 )
93
93
} else {
94
94
LlamaModelParams :: default ( )
95
95
}
96
- #[ cfg( not( feature = "cublas " ) ) ]
96
+ #[ cfg( not( feature = "cuda " ) ) ]
97
97
LlamaModelParams :: default ( )
98
98
} ;
99
99
0 commit comments