// RUN: mlir-opt %s -sparsifier="vl=8" | FileCheck %s #Dense = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : dense) }> #matvec = { indexing_maps = [ affine_map<(i,j) -> (i,j)>, // A affine_map<(i,j) -> (j)>, // b affine_map<(i,j) -> (i)> // x (out) ], iterator_types = ["parallel", "reduction"], doc = "X(i) += A(i,j) * B(j)" } // CHECK-LABEL: llvm.func @kernel_matvec // CHECK: llvm.intr.vector.reduce.fadd func.func @kernel_matvec(%arga: tensor, %argb: tensor, %argx: tensor) -> tensor { %x = linalg.generic #matvec ins(%arga, %argb: tensor, tensor) outs(%argx: tensor) { ^bb(%a: f32, %b: f32, %x: f32): %0 = arith.mulf %a, %b : f32 %1 = arith.addf %x, %0 : f32 linalg.yield %1 : f32 } -> tensor return %x : tensor }