Brad,
On Mon, 6 Jul 2020, Brad Chamberlain wrote:
The source of the problem seems to be due to the combination of using a loop
expression ([i in 1..10]) and a promoted operator (i * A) in combination;
using either separately seems to work. I haven't come up with a satisfactory
workaround that I like (i.e., one that doesn't add additional overheads) but
have opened up the following issue against this:
https://github.com/chapel-lang/chapel/issues/16027
Thanks.
I want to note that the pattern you're expressing here is what we'd call a
partial reduction in Chapel; a long-intended but not-yet-completed feature,
the motivation for it being that expressing a row- or column-wise reduction
like this can be done much more efficiently when computed wholesale rather
than a row or column at a time, particularly for distributed arrays.
I am trying to compute
(I + (1 / (g * h)) * b * b^T) B -> B += b * (((b^T * B) / g) / h)
where B is an array, b is a vector, and g and h are scalars. I can do it
trivially if I want to do this by columns. But
a) if I do it by rows (without the the reduce) using 1.20, it saves
10% due to superior cache hits ratios but it would be far more
elegant if that reduce worked.
b) if I do it the same on 1.22, the performance goes to hell quickly.
I have not tracked that down yet but I am building a test problem
that proves it quickly. Well I will next week.
If you can tell how to compute that matrix 'wholesale', I am all ears.
But I do not want to gobble up lots of space.
There's no good excuse for why we haven't implemented it yet other than
a lack of users breathing down our neck over it.
I hate creating work for you if I cannot contribute to helping solve it.
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers