[all-commits] [llvm/llvm-project] 204acc: [mlir][py] Overload print with state. (#72064)

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Mon Nov 13 10:21:36 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 204acc5c1080d101ea5d96374b8cc54e876cc192
      https://github.com/llvm/llvm-project/commit/204acc5c1080d101ea5d96374b8cc54e876cc192
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/IRModule.h
    M mlir/test/python/ir/operation.py

  Log Message:
  -----------
  [mlir][py] Overload print with state. (#72064)

Enables reusing the AsmState when printing from Python. Also moves the
fileObject and binary to the end (pybind11::object was resulting in the
overload not working unless `state=` was specified).

---------

Co-authored-by: Maksim Levental <maksim.levental at gmail.com>




More information about the All-commits mailing list