[Mlir-commits] [mlir] [mlir][python] allow DenseIntElementsAttr for index type (PR #118947)

Stella Laurenzo llvmlistbot at llvm.org
Thu Dec 12 12:15:12 PST 2024


================
@@ -758,6 +758,9 @@ int64_t mlirDenseElementsAttrGetInt64Value(MlirAttribute attr, intptr_t pos) {
 uint64_t mlirDenseElementsAttrGetUInt64Value(MlirAttribute attr, intptr_t pos) {
   return llvm::cast<DenseElementsAttr>(unwrap(attr)).getValues<uint64_t>()[pos];
 }
+size_t mlirDenseElementsAttrGetIndexValue(MlirAttribute attr, intptr_t pos) {
+  return llvm::cast<DenseElementsAttr>(unwrap(attr)).getValues<size_t>()[pos];
----------------
stellaraccident wrote:

Here too 

https://github.com/llvm/llvm-project/pull/118947


More information about the Mlir-commits mailing list