[Mlir-commits] [mlir] [MLIR] Add support for int8/uint8 properties (PR #145019)
Mehdi Amini
llvmlistbot at llvm.org
Mon Jun 23 06:57:56 PDT 2025
================
@@ -48,6 +48,40 @@ Attribute mlir::convertToAttribute(MLIRContext *ctx, int32_t storage) {
return IntegerAttr::get(IntegerType::get(ctx, 32), storage);
}
+LogicalResult
+mlir::convertFromAttribute(int8_t &storage, Attribute attr,
+ function_ref<InFlightDiagnostic()> emitError) {
+ auto valueAttr = dyn_cast<IntegerAttr>(attr);
+ if (!valueAttr) {
+ emitError() << "expected IntegerAttr for key `value`";
----------------
joker-eph wrote:
I stayed consistent with the code above in this file
https://github.com/llvm/llvm-project/pull/145019
More information about the Mlir-commits
mailing list