mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Use a type alias for cuda errors.
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
use crate::{CpuStorage, DType, Result, Shape};
|
||||
use cudarc::driver::CudaSlice;
|
||||
|
||||
pub(crate) type Error = cudarc::driver::DriverError;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CudaDevice(std::sync::Arc<cudarc::driver::CudaDevice>);
|
||||
|
||||
|
@ -35,7 +35,7 @@ pub enum Error {
|
||||
},
|
||||
|
||||
#[error(transparent)]
|
||||
Cudarc(#[from] cudarc::driver::DriverError),
|
||||
Cudarc(#[from] crate::cuda_backend::Error),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
Reference in New Issue
Block a user