mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 03:28:50 +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 crate::{CpuStorage, DType, Result, Shape};
|
||||||
use cudarc::driver::CudaSlice;
|
use cudarc::driver::CudaSlice;
|
||||||
|
|
||||||
|
pub(crate) type Error = cudarc::driver::DriverError;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct CudaDevice(std::sync::Arc<cudarc::driver::CudaDevice>);
|
pub struct CudaDevice(std::sync::Arc<cudarc::driver::CudaDevice>);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ pub enum Error {
|
|||||||
},
|
},
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Cudarc(#[from] cudarc::driver::DriverError),
|
Cudarc(#[from] crate::cuda_backend::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
Reference in New Issue
Block a user