[all-commits] [llvm/llvm-project] 54d432: [mlir] Add Shaped Type, Tensor Type and MemRef Typ...

zhanghb97 via All-commits all-commits at lists.llvm.org
Sun Sep 6 11:46:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 54d432aa6b835ee7e835d0626c15ca5e7eb83ab4
      https://github.com/llvm/llvm-project/commit/54d432aa6b835ee7e835d0626c15ca5e7eb83ab4
  Author: zhanghb97 <zhanghb97 at 126.com>
  Date:   2020-09-06 (Sun, 06 Sep 2020)

  Changed paths:
    M mlir/include/mlir-c/StandardTypes.h
    M mlir/lib/Bindings/Python/IRModules.cpp
    M mlir/lib/CAPI/IR/StandardTypes.cpp
    M mlir/test/Bindings/Python/ir_types.py

  Log Message:
  -----------
  [mlir] Add Shaped Type, Tensor Type and MemRef Type to python bindings.

Based on the PyType and PyConcreteType classes, this patch implements the bindings of Shaped Type, Tensor Type and MemRef Type subclasses.
The Tensor Type and MemRef Type are bound as ranked and unranked separately.
This patch adds the ***GetChecked C API to make sure the python side can get a valid type or a nullptr.
Shaped type is not a kind of standard types, it is the base class for vectors, memrefs and tensors, this patch binds the PyShapedType class as the base class of Vector Type, Tensor Type and MemRef Type subclasses.

Reviewed By: stellaraccident

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




More information about the All-commits mailing list