Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representation of lazy MLX arrays #11

Open
stemann opened this issue Dec 16, 2024 · 0 comments
Open

Representation of lazy MLX arrays #11

stemann opened this issue Dec 16, 2024 · 0 comments

Comments

@stemann
Copy link
Owner

stemann commented Dec 16, 2024

In MLX almost all (array) operations are lazy (to make it possible to optimize a computational graph), i.e. operations are not executed until eval is called, e.g.:

>> import mlx.core as mx
>> a = mx.array([1, 2, 3, 4])
>> b = mx.array([1.0, 2.0, 3.0, 4.0])
>> c = a + b    # c not yet evaluated
>> mx.eval(c)  # evaluates c
>> c = a + b
>> print(c)     # Also evaluates c

How to best represent lazy arrays and operations on lazy arrays in Julia?

Primary options:

Secondary options:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant