merge metal features

This commit is contained in:
jhqxxx
2026-01-07 23:04:00 +08:00
parent dd70fa8f63
commit d7df9afb70
4 changed files with 191 additions and 3 deletions
+5 -1
View File
@@ -27,7 +27,11 @@ pub fn get_device(device: Option<&Device>) -> Device {
{
Device::new_cuda(0).unwrap_or(Device::Cpu)
}
#[cfg(not(feature = "cuda"))]
#[cfg(all(not(feature = "cuda"), feature = "metal"))]
{
Device::new_metal(0).unwrap_or(Device::Cpu)
}
#[cfg(all(not(feature = "cuda"), not(feature = "metal")))]
{
Device::Cpu
}