Add the cat operator (without the storage implementation for now).

This commit is contained in:
laurent
2023-06-23 10:13:37 +01:00
parent bf9e1d1c23
commit 6110db31c9
4 changed files with 118 additions and 0 deletions

View File

@ -9,6 +9,9 @@ pub enum Error {
#[error("{op} only supports contiguous tensors")]
RequiresContiguous { op: &'static str },
#[error("{op} expects at least one tensor")]
OpRequiresAtLeastOneTensor { op: &'static str },
#[error("the candle crate has not been built with cuda support")]
NotCompiledWithCudaSupport,
@ -24,6 +27,14 @@ pub enum Error {
op: &'static str,
},
#[error("shape mismatch in cat for dim {dim}, shape for arg 1: {first_shape:?} shape for arg {n}: {nth_shape:?}")]
ShapeMismatchCat {
dim: usize,
first_shape: Shape,
n: usize,
nth_shape: Shape,
},
#[error("device mismatch in {op}, lhs: {lhs:?}, rhs: {rhs:?}")]
DeviceMismatchBinaryOp {
lhs: DeviceLocation,