Add some missing index-select metal kernels. (#2613)

* Add some missing index-select metal kernels.

* Make some matrix contiguous pre-matmul.
This commit is contained in:
Laurent Mazare
2024-11-12 17:10:12 +01:00
committed by GitHub
parent 9453cc3095
commit 06350c31c7
3 changed files with 16 additions and 2 deletions

View File

@ -171,7 +171,8 @@ impl ChineseClipModel {
) -> Result<Tensor> {
let output = self
.text_model
.forward(input_ids, token_type_ids, attention_mask)?;
.forward(input_ids, token_type_ids, attention_mask)?
.contiguous()?;
self.text_projection.forward(&output)
}