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:
In MLX almost all (array) operations are lazy (to make it possible to optimize a computational graph), i.e. operations are not executed until
evalis called, e.g.:How to best represent lazy arrays and operations on lazy arrays in Julia?
Primary options:
TracedRArray/ConcreteRArrayin Reactant.jlSecondary options: