@@ -15,8 +15,8 @@ use llama_cpp_2::llama_backend::LlamaBackend;
1515use llama_cpp_2:: llama_batch:: LlamaBatch ;
1616use llama_cpp_2:: model:: params:: kv_overrides:: ParamOverrideValue ;
1717use llama_cpp_2:: model:: params:: LlamaModelParams ;
18- use llama_cpp_2:: model:: { AddBos , Special } ;
1918use llama_cpp_2:: model:: LlamaModel ;
19+ use llama_cpp_2:: model:: { AddBos , Special } ;
2020use llama_cpp_2:: token:: data_array:: LlamaTokenDataArray ;
2121use std:: ffi:: CString ;
2222use std:: io:: Write ;
@@ -44,7 +44,7 @@ struct Args {
4444 #[ arg( short = 'o' , value_parser = parse_key_val) ]
4545 key_value_overrides : Vec < ( String , ParamOverrideValue ) > ,
4646 /// Disable offloading layers to the gpu
47- #[ cfg( feature = "cublas " ) ]
47+ #[ cfg( feature = "cuda " ) ]
4848 #[ clap( long) ]
4949 disable_gpu : bool ,
5050 #[ arg( short = 's' , long, help = "RNG seed (default: 1234)" ) ]
@@ -123,7 +123,7 @@ fn main() -> Result<()> {
123123 model,
124124 prompt,
125125 file,
126- #[ cfg( feature = "cublas " ) ]
126+ #[ cfg( feature = "cuda " ) ]
127127 disable_gpu,
128128 key_value_overrides,
129129 seed,
@@ -137,13 +137,13 @@ fn main() -> Result<()> {
137137
138138 // offload all layers to the gpu
139139 let model_params = {
140- #[ cfg( feature = "cublas " ) ]
140+ #[ cfg( feature = "cuda " ) ]
141141 if !disable_gpu {
142142 LlamaModelParams :: default ( ) . with_n_gpu_layers ( 1000 )
143143 } else {
144144 LlamaModelParams :: default ( )
145145 }
146- #[ cfg( not( feature = "cublas " ) ) ]
146+ #[ cfg( not( feature = "cuda " ) ) ]
147147 LlamaModelParams :: default ( )
148148 } ;
149149
0 commit comments