[all-commits] [llvm/llvm-project] acde3f: [mlir:python] Compute get_op_result_or_value in Py...
Peter Hawkins via All-commits
all-commits at lists.llvm.org
Fri Jan 24 06:26:51 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: acde3f722ff3766f6f793884108d342b78623fe4
https://github.com/llvm/llvm-project/commit/acde3f722ff3766f6f793884108d342b78623fe4
Author: Peter Hawkins <phawkins at google.com>
Date: 2025-01-24 (Fri, 24 Jan 2025)
Changed paths:
M mlir/lib/Bindings/Python/IRCore.cpp
M mlir/lib/Bindings/Python/IRModule.h
M mlir/python/mlir/dialects/_ods_common.py
M mlir/test/mlir-tblgen/op-python-bindings.td
M mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
Log Message:
-----------
[mlir:python] Compute get_op_result_or_value in PyOpView's constructor. (#123953)
This logic is in the critical path for constructing an operation from
Python. It is faster to compute this in C++ than it is in Python, and it
is a minor change to do this.
This change also alters the API contract of
_ods_common.get_op_results_or_values to avoid calling
get_op_result_or_value on each element of a sequence, since the C++ code
will now do this.
Most of the diff here is simply reordering the code in IRCore.cpp.
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