David Koski
David Koski
Actually this smells a bit like https://github.com/ml-explore/mlx/issues/2118
and that `Stream.withNewDefaultStream` case fails if you increase the iterations. I think this is the same issue and likely needs the fix from the mlx::core side.
Checkout #242 -- this should fix your particular issue. The underlying issue with Streams remains but your code should run without error. You can use `Device.withDefaultDevice(.cpu) { ... }` to...
That looks like #251 -- if you are using a newer than 0.21.2 mlx-swift you may need to get the current `main` from mlx-swift-examples.
> I'm facing a related (I think) issue. I need to be able to define an array of layers dynamically and also to annotate it with a key so that...
If you remove the computation from the loop and just have: ``` s = mx.new_stream(mx.gpu) ``` You get: ``` 1609 1610 Traceback (most recent call last): File "/tmp/t.py", line 7,...
The mlx-c (https://github.com/ml-explore/mlx-c) repo is exactly the type of API that JNI should be able to hook up to. See https://github.com/ml-explore/mlx-swift/ for an example of the use.
> 1. Are there plans to support cancellation of generation tasks? Nothing planned, but this sounds useful. > 2. If I wanted to implement a version of this now, is...