feat: allow set num_replicas_per_device for CUDA to increase throughput
parent
375675c6b4
commit
1afba47059
|
|
@ -244,10 +244,6 @@ fn fallback() -> routing::MethodRouter {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn valid_args(args: &ServeArgs) {
|
fn valid_args(args: &ServeArgs) {
|
||||||
if args.device == Device::Cuda && args.num_replicas_per_device != 1 {
|
|
||||||
fatal!("CUDA device only supports 1 replicas per device");
|
|
||||||
}
|
|
||||||
|
|
||||||
if args.device == Device::Cpu && (args.device_indices.len() != 1 || args.device_indices[0] != 0)
|
if args.device == Device::Cpu && (args.device_indices.len() != 1 || args.device_indices[0] != 0)
|
||||||
{
|
{
|
||||||
fatal!("CPU device only supports device indices = [0]");
|
fatal!("CPU device only supports device indices = [0]");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue