|
MLIR 23.0.0git
|
#include "mlir/Bindings/Python/IRAttributes.h"
Static Public Member Functions | |
| static PyDenseElementsAttribute | getFromList (const nanobind::typed< nanobind::sequence, PyAttribute > &attributes, std::optional< PyType > explicitType, DefaultingPyMlirContext contextWrapper) |
| static PyDenseElementsAttribute | getFromBuffer (const nb_buffer &array, bool signless, const std::optional< PyType > &explicitType, std::optional< std::vector< int64_t > > explicitShape, DefaultingPyMlirContext contextWrapper) |
| static PyDenseElementsAttribute | getSplat (const PyType &shapedType, PyAttribute &elementAttr) |
| static void | bindDerived (ClassTy &c) |
| Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute > | |
| static MlirAttribute | castFrom (PyAttribute &orig) |
| static void | bind (nanobind::module_ &m, PyType_Slot *slots=nullptr) |
| static void | bindDerived (ClassTy &m) |
| Implemented by derived classes to add methods to the Python subclass. | |
| Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttribute | |
| static PyAttribute | createFromCapsule (const nanobind::object &capsule) |
| Creates a PyAttribute from the MlirAttribute wrapped by a capsule. | |
Static Public Attributes | |
| static constexpr IsAFunctionTy | isaFunction = mlirAttributeIsADenseElements |
| static constexpr const char * | pyClassName = "DenseElementsAttr" |
| static PyType_Slot | slots [] |
| Static Public Attributes inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute > | |
| static constexpr GetTypeIDFunctionTy | getTypeIdFunction |
| static const MlirStringRef | name |
Static Protected Member Functions | |
| template<typename ClassT> | |
| static void | bindFactoryMethods (ClassT &c, const char *pyClassName) |
| Registers get/get_splat factory methods with the concrete return type in the nb::sig. | |
Additional Inherited Members | |
| Public Types inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute > | |
| using | ClassTy |
| using | IsAFunctionTy |
| using | GetTypeIDFunctionTy |
| using | Base |
Definition at line 398 of file IRAttributes.h.
| std::unique_ptr< nb_buffer_info > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::accessBuffer | ( | ) |
Definition at line 698 of file IRAttributes.cpp.
References mlirAttributeGetType(), mlirIntegerTypeGetWidth(), mlirIntegerTypeIsSigned(), mlirIntegerTypeIsSignless(), mlirIntegerTypeIsUnsigned(), mlirShapedTypeGetElementType(), mlirTypeIsAF16(), mlirTypeIsAF32(), mlirTypeIsAF64(), mlirTypeIsAIndex(), and mlirTypeIsAInteger().
|
static |
Definition at line 810 of file IRAttributes.cpp.
References bindFactoryMethods(), dunderLen(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::getContext(), mlirDenseElementsAttrGetSplatValue(), mlirDenseElementsAttrIsSplat(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttribute::PyAttribute(), and pyClassName.
|
staticprotected |
Registers get/get_splat factory methods with the concrete return type in the nb::sig.
Subclasses call this from their bindDerived to override the return type in generated stubs.
Definition at line 776 of file IRAttributes.cpp.
References getFromBuffer(), getFromList(), getSplat(), kDenseElementsAttrGetDocstring, kDenseElementsAttrGetFromListDocstring, and pyClassName.
Referenced by bindDerived(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseFPElementsAttribute::bindDerived(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::bindDerived().
| intptr_t mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute::dunderLen | ( | ) | const |
Definition at line 694 of file IRAttributes.cpp.
References mlirElementsAttrGetNumElements().
Referenced by bindDerived(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseFPElementsAttribute::dunderGetItem(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::dunderGetItem().
|
static |
Definition at line 632 of file IRAttributes.cpp.
References mlir::python::Defaulting< DerivedTy, T >::get().
Referenced by bindFactoryMethods().
|
static |
Definition at line 582 of file IRAttributes.cpp.
References nanobind::detail::join(), mlirAttributeGetNull(), mlirAttributeGetType(), mlirDenseElementsAttrGet(), mlirRankedTensorTypeGet(), mlirShapedTypeGetElementType(), mlirShapedTypeHasStaticShape(), mlirTypeEqual(), mlirTypeIsAShaped(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::pyTryCast().
Referenced by bindFactoryMethods().
|
static |
Definition at line 661 of file IRAttributes.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::forContext(), mlirAttributeGetType(), mlirAttributeIsAFloat(), mlirAttributeIsAInteger(), mlirDenseElementsAttrSplatGet(), mlirShapedTypeGetElementType(), mlirShapedTypeHasStaticShape(), mlirTypeEqual(), mlirTypeGetContext(), and mlirTypeIsAShaped().
Referenced by bindFactoryMethods().
|
default |
|
inline |
|
inline |
|
staticconstexpr |
Definition at line 401 of file IRAttributes.h.
|
staticconstexpr |
Definition at line 402 of file IRAttributes.h.
Referenced by bindDerived(), and bindFactoryMethods().
|
static |
Definition at line 425 of file IRAttributes.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRAttributes().