[Mlir-commits] [mlir] [mlir][tosa] Fix dense_resource data alignment in tosa-narrow-* tests (PR #182253)

Thibaut Goetghebuer-Planchon llvmlistbot at llvm.org
Thu Feb 19 04:20:16 PST 2026


https://github.com/Tessil created https://github.com/llvm/llvm-project/pull/182253

The alignment of int64 and float64 dense resource should be 8 and not 4

>From 3d1b52353407fd44a07424499aabc745f4832b31 Mon Sep 17 00:00:00 2001
From: Thibaut Goetghebuer-Planchon <thibaut.goetghebuer-planchon at arm.com>
Date: Thu, 19 Feb 2026 12:17:48 +0000
Subject: [PATCH] [mlir][tosa] Fix dense_resource data alignment in
 tosa-narrow-* tests

The alignment of int64 and float64 dense resource should be 8 and not 4
---
 mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32-aggressive.mlir | 2 +-
 mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32.mlir            | 2 +-
 mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32-aggressive.mlir | 2 +-
 mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir            | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32-aggressive.mlir b/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32-aggressive.mlir
index 191a337e88874..fe2145060ebb8 100644
--- a/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32-aggressive.mlir
+++ b/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32-aggressive.mlir
@@ -84,7 +84,7 @@ func.func @test_dense_ressource_f64() -> tensor<1x2xf64> {
   dialect_resources: {
     builtin: {
       // COMMON: resource: "0x04000000DB0F4940EAD6FCBD"
-      resource: "0x04000000182D4454FB21094059F64637DD9ABFBF"
+      resource: "0x08000000182D4454FB21094059F64637DD9ABFBF"
     }
   }
 #-}
diff --git a/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32.mlir b/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32.mlir
index be596eb890aad..f143a91149847 100644
--- a/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32.mlir
+++ b/mlir/test/Dialect/Tosa/tosa-narrow-f64-to-f32.mlir
@@ -194,7 +194,7 @@ func.func @test_dense_ressource_f64() -> tensor<1x2xf64> {
   dialect_resources: {
     builtin: {
       // COMMON: resource: "0x040000000000803F000080BF"
-      resource: "0x04000000000000000000F03F000000000000F0BF"
+      resource: "0x08000000000000000000F03F000000000000F0BF"
     }
   }
 #-}
diff --git a/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32-aggressive.mlir b/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32-aggressive.mlir
index f7ba9765be556..d80c16b109207 100644
--- a/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32-aggressive.mlir
+++ b/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32-aggressive.mlir
@@ -104,7 +104,7 @@ func.func @test_dense_ressource_i64() -> tensor<1x2xi64> {
   dialect_resources: {
     builtin: {
       // COMMON: resource: "0x04000000FFFFFF7F00000080"
-      resource: "0x04000000000000000800000000000000F8FFFFFF"
+      resource: "0x08000000000000000800000000000000F8FFFFFF"
     }
   }
 #-}
diff --git a/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir b/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir
index 6c01d80bdb38f..b15dc4c3d11ad 100644
--- a/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir
+++ b/mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir
@@ -215,7 +215,7 @@ func.func @test_dense_ressource_i64() -> tensor<1x2xi64> {
   dialect_resources: {
     builtin: {
       // COMMON: resource: "0x04000000FEFFFF7F905AE75A"
-      resource: "0x04000000FEFFFF7F00000000905AE75A00000000"
+      resource: "0x08000000FEFFFF7F00000000905AE75A00000000"
     }
   }
 #-}



More information about the Mlir-commits mailing list