Class HelperAccumulateOp
Defined in File EmitHLSOps.h.inc
Inheritance Relationships
Base Type
public mlir::Op< HelperAccumulateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands< 2 >::Impl, ::mlir::OpTrait::HasParent< ForOp, affine::AffineForOp >::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait >
Class Documentation
-
class HelperAccumulateOp : public mlir::Op<HelperAccumulateOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::HasParent<ForOp, affine::AffineForOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait>
Public Types
-
using Adaptor = HelperAccumulateOpAdaptor
-
template<typename RangeT>
using GenericAdaptor = HelperAccumulateOpGenericAdaptor<RangeT>
-
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
-
using Properties = FoldAdaptor::Properties
Public Functions
-
inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
-
inline ::mlir::StringAttr getOpCodeAttrName()
-
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
-
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
-
inline ::mlir::TypedValue<::mlir::Type> getAccuRef()
-
inline ::mlir::TypedValue<::mlir::Type> getValue()
-
inline ::mlir::Operation::operand_range getIndices()
-
inline ::mlir::OpOperand &getAccuRefMutable()
-
inline ::mlir::OpOperand &getValueMutable()
-
::mlir::MutableOperandRange getIndicesMutable()
-
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
-
inline ::mlir::Operation::result_range getODSResults(unsigned index)
-
void writeProperties(::mlir::DialectBytecodeWriter &writer)
-
inline ::mlir::emithls::FusedOperatorAttr getOpCodeAttr()
-
::mlir::emithls::FusedOperator getOpCode()
-
inline void setOpCodeAttr(::mlir::emithls::FusedOperatorAttr attr)
-
void setOpCode(::mlir::emithls::FusedOperator attrValue)
-
void print(::mlir::OpAsmPrinter &p)
Prints a
emithls::HelperAccumulateOpin the custom assembly syntax consumed byparse.
-
::llvm::LogicalResult verifyInvariantsImpl()
-
::llvm::LogicalResult verifyInvariants()
Public Static Functions
-
static inline ::mlir::StringAttr getOpCodeAttrName(::mlir::OperationName name)
-
static inline constexpr ::llvm::StringLiteral getOperationName()
-
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
-
static llvm::hash_code computePropertiesHash(const Properties &prop)
-
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
-
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
-
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
-
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
-
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value accuRef, ValueRange indices, FusedOperator operatorCode, Value value)
Builds a
emithls::HelperAccumulateOp.- Parameters:
accuRef – The accumulation target memref/array.
indices – Index operands into
accuRefselecting the element to accumulate into.operatorCode – The reduction operator (e.g., add, mul) to apply.
value – The value to reduce into the element at
indices.
-
static HelperAccumulateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value accuRef, ValueRange indices, FusedOperator operatorCode, Value value)
-
static HelperAccumulateOp create(::mlir::ImplicitLocOpBuilder &builder, Value accuRef, ValueRange indices, FusedOperator operatorCode, Value value)
-
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Parses a
emithls::HelperAccumulateOpfrom its custom assembly syntax.The expected syntax is:
`emithls.helper_accumulate` accumulator-ref `at` `[` index-list `]` operator-code value `:` memref-or-array-type (`cast` value-type)?
The element type of
memref-or-array-typeis used to resolvevalue, unless an explicit trailingcastvalue-type overrides it — needed when the accumulate increment was computed at a different precision than the accumulator. All index operands are resolved asindextype.
-
static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
-
using Adaptor = HelperAccumulateOpAdaptor