[mlir][sparse] Improving SparseTensorDimSliceAttr methods
This patch makes the following changes to `SparseTensorDimSliceAttr` methods: * Mark `isDynamic` constexpr. * Add new helpers `getStatic` and `getStaticString` to avoid repetition. * Moved the definitions for `getStatic{Offset,Stride,Size}` and `isCompletelyDynamic` out of the class declaration; because there's no benefit to inlining them. * Changed `parse` to use `kDynamic` rather than literals. * Changed `verify` to use the `isDynamic` helper. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D150919
Loading
Please sign in to comment