mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +00:00
Adding embedding op (not generic gather, no select).
This commit is contained in:
10
src/error.rs
10
src/error.rs
@ -15,6 +15,13 @@ pub enum Error {
|
||||
#[error("backward is not supported for {op}")]
|
||||
BackwardNotSupported { op: &'static str },
|
||||
|
||||
#[error("{op} invalid index {index} with vocab {vocab_size}")]
|
||||
InvalidIndex {
|
||||
op: &'static str,
|
||||
index: usize,
|
||||
vocab_size: usize,
|
||||
},
|
||||
|
||||
#[error("the candle crate has not been built with cuda support")]
|
||||
NotCompiledWithCudaSupport,
|
||||
|
||||
@ -65,6 +72,9 @@ pub enum Error {
|
||||
|
||||
#[error(transparent)]
|
||||
Cuda(#[from] crate::CudaError),
|
||||
|
||||
#[error(transparent)]
|
||||
TryFromIntError(#[from] core::num::TryFromIntError),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
Reference in New Issue
Block a user