mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +00:00
Start adding support for cuda.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use crate::{DType, Device, Shape};
|
||||
use crate::{DType, DeviceLocation, Shape};
|
||||
|
||||
/// Main library error type.
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
@ -15,8 +15,8 @@ pub enum Error {
|
||||
|
||||
#[error("device mismatch in {op}, lhs: {lhs:?}, rhs: {rhs:?}")]
|
||||
DeviceMismatchBinaryOp {
|
||||
lhs: Device,
|
||||
rhs: Device,
|
||||
lhs: DeviceLocation,
|
||||
rhs: DeviceLocation,
|
||||
op: &'static str,
|
||||
},
|
||||
|
||||
@ -33,6 +33,9 @@ pub enum Error {
|
||||
got: usize,
|
||||
shape: Shape,
|
||||
},
|
||||
|
||||
#[error(transparent)]
|
||||
Cudarc(#[from] cudarc::driver::DriverError),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
Reference in New Issue
Block a user