mirror of
https://github.com/TabbyML/tabby
synced 2024-11-22 00:08:06 +00:00
feature(tabby): automatically use the appropriate device based on the features
This commit is contained in:
parent
7a95cf671e
commit
6b296b1535
@ -97,7 +97,11 @@ pub struct ServeArgs {
|
||||
port: u16,
|
||||
|
||||
/// Device to run model inference.
|
||||
#[clap(long, default_value_t=Device::Cpu)]
|
||||
#[cfg_attr(feature = "vulkan", clap(long, default_value_t = Device::Vulkan))]
|
||||
#[cfg_attr(feature = "metal", clap(long, default_value_t = Device::Metal))]
|
||||
#[cfg_attr(feature = "cuda", clap(long, default_value_t = Device::Cuda))]
|
||||
#[cfg_attr(feature = "rocm", clap(long, default_value_t = Device::Rocm))]
|
||||
#[cfg_attr(not(any(feature = "vulkan", feature = "metal", feature = "cuda", feature = "rocm")), clap(long, default_value_t = Device::Cpu))]
|
||||
device: Device,
|
||||
|
||||
/// Device to run chat model [default equals --device arg]
|
||||
|
Loading…
Reference in New Issue
Block a user