diff options
Diffstat (limited to 'src/TosaSerialize.cpp')
-rw-r--r-- | src/TosaSerialize.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp index 3c95c75..ae5e9c6 100644 --- a/src/TosaSerialize.cpp +++ b/src/TosaSerialize.cpp @@ -1,5 +1,5 @@ -// Copyright (c) 2020-2021, ARM Limited. +// Copyright (c) 2020-2022, ARM Limited. // // Licensed under the Apache License, Version 2.0 with LLVM Exceptions // (the "License"); you may not use this file except in compliance with @@ -520,7 +520,8 @@ TosaSerializationOperatorBuilder::build<mlir::tosa::ConstOp>( op.getAttr(llvm::StringRef("value")).dyn_cast<mlir::IntegerAttr>(); if (dense_attr) { - for (auto val : dense_attr.getValues<int64_t>()) { + for (auto valueIt : dense_attr.getValues<mlir::APInt>()) { + uint64_t val = valueIt.getLimitedValue(); data.push_back(val); } } else if (val_attr) { |