phylanx icon indicating copy to clipboard operation
phylanx copied to clipboard

dot_d returns wrong result

Open hkaiser opened this issue 5 years ago • 1 comments

Running the following code on 4 localities returns list(30, 60) which is wrong:

define(
    test,
    size,
    block(
        define(
            array1,
            random_d(
                list(size, size)
            )
        ),
        define(
            array2,
            random_d(
                list(size, size)
            )
        ),
        define(
            v2,
            dot_d(array1, array2)
        ),
        shape(v2)
    )
)
test(60)

as it should return list(30, 30), which is the size of each of the tiles.

hkaiser avatar Oct 08 '20 22:10 hkaiser

This is caused by dot_d not supporting block-tiled matrices at the moment. Matrices should be either row-tiled or column-tiled for dot_d to produce the correct result. I will add an error message diagnosing this condition for now.

hkaiser avatar Oct 09 '20 16:10 hkaiser