spcl/dace

Pass that turns symbol assignment to dynamic map ranges

Opened this issue · 0 comments

In many cases we generate SDFGs with symbol assignments where they could be dynamic map ranges.

Example:

@dace.program
def spmv(A_row: dace.uint32[H + 1], A_col: dace.uint32[nnz], A_val: dace.float32[nnz], x: dace.float32[W]):
    b = np.zeros([H], dtype=np.float32)

    for i in dace.map[0:H]:
        begin = A_row[i]
        end = A_row[i + 1]
        for j in dace.map[begin:end]:
            b[i] += A_val[j] * x[A_col[j]]

    return b

We should make a pass or transformation to "demote" certain symbol assignments to the tasklets or maps as necessary.