[all-commits] [llvm/llvm-project] bd2083: [mlir][Python] Python API cleanups and additions f...

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Sun Nov 29 18:12:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bd2083c2fa7bb8769ca997a0303da54432e08519
      https://github.com/llvm/llvm-project/commit/bd2083c2fa7bb8769ca997a0303da54432e08519
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2020-11-29 (Sun, 29 Nov 2020)

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

  Log Message:
  -----------
  [mlir][Python] Python API cleanups and additions found during code audit.

* Add capsule get/create for Attribute and Type, which already had capsule interop defined.
* Add capsule interop and get/create for Location.
* Add Location __eq__.
* Use get() and implicit cast to go from PyAttribute, PyType, PyLocation to MlirAttribute, MlirType, MlirLocation (bundled with this change because I didn't want to continue the pattern one more time).

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


  Commit: ba0fe76b7eb87f91499931e76317ddd1cb493aa1
      https://github.com/llvm/llvm-project/commit/ba0fe76b7eb87f91499931e76317ddd1cb493aa1
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2020-11-29 (Sun, 29 Nov 2020)

  Changed paths:
    M mlir/lib/Bindings/Python/IRModules.cpp
    M mlir/lib/Bindings/Python/IRModules.h
    M mlir/test/Bindings/Python/ir_operation.py

  Log Message:
  -----------
  [mlir][Python] Add an Operation.result property.

* If ODS redefines this, it is fine, but I have found this accessor to be universally useful in the old npcomp bindings and I'm closing gaps that will let me switch.

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


Compare: https://github.com/llvm/llvm-project/compare/e6c17776858d...ba0fe76b7eb8


More information about the All-commits mailing list