diff --git a/mlx/compile.cpp b/mlx/compile.cpp index 34d122b06..e6cd58755 100644 --- a/mlx/compile.cpp +++ b/mlx/compile.cpp @@ -995,7 +995,7 @@ ArrayFnWithExtra compile( // At this point we must have a tape, now replace the placeholders // with real arrays that can be evaluated - return std::pair, std::shared_ptr>{ + return ArraysAndExtra{ compile_replace( entry.tape, entry.inputs, entry.outputs, inputs, shapeless), entry.extra}; @@ -1017,8 +1017,7 @@ std::function(const std::vector&)> compile( ArrayFnWithExtra fun_with_extra = [fun = std::move(fun)](const std::vector& inputs) { - return std::pair, std::shared_ptr>{ - fun(inputs), nullptr}; + return ArraysAndExtra{fun(inputs), nullptr}; }; auto compiled_fun = compile(