You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new pipeline, we should do partial evaluation of expressions on OperationAcc, as defined in Data.Array.Accelerate.AST.Operation. This is mainly beneficial for shapes of arrays.
The simplification should work on both host-side expressions (which are wrapped in Compute in PreOpenAcc) and device-side expressions (which are contained in ArgExp or ArgFun).
When doing inline, take into account that scalars can both exists in the buffer environment ('external' environment, mainly containing shapes of arrays) and the scalar environment ('local' environment, containing variables bound by lambdas and lets). That is, we should keep track of inlinable expressions in both env and benv in OpenExp env benv e.
We may want to re-enable optimizations on associative functions, especially on min as we use that to compute the intersection of shapes. When doing a zipWithN with N>2, we have a chain of min calls and we'd like to simplify that as much as possible.
To optimize min better, it might be useful to also keep track of inequalities (eg x <= y) during simplification. This may help us to simplify many shape computations.
After partial evaluation we know which arrays have the same size. We should then remove shrink operations for which the output size matches the input size (see mkShrink in Desugar.hs, or a backpermute id which preserves the size). This will allow us to do a zip in constant time
The text was updated successfully, but these errors were encountered:
In the new pipeline, we should do partial evaluation of expressions on OperationAcc, as defined in
Data.Array.Accelerate.AST.Operation
. This is mainly beneficial for shapes of arrays.Compute
inPreOpenAcc
) and device-side expressions (which are contained inArgExp
orArgFun
).env
andbenv
inOpenExp env benv e
.min
as we use that to compute the intersection of shapes. When doing a zipWithN with N>2, we have a chain ofmin
calls and we'd like to simplify that as much as possible.min
better, it might be useful to also keep track of inequalities (egx <= y
) during simplification. This may help us to simplify many shape computations.backpermute id
which preserves the size). This will allow us to do a zip in constant timeThe text was updated successfully, but these errors were encountered: