[all-commits] [llvm/llvm-project] 5d6d30: [mlir] Extend C and Python API to support bulk loa...

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Thu Oct 7 08:45:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d6d30edf8b9b2c69215bdbbc651a85e4d0dc4ff
      https://github.com/llvm/llvm-project/commit/5d6d30edf8b9b2c69215bdbbc651a85e4d0dc4ff
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M mlir/include/mlir-c/BuiltinAttributes.h
    M mlir/include/mlir/IR/BuiltinAttributes.h
    M mlir/lib/Bindings/Python/IRAttributes.cpp
    M mlir/lib/CAPI/IR/BuiltinAttributes.cpp
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/test/python/ir/array_attributes.py

  Log Message:
  -----------
  [mlir] Extend C and Python API to support bulk loading of DenseElementsAttr.

* This already half existed in terms of reading the raw buffer backing a DenseElementsAttr.
* Documented the precise expectations of the buffer layout.
* Extended the Python API to support construction from bitcasted buffers, allowing construction of all primitive element types (even those that lack a compatible representation in Python).
* Specifically, the Python API can now load all integer types at all bit widths and all floating point types (f16, f32, f64, bf16).

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




More information about the All-commits mailing list