Add the index-select op. (#209)

* Add the index-select op.

* Cpu implementation of index-select.

* Add the cpu implementation for index-select.
This commit is contained in:
Laurent Mazare
2023-07-20 15:01:03 +02:00
committed by GitHub
parent 2a8f28d687
commit fa08fb3126
10 changed files with 168 additions and 20 deletions

View File

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