[all-commits] [llvm/llvm-project] a60e8a: [mlir] Python: write bytecode to a file path (#127...

Nikhil Kalra via All-commits all-commits at lists.llvm.org
Mon Feb 24 17:52:11 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a60e8a2c2579252d66a0656c387af29475e9b908
      https://github.com/llvm/llvm-project/commit/a60e8a2c2579252d66a0656c387af29475e9b908
  Author: Nikhil Kalra <nkalra at apple.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/NanobindUtils.h
    M mlir/python/mlir/_mlir_libs/_mlir/ir.pyi
    M mlir/test/python/ir/operation.py

  Log Message:
  -----------
  [mlir] Python: write bytecode to a file path (#127118)

The current `write_bytecode` implementation necessarily requires the
serialized module to be duplicated in memory when the python `bytes`
object is created and sent over the binding. For modules with large
resources, we may want to avoid this in-memory copy by serializing
directly to a file instead of sending bytes across the boundary.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list