Add support for cuda streams. (#2532)

This commit is contained in:
Laurent Mazare
2024-10-02 21:30:58 +02:00
committed by GitHub
parent 936300678d
commit 7b60bda4ed
3 changed files with 24 additions and 0 deletions

View File

@ -130,6 +130,10 @@ impl Device {
Ok(Self::Cuda(crate::CudaDevice::new(ordinal)?))
}
pub fn new_cuda_with_stream(ordinal: usize) -> Result<Self> {
Ok(Self::Cuda(crate::CudaDevice::new_with_stream(ordinal)?))
}
pub fn new_metal(ordinal: usize) -> Result<Self> {
Ok(Self::Metal(crate::MetalDevice::new(ordinal)?))
}