MLIR  19.0.0git
Variables
IRAttributes.cpp File Reference
#include <optional>
#include <string_view>
#include <utility>
#include "IRModule.h"
#include "PybindUtils.h"
#include "llvm/ADT/ScopeExit.h"
#include "mlir-c/BuiltinAttributes.h"
#include "mlir-c/BuiltinTypes.h"
#include "mlir/Bindings/Python/PybindAdaptors.h"

Go to the source code of this file.

Variables

static const char kDenseElementsAttrGetDocstring []
 
static const char kDenseResourceElementsAttrGetFromBufferDocstring []
 

Variable Documentation

◆ kDenseElementsAttrGetDocstring

const char kDenseElementsAttrGetDocstring[]
static

Definition at line 33 of file IRAttributes.cpp.

◆ kDenseResourceElementsAttrGetFromBufferDocstring

const char kDenseResourceElementsAttrGetFromBufferDocstring[]
static
Initial value:
=
R"(Gets a DenseResourceElementsAttr from a Python buffer or array.
This function does minimal validation or massaging of the data, and it is
up to the caller to ensure that the buffer meets the characteristics
implied by the shape.
The backing buffer and any user objects will be retained for the lifetime
of the resource blob. This is typically bounded to the context but the
resource can have a shorter lifespan depending on how it is used in
subsequent processing.
Args:
buffer: The array or buffer to convert.
name: Name to provide to the resource (may be changed upon collision).
type: The explicit ShapedType to construct the attribute with.
context: Explicit context, if not from context manager.
Returns:
DenseResourceElementsAttr on success.
Raises:
ValueError: If the type of the buffer or array cannot be matched to an MLIR
type or if the buffer does not meet expectations.
)"

Definition at line 75 of file IRAttributes.cpp.