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
{{ message }}
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
Array equivalence analysis treats all arrays in element-wise expressions as having equivalent shape. However, dimensions with size 1 can be broadcast. The example below gives incorrect result instead of throwing an error.
One solution is to specialize to array size dimensions having 1; it will be part of the type in some sort semantically. We could also mention this limitation in documentation and live with it.
using ParallelAccelerator
ParallelAccelerator.ParallelIR.set_debug_level(3)
@accfunctionbtest(A,B,C)
D1 = A.+B
D2 = B.+C
D1.+D2
end
A =ones(2,2)
B =ones(1,2)
C =ones(3,1)
println(btest(A,B,C))
[4.03.0; 4.01.0]
The text was updated successfully, but these errors were encountered:
Array equivalence analysis treats all arrays in element-wise expressions as having equivalent shape. However, dimensions with size 1 can be broadcast. The example below gives incorrect result instead of throwing an error.
One solution is to specialize to array size dimensions having 1; it will be part of the type in some sort semantically. We could also mention this limitation in documentation and live with it.
The text was updated successfully, but these errors were encountered: