mlx-c
mlx-c copied to clipboard
Returning an error in the closure
What would be the recommended way to return an error from a closure (assuming that the default error handler has been overridden)? I tried returning a null pointer and store the error message in a global var but mlx_closure_apply
(and mlx_vjp
) would end up giving me a SIGSEGV because it's trying to create a std::vector
from the null pointer.