Polish the index-add op and use it in the index-select backprop (#218)

* Add the cpu version of index-add.

* More cpu support for index-add.

* Use index-add in the backprop.
This commit is contained in:
Laurent Mazare
2023-07-22 06:31:46 +02:00
committed by GitHub
parent 27174a82aa
commit 6eeea1b04e
4 changed files with 108 additions and 36 deletions

View File

@ -112,11 +112,11 @@ pub enum Error {
msg: &'static str,
},
#[error("{op} invalid index {index} with src dim size {src_size}")]
#[error("{op} invalid index {index} with dim size {size}")]
InvalidIndex {
op: &'static str,
index: usize,
src_size: usize,
size: usize,
},
#[error("cannot broadcast {src_shape:?} to {dst_shape:?}")]