-
I've been playing around with the custom kernels to try and get around some functions that aren't implemented from numpy. (or in this case scipy peak detection). Mainly because you don't yet support include numpy.nonzero() and the single input version of numpy.where() I'm trying to make a np.nonzero function to go in something similar to this:
I'm trying to find what other documentation there is on the custom kernel. Namely, output shape. I'd love to be able to do something like the given example
except with the ability to infer the second kernel's output shape if the first calculates it. Otherwise I would have to assign a fixed buffer and then cut it to size. Are indirect command buffers supported? I'm new to MSL but it looks like it could possibly do stuff like this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In general you can't do data-dependent output shapes in MLX. You can read more about why here. Assigning a fixed buffer and cutting it is probably your best bet.
No sorry |
Beta Was this translation helpful? Give feedback.
In general you can't do data-dependent output shapes in MLX. You can read more about why here.
Assigning a fixed buffer and cutting it is probably your best bet.
No sorry