[Mlir-commits] [mlir] [mlir] Spell inherent module dlti in the property dictionary (PR #232717)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 16 05:26:00 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-dlti

Author: Scott Manley (rscottmanley)

<details>
<summary>Changes</summary>

https://github.com/llvm/llvm-project/pull/222776 stores dlti as an inherent property of builtin.module, but the tests still write it in the attribute dictionary. Strict property assembly rejects that spelling. Move dlti into the property list and leave discardable attributes such as dlti.dl_spec in the attribute dictionary.

---

Patch is 25.96 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/232717.diff


10 Files Affected:

- (modified) mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir (+2-2) 
- (modified) mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir (+8-10) 
- (modified) mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir (+4-4) 
- (modified) mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir (+1-1) 
- (modified) mlir/test/Dialect/DLTI/invalid.mlir (+1-1) 
- (modified) mlir/test/Dialect/DLTI/query-op-interface.mlir (+1-1) 
- (modified) mlir/test/Dialect/DLTI/query.mlir (+27-45) 
- (modified) mlir/test/Dialect/MPI/canonicalize.mlir (+1-1) 
- (modified) mlir/test/Dialect/Shard/forward-sharding-propagation.mlir (+1-1) 
- (modified) mlir/test/Target/LLVMIR/target-to-data-layout-and-target-features.mlir (+13-13) 


``````````diff
diff --git a/mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir b/mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir
index 454e1c034e30cc..899875fb28e8ab 100644
--- a/mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir
+++ b/mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir
@@ -1,7 +1,7 @@
 // RUN: mlir-opt -emit-bytecode %s | mlir-opt | FileCheck %s
 
-// CHECK: module attributes {dlti = #dlti.map<"module" = 1 : i32>, gpu.container_module}
-module attributes {dlti = #dlti.map<"module" = 1 : i32>, gpu.container_module} {
+// CHECK: module <dlti = #dlti.map<"module" = 1 : i32>> attributes {gpu.container_module}
+module <dlti = #dlti.map<"module" = 1 : i32>> attributes {gpu.container_module} {
   // CHECK: func.func @new() attributes {dlti = #dlti.map<"func" = 2 : i32>}
   func.func @new() attributes {dlti = #dlti.map<"func" = 2 : i32>} {
     return
diff --git a/mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir b/mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir
index 5beb280ef760b9..635f9ada8d97d9 100644
--- a/mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir
+++ b/mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir
@@ -3,7 +3,7 @@
 // RUN: mlir-opt -split-input-file -convert-to-llvm="dynamic=true" %s | FileCheck %s
 
 // COM: Test MPICH ABI
-// CHECK-LABEL: module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">} {
+// CHECK-LABEL: module <dlti = #dlti.map<"MPI:Implementation" = "MPICH">> {
 // CHECK-DAG: llvm.func @MPI_Finalize() -> i32
 // CHECK-DAG: llvm.func @MPI_Reduce_scatter_block(!llvm.ptr, !llvm.ptr, i32, i32, i32, i32) -> i32
 // CHECK-DAG: llvm.func @MPI_Allreduce(!llvm.ptr, !llvm.ptr, i32, i32, i32, i32) -> i32
@@ -14,7 +14,7 @@
 // CHECK-DAG: llvm.func @MPI_Send(!llvm.ptr, i32, i32, i32, i32, i32) -> i32
 // CHECK-DAG: llvm.func @MPI_Comm_rank(i32, !llvm.ptr) -> i32
 // CHECK-DAG: llvm.func @MPI_Init(!llvm.ptr, !llvm.ptr) -> i32
-module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">} {
+module <dlti = #dlti.map<"MPI:Implementation" = "MPICH">> {
 
   // CHECK-LABEL: llvm.func @test_init_finalize_mpich
   func.func @test_init_finalize_mpich() {
@@ -155,7 +155,7 @@ module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">} {
 // -----
 
 // COM: Test OpenMPI ABI
-// CHECK-LABEL: module attributes {dlti = #dlti.map<"MPI:Implementation" = "OpenMPI">} {
+// CHECK-LABEL: module <dlti = #dlti.map<"MPI:Implementation" = "OpenMPI">> {
 // CHECK-DAG: llvm.func @MPI_Finalize() -> i32
 // CHECK-DAG: llvm.func @MPI_Comm_split(!llvm.ptr, i32, i32, !llvm.ptr) -> i32
 // CHECK-DAG: llvm.func @MPI_Reduce_scatter_block(!llvm.ptr, !llvm.ptr, i32, !llvm.ptr, !llvm.ptr, !llvm.ptr) -> i32
@@ -169,7 +169,7 @@ module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">} {
 // CHECK-DAG: llvm.func @MPI_Comm_rank(!llvm.ptr, !llvm.ptr) -> i32
 // CHECK-DAG: llvm.mlir.global external @ompi_mpi_comm_world() {addr_space = 0 : i32} : !llvm.struct<"ompi_communicator_t", opaque>
 // CHECK-DAG: llvm.func @MPI_Init(!llvm.ptr, !llvm.ptr) -> i32
-module attributes { dlti = #dlti.map<"MPI:Implementation" = "OpenMPI"> } {
+module <dlti = #dlti.map<"MPI:Implementation" = "OpenMPI">> {
 
   // CHECK-LABEL: llvm.func @test_init_finalize_openmpi
   func.func @test_init_finalize_openmpi() {
@@ -315,7 +315,7 @@ module attributes { dlti = #dlti.map<"MPI:Implementation" = "OpenMPI"> } {
 
 // -----
 
-module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH", "MPI:comm_world_size" = 4, "MPI:comm_world_rank" = 1> } {
+module <dlti = #dlti.map<"MPI:Implementation" = "MPICH", "MPI:comm_world_size" = 4, "MPI:comm_world_rank" = 1>> {
   // CHECK-LABEL: llvm.func @test_fold
   func.func @test_fold(%arg0: memref<100xf32>) {
     // CHECK: [[v0:%.*]] = llvm.mlir.constant(1140850688 : i64) : i64
@@ -332,8 +332,7 @@ module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH", "MPI:comm_wo
 
 // COM: Test that an index type that already matches the MPI element count width
 // COM: is used as is, both for the offset and for the extents.
-module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">,
-                   dlti.dl_spec = #dlti.dl_spec<index = 32 : i32>} {
+module <dlti = #dlti.map<"MPI:Implementation" = "MPICH">> attributes {dlti.dl_spec = #dlti.dl_spec<index = 32 : i32>} {
   // CHECK-LABEL: llvm.func @test_send_index32
   func.func @test_send_index32(%arg0: memref<100xf32>, %rank: i32) {
     // CHECK: [[v0:%.*]] = llvm.insertvalue {{.*}}[4, 0] : !llvm.struct<(ptr, ptr, i32, array<1 x i32>, array<1 x i32>)>
@@ -357,8 +356,7 @@ module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">,
 
 // COM: Test that an index type narrower than the MPI element count is zero
 // COM: extended.
-module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">,
-                   dlti.dl_spec = #dlti.dl_spec<index = 16 : i32>} {
+module <dlti = #dlti.map<"MPI:Implementation" = "MPICH">> attributes {dlti.dl_spec = #dlti.dl_spec<index = 16 : i32>} {
   // CHECK-LABEL: llvm.func @test_send_index16
   func.func @test_send_index16(%arg0: memref<100xf32>, %rank: i32) {
     // CHECK: [[v0:%.*]] = llvm.insertvalue {{.*}}[4, 0] : !llvm.struct<(ptr, ptr, i16, array<1 x i16>, array<1 x i16>)>
@@ -380,7 +378,7 @@ module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">,
 
 // COM: Test that a rank-zero memref, whose descriptor carries no extents, uses
 // COM: the element count of one directly.
-module attributes {dlti = #dlti.map<"MPI:Implementation" = "MPICH">} {
+module <dlti = #dlti.map<"MPI:Implementation" = "MPICH">> {
   // CHECK-LABEL: llvm.func @test_send_rank_zero
   func.func @test_send_rank_zero(%arg0: memref<f32>, %rank: i32) {
     // CHECK: [[v0:%.*]] = llvm.insertvalue {{.*}}[2] : !llvm.struct<(ptr, ptr, i64)>
diff --git a/mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir b/mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir
index 02612061676d5e..d330fae80735a8 100644
--- a/mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir
+++ b/mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir
@@ -69,7 +69,7 @@ func.func @neighbors_dim2(%arg0 : tensor<120x120x120xi8>) -> (index, index) {
 
 // -----
 // CHECK: shard.grid @grid0
-module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 24> } {
+module <dlti = #dlti.map<"MPI:comm_world_rank" = 24>> {
   shard.grid @grid0(shape = 3x4x5)
   func.func @process_multi_index() -> (index, index, index) {
     // CHECK-DAG: %[[c4:.*]] = arith.constant 4 : index
@@ -107,7 +107,7 @@ module {
 }
 
 // -----
-module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 7> } {
+module <dlti = #dlti.map<"MPI:comm_world_rank" = 7>> {
   shard.grid @grid0(shape = 3x4x5)
   // CHECK-LABEL: func.func @allreduce_tensor(
   func.func @allreduce_tensor(
@@ -291,7 +291,7 @@ func.func @update_halo_1d_first(
 }
 
 // -----
-module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 1> } {
+module <dlti = #dlti.map<"MPI:comm_world_rank" = 1>> {
   shard.grid @grid0(shape = 4)
   // CHECK-LABEL: func @update_halo_1d_with_zero
   func.func @update_halo_1d_with_zero (
@@ -316,7 +316,7 @@ module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 1> } {
 }
 
 // -----
-module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 24> } {
+module <dlti = #dlti.map<"MPI:comm_world_rank" = 24>> {
   shard.grid @grid0(shape = 3x4x5)
   // CHECK-LABEL: func @update_halo_3d
   func.func @update_halo_3d(
diff --git a/mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir b/mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir
index 6337a1f0a178b3..d777dc4b58ee43 100644
--- a/mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir
+++ b/mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir
@@ -1,6 +1,6 @@
 // RUN: mlir-opt %s --convert-shard-to-mpi -canonicalize | FileCheck %s
 
-module attributes { dlti = #dlti.map<"MPI:comm_world_rank" = 24> } {
+module <dlti = #dlti.map<"MPI:comm_world_rank" = 24>> {
 
   // CHECK: shard.grid @grid0
   shard.grid @grid0(shape = 3x4x5)
diff --git a/mlir/test/Dialect/DLTI/invalid.mlir b/mlir/test/Dialect/DLTI/invalid.mlir
index c0d93ce686354a..6b7a9dc257a578 100644
--- a/mlir/test/Dialect/DLTI/invalid.mlir
+++ b/mlir/test/Dialect/DLTI/invalid.mlir
@@ -11,7 +11,7 @@
 // -----
 
 // expected-error at below {{attribute 'dlti' failed to satisfy constraint}}
-module attributes {dlti = 42 : i32} {}
+module <dlti = 42 : i32> {}
 
 // -----
 
diff --git a/mlir/test/Dialect/DLTI/query-op-interface.mlir b/mlir/test/Dialect/DLTI/query-op-interface.mlir
index 74df84ba8a5458..25f8d730d4cd1f 100644
--- a/mlir/test/Dialect/DLTI/query-op-interface.mlir
+++ b/mlir/test/Dialect/DLTI/query-op-interface.mlir
@@ -2,7 +2,7 @@
 // RUN: mlir-opt %s -emit-bytecode | mlir-opt --mlir-print-op-generic | FileCheck --check-prefix=BYTECODE %s
 
 // BYTECODE: "builtin.module"() <{dlti = #dlti.map<"module" = 1 : i32>}> ({
-module attributes {dlti = #dlti.map<"module" = 1 : i32>} {
+module <dlti = #dlti.map<"module" = 1 : i32>> {
   // CHECK: "test.op_with_data_layout"() <{dlti = #dlti.map<"replaced" = 2 : i32, i32 = 32 : i32, "inserted" = 1 : i32>}> ({
   // CHECK-NOT: test.dlti_action
   "test.op_with_data_layout"() ({
diff --git a/mlir/test/Dialect/DLTI/query.mlir b/mlir/test/Dialect/DLTI/query.mlir
index 08aa97e7cefaed..71b8dba583ea18 100644
--- a/mlir/test/Dialect/DLTI/query.mlir
+++ b/mlir/test/Dialect/DLTI/query.mlir
@@ -1,7 +1,7 @@
 // RUN: mlir-opt -transform-interpreter -canonicalize -split-input-file -verify-diagnostics %s | FileCheck %s
 
 // expected-remark @below {{attr associated to "test.id" = 42 : i32}}
-module attributes { dlti = #dlti.map<"test.id" = 42 : i32> } {
+module <dlti = #dlti.map<"test.id" = 42 : i32>> {
   func.func private @f()
 }
 
@@ -18,7 +18,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-remark @below {{i32 present in set : unit}}
-module attributes { dlti = #dlti.map<i32 = unit> } {
+module <dlti = #dlti.map<i32 = unit>> {
   func.func private @f()
 }
 
@@ -53,7 +53,7 @@ module attributes {transform.with_named_sequence} {
 
 // A nearer interface-bearing operation that cannot answer the first key does
 // not hide an association on an ancestor.
-module attributes { dlti = #dlti.map<"test.id" = 42 : i32> } {
+module <dlti = #dlti.map<"test.id" = 42 : i32>> {
   // expected-remark @below {{associated attr 42 : i32}}
   func.func private @f() attributes {
     dlti = #dlti.map<"other" = 24 : i32>
@@ -72,7 +72,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // Once the first key succeeds, later keys query only the returned attribute.
-module attributes { dlti = #dlti.map<"root" = #dlti.map<"leaf" = 42 : i32>> } {
+module <dlti = #dlti.map<"root" = #dlti.map<"leaf" = 42 : i32>>> {
   // expected-error @below {{target op of failed DLTI query}}
   // expected-note @below {{key "leaf" has no DLTI-mapping per attr: #dlti.map<"other" = 24 : i32>}}
   func.func private @f() attributes {
@@ -92,7 +92,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-remark @below {{attr associated to i32's "width_in_bits" = 32 : i32}}
-module attributes { dlti = #dlti.map<i32 = #dlti.map<"width_in_bits" = 32 : i32>> } {
+module <dlti = #dlti.map<i32 = #dlti.map<"width_in_bits" = 32 : i32>>> {
   func.func private @f()
 }
 
@@ -110,7 +110,7 @@ module attributes {transform.with_named_sequence} {
 
 // expected-remark @below {{width in bits of i32 = 32 : i64}}
 // expected-remark @below {{width in bits of f64 = 64 : i64}}
-module attributes { dlti = #dlti.map<"width_in_bits" = #dlti.map<i32 = 32, f64 = 64>> } {
+module <dlti = #dlti.map<"width_in_bits" = #dlti.map<i32 = 32, f64 = 64>>> {
   func.func private @f()
 }
 
@@ -129,7 +129,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-remark @below {{attr associated to "test.id" = 42 : i32}}
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   func.func private @f()
 }
 
@@ -145,7 +145,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   // expected-remark @below {{attr associated to "test.id" = 24 : i32}}
   func.func private @f() attributes { dlti = #dlti.dl_spec<"test.id" = 24 : i32>}
 }
@@ -162,7 +162,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-remark @below {{attr associated to "test.id" = 42 : i32}}
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   func.func private @f() attributes { dlti = #dlti.dl_spec<"test.id" = 24 : i32> }
 }
 
@@ -178,7 +178,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   func.func @matmul_tensors(
     %arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>)
       -> tensor<?x?xf32> {
@@ -201,7 +201,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   func.func @matmul_tensors(
     %arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>)
       -> tensor<?x?xf32> attributes {dlti = #dlti.dl_spec<"test.id" = 24 : i32> } {
@@ -225,9 +225,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-remark @below {{associated attr 42 : i32}}
-module attributes { dlti =
-  #dlti.target_system_spec<"CPU" =
-    #dlti.target_device_spec<"test.id" = 42 : i32>> } {
+module <dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>>> {
   func.func private @f()
 }
 
@@ -243,8 +241,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>,
-                                                         "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>> } {
+module <dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>, "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>>> {
   // expected-remark @below {{associated attr 43 : i32}}
   func.func private @f()
 }
@@ -260,8 +257,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>,
-                                                         "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>> } {
+module <dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>, "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>>> {
   // expected-remark @below {{associated attr 24 : i32}}
   func.func private @f() attributes { dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"test.id" = 24 : i32>> }
 }
@@ -277,10 +273,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<
-  "CPU" = #dlti.target_device_spec<
-    "cache::L1::size_in_bytes" = 65536 : i32,
-    "cache::L1d::size_in_bytes" = 32768 : i32>> } {
+module <dlti = #dlti.target_system_spec< "CPU" = #dlti.target_device_spec< "cache::L1::size_in_bytes" = 65536 : i32, "cache::L1d::size_in_bytes" = 32768 : i32>>> {
   // expected-remark @below {{L1::size_in_bytes 65536 : i32}}
   // expected-remark @below {{L1d::size_in_bytes 32768 : i32}}
   func.func private @f()
@@ -301,11 +294,7 @@ module attributes {transform.with_named_sequence} {
 
 #l1_size = #dlti.map<"size_in_bytes" = 65536 : i32>
 #l1d_size = #dlti.map<"size_in_bytes" = 32768 : i32>
-module attributes { dlti =
-  #dlti.target_system_spec<"CPU" =
-    #dlti.target_device_spec<"cache" =
-      #dlti.map<"L1" = #l1_size,
-                "L1d" = #l1d_size >>> } {
+module <dlti = #dlti.target_system_spec<"CPU" = #dlti.target_device_spec<"cache" = #dlti.map<"L1" = #l1_size, "L1d" = #l1d_size >>>> {
   // expected-remark @below {{L1::size_in_bytes 65536 : i32}}
   // expected-remark @below {{L1d::size_in_bytes 32768 : i32}}
   func.func private @f()
@@ -324,8 +313,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<
-  "CPU" = #dlti.target_device_spec<"inner_most_tile_size" = 42 : i32>> } {
+module <dlti = #dlti.target_system_spec< "CPU" = #dlti.target_device_spec<"inner_most_tile_size" = 42 : i32>>> {
   // CHECK-LABEL: func @matmul_tensors
   func.func @matmul_tensors(
     %arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>, %arg2: tensor<?x?xf32>)
@@ -355,9 +343,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<
-    "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>,
-    "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>> } {
+module <dlti = #dlti.target_system_spec< "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>, "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>>> {
   // expected-error @below {{target op of failed DLTI query}}
   // expected-note @below {{no DLTI-queryable operation on the target or any of its ancestors could answer key "NPU"}}
   func.func private @f()
@@ -375,9 +361,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-note @below {{key "unspecified" has no DLTI-mapping per attr: #dlti.target_device_spec}}
-module attributes { dlti = #dlti.target_system_spec<
-    "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>,
-    "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>> } {
+module <dlti = #dlti.target_system_spec< "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>, "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>>> {
   // expected-error @below {{target op of failed DLTI query}}
   func.func private @f()
 }
@@ -393,9 +377,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.target_system_spec<
-  "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>,
-  "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>> } {
+module <dlti = #dlti.target_system_spec< "CPU" = #dlti.target_device_spec<"test.id" = 42 : i32>, "GPU" = #dlti.target_device_spec<"test.id" = 43 : i32>>> {
   // expected-error @below {{target op of failed DLTI query}}
   // expected-note @below {{no DLTI-queryable operation on the target or any of its ancestors could answer key "test.id"}}
   func.func private @f()
@@ -412,7 +394,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.dl_spec<"test.id" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"test.id" = 42 : i32>> {
   // expected-error @below {{target op of failed DLTI query}}
   // expected-note @below {{no DLTI-queryable operation on the target or any of its ancestors could answer key "CPU"}}
   func.func private @f()
@@ -430,7 +412,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-note @below {{got non-DLTI-queryable attribute upon looking up keys ["CPU"]}}
-module attributes { dlti = #dlti.dl_spec<"CPU" = 42 : i32> } {
+module <dlti = #dlti.dl_spec<"CPU" = 42 : i32>> {
   // expected-error @below {{target op of failed DLTI query}}
   func.func private @f()
 }
@@ -447,7 +429,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-note @below {{got non-DLTI-queryable attribute upon looking up keys [i32]}}
-module attributes { dlti = #dlti.dl_spec<i32 = 32 : i32> } {
+module <dlti = #dlti.dl_spec<i32 = 32 : i32>> {
   // expected-error @below {{target op of failed DLTI query}}
   func.func private @f()
 }
@@ -481,7 +463,7 @@ module attributes {transform.with_named_sequence} {
 // -----
 
 // expected-note @below {{key i64 has no DLTI-mapping per attr: #dlti.map<i32 = 32 : i64>}}
-module attributes { dlti = #dlti.map<"width_in_bits" = #dlti.map<i32 = 32>>} {
+module <dlti = #dlti.map<"width_in_bits" = #dlti.map<i32 = 32>>> {
   // expected-error @below {{target op of failed DLTI query}}
   func.func private @f()
 }
@@ -497,7 +479,7 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
-module attributes { dlti = #dlti.dl_spec<"...
[truncated]

``````````

</details>


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


More information about the Mlir-commits mailing list