Is there a slice operator in ggml? If not, how do I use it / implement it? #755
-
I've been trying to convert some ONNX models to ggml, and was wondering whether there is a slice operator in ggml. If there isn't, how do I go about implementing it? I've looked at all the operators and I can't seem to figure out. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think you should be able to create any kind of slice with a view, using |
Beta Was this translation helpful? Give feedback.
I think you should be able to create any kind of slice with a view, using
ggml_view_Nd
. You would need to calculate the offset the strides between the axis. We could also add an operator that does this with a simpler interface, to do this you could look into the implementation of the view operators to see how views are created.