[all-commits] [llvm/llvm-project] fa26a3: [mlir] Add shaped container component type interface

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Wed Jan 15 13:29:30 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fa26a37d36991dd19276c2112ae03e962debe0e4
      https://github.com/llvm/llvm-project/commit/fa26a37d36991dd19276c2112ae03e962debe0e4
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2020-01-15 (Wed, 15 Jan 2020)

  Changed paths:
    M mlir/docs/OpDefinitions.md
    A mlir/docs/ShapeInference.md
    M mlir/include/mlir/Analysis/InferTypeOpInterface.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Analysis/InferTypeOpInterface.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/test/mlir-tblgen/return-types.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir] Add shaped container component type interface

Summary:
* Add shaped container type interface which allows infering the shape, element
  type and attribute of shaped container type separately. Show usage by way of
  tensor type inference trait which combines the shape & element type in
  infering a tensor type;
  - All components need not be specified;
  - Attribute is added to allow for layout attribute that was previously
    discussed;
* Expand the test driver to make it easier to test new creation instances
  (adding new operands or ops with attributes or regions would trigger build
  functions/type inference methods);
  - The verification part will be moved out of the test and to verify method
    instead of ops implementing the type inference interface in a follow up;
* Add MLIRContext as arg to possible to create type for ops without arguments,
  region or location;
* Also move out the section in OpDefinitions doc to separate ShapeInference doc
  where the shape function requirements can be captured;
  - Part of this would move to the shape dialect and/or shape dialect ops be
    included as subsection of this doc;
* Update ODS's variable usage to match camelBack format for builder,
  state and arg variables;
  - I could have split this out, but I had to make some changes around
    these and the inconsistency bugged me :)

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




More information about the All-commits mailing list