File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1363,12 +1363,12 @@ bool consume_common_train_arg(
1363
1363
*invalid_param = true ;
1364
1364
return true ;
1365
1365
}
1366
- # ifdef LLAMA_SUPPORTS_GPU_OFFLOAD
1367
- params->n_gpu_layers = std::stoi (argv[i]);
1368
- # else
1369
- fprintf (stderr, " warning: not compiled with GPU offload support, --n-gpu-layers option will be ignored\n " );
1370
- fprintf (stderr, " warning: see main README.md for information on enabling GPU BLAS support\n " );
1371
- # endif
1366
+ if ( llama_supports_gpu_offload ()) {
1367
+ params->n_gpu_layers = std::stoi (argv[i]);
1368
+ } else {
1369
+ fprintf (stderr, " warning: not compiled with GPU offload support, --n-gpu-layers option will be ignored\n " );
1370
+ fprintf (stderr, " warning: see main README.md for information on enabling GPU BLAS support\n " );
1371
+ }
1372
1372
} else if (arg == " -h" || arg == " --help" ) {
1373
1373
params->print_usage = true ;
1374
1374
return true ;
You can’t perform that action at this time.
0 commit comments