[all-commits] [llvm/llvm-project] 6c7e6b: [mlir] Support slicing for operands in results in ...

ftynse via All-commits all-commits at lists.llvm.org
Tue Nov 10 01:46:45 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c7e6b2c9abddf8b657997053d140ca4554cafbb
      https://github.com/llvm/llvm-project/commit/6c7e6b2c9abddf8b657997053d140ca4554cafbb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-11-10 (Tue, 10 Nov 2020)

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

  Log Message:
  -----------
  [mlir] Support slicing for operands in results in Python bindings

Slicing, that is element access with `[being:end:step]` structure, is
a common Python idiom for sequence-like containers. It is also necessary
to support custom accessor for operations with variadic operands and
results (an operation an return a slice of its operands that correspond
to the given variadic group).

Add generic utility to support slicing in Python bindings and use it
for operation operands and results.

Depends On D90923

Reviewed By: stellaraccident, mehdi_amini

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




More information about the All-commits mailing list