[all-commits] [llvm/llvm-project] 4758e9: [mlir] Change IteratorType in ContractionOp in Vec...

Oleg Shyshkov via All-commits all-commits at lists.llvm.org
Mon Sep 12 07:59:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4758e916e1b34d800b03cd2ea6a0a554ce2483be
      https://github.com/llvm/llvm-project/commit/4758e916e1b34d800b03cd2ea6a0a554ce2483be
  Author: Oleg Shyshkov <shyshkov at google.com>
  Date:   2022-09-12 (Mon, 12 Sep 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    M mlir/include/mlir/Dialect/Vector/IR/VectorOps.h
    M mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
    M mlir/lib/Conversion/VectorToGPU/NvGpuSupport.cpp
    M mlir/lib/Conversion/VectorToGPU/NvGpuSupport.h
    M mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp

  Log Message:
  -----------
  [mlir] Change IteratorType in ContractionOp in Vector dialect from string to enum.

This is the first step in replacing interator_type from strings with enums in Vector and Linalg dialect. This change adds IteratorTypeAttr and uses it in ContractionOp.

To avoid breaking all the tests, print/parse code has conversion between string and enum for now.

There is a shared code in StructuredOpsUtils.h that expects iterator types to be strings. To break this dependancy, this change forks helper function `isParallelIterator` and `isReductionIterator` to utils in both dialects and adds `getIteratorTypeNames()` to support backward compatibility with StructuredGenerator.

In the later changes, I plan to add a similar enum attribute to Linalg.

Differential Revision: https://reviews.llvm.org/D133696




More information about the All-commits mailing list