mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 11:56:45 +00:00
Relax the contiguous check for cuda kernels. (#2000)
* Relax the contiguous check for cuda kernels. * Ensure contiguity for RNNs. * Unrelated fix for segment anything. * Better error message + allow concatenating empty slices.
This commit is contained in:
@ -218,7 +218,8 @@ impl PromptEncoder {
|
||||
(Some(se_points), None) => se_points,
|
||||
(None, Some(se_boxes)) => se_boxes,
|
||||
(None, None) => {
|
||||
Tensor::zeros((1, 0, self.embed_dim), DType::F32, &candle::Device::Cpu)?
|
||||
let dev = self.no_mask_embed.embeddings().device();
|
||||
Tensor::zeros((1, 0, self.embed_dim), DType::F32, dev)?
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user