Skip to content

Is there a slice operator in ggml? If not, how do I use it / implement it? #755

Answered by slaren
crnsh asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by crnsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants