Skip to content

Invalid dimensions when doing += on windowed lhs #451

@stkaplan

Description

@stkaplan

I'm trying to run a += expression where the LHS tensor uses windowing, and taco erroneously says it's invalid. Here's a reproducer:

int main()
{
    Tensor<double> A({8}, Format{Dense});
    Tensor<double> B({3}, Format{Dense});

    IndexVar i;
    A(i(0,3)) += B(i);
    A.compile();
    A.assemble();
    A.compute();
}

Running this gives the error:

terminate called after throwing an instance of 'taco::TacoException'
  what():  Compiler bug at /home/sam/work/taco/taco/src/index_notation/index_notation.cpp:2510 in makeConcreteNotation
Please report it to developers
 Condition failed: isReductionNotation(stmt, &reason)
 Not reduction notation: A0(i6) += A3(i6)
Dimension size mismatch. Index variable i6 is used to index modes of different dimensions (8 and 3).
Aborted

This works fine if I do A(i(0,3)) = B(i), so I'm guessing this is an error in the += operator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions