metagraph-dev / mlir-graphblas

MLIR tools and dialect for GraphBLAS
https://mlir-graphblas.readthedocs.io/en/latest/
Apache License 2.0
15 stars 6 forks source link

Update TableGen documentation for graphblas.matrix_multiply_generic #190

Closed paul-tqh-nguyen closed 2 years ago

paul-tqh-nguyen commented 2 years ago

graphblas.matrix_multiply_generic currently has incomplete documentation.

def GraphBLAS_MatrixMultiplyGenericOp : GraphBLAS_Op<"matrix_multiply_generic", [NoSideEffect]> {
    let summary = "generic matrix multiply operation with an optional structural mask";
    let description = [{
        Performs a matrix multiply according to the given semiring and optional
        structural mask.  The given sparse tensors must be a matrix, i.e. have rank 2.
        The first input tensors must be CSR format, while the second input tensor must
        be CSC format.  The mask (if provided) must be CSR format.
    }];

    let arguments = (ins
      GraphBlasMatrixOrVectorOperand:$a,
      GraphBlasMatrixOrVectorOperand:$b,
      Optional<GraphBlasMatrixOrVectorOperand>:$mask,
      BoolAttr:$mask_complement);
    let results = (outs AnyType:$output);
    let regions = (region VariadicRegion<SizedRegion<1>>:$extensions);

    let assemblyFormat = [{
           $a `,` $b (`,` $mask^)? attr-dict `:` `(` type($a) `,` type($b)  (`,` type($mask)^)? `)` `to` type($output) $extensions
    }];

    let verifier = [{ return ::verify(*this); }];
}

We should update it and also update our overall documentation to be consistent with it.

paul-tqh-nguyen commented 2 years ago

https://github.com/metagraph-dev/mlir-graphblas/pull/191 addresses this issue.