mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-09 19:34:53 +00:00
fmt
This commit is contained in:
parent
e4142e4fd5
commit
0d8b30d19a
@ -115,7 +115,8 @@ fn main() -> ExitCode {
|
||||
None => {
|
||||
// try to default to the number of available GPUs
|
||||
tracing::info!("Parsing num_shard from CUDA_VISIBLE_DEVICES");
|
||||
let cuda_visible_devices = env::var("CUDA_VISIBLE_DEVICES").expect("--num-shard and CUDA_VISIBLE_DEVICES are not set");
|
||||
let cuda_visible_devices = env::var("CUDA_VISIBLE_DEVICES")
|
||||
.expect("--num-shard and CUDA_VISIBLE_DEVICES are not set");
|
||||
let n_devices = cuda_visible_devices.split(",").count();
|
||||
if n_devices <= 1 {
|
||||
panic!("`sharded` is true but only found {n_devices} CUDA devices");
|
||||
|
Loading…
Reference in New Issue
Block a user