[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed May 29 09:06:56 PDT 2024


================
@@ -53,3 +53,29 @@
   }) { dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"unknown.unknown", 32>> } : () -> ()
   "test.maybe_terminator_op"() : () -> ()
 }) { dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"unknown.unknown", 32>> } : () -> ()
+
+// A valid target system description
+// CHECK: module attributes {
+// CHECK-SAME: dlti.target_system_desc_spec = #dlti.target_system_desc_spec<
+// CHECK-SAME:  #dlti.target_device_desc_spec<
+// CHECK-SAME:   #dlti.dl_entry<"dlti.device_id", 0 : ui32>,
+// CHECK-SAME:   #dlti.dl_entry<"dlti.device_type", "CPU">,
+// CHECK-SAME:   #dlti.dl_entry<"dlti.L1_cache_size_in_bytes", 4096 : ui32>>,
+// CHECK-SAME: #dlti.target_device_desc_spec<
+// CHECK-SAME:  #dlti.dl_entry<"dlti.device_id", 1 : ui32>,
+// CHECK-SAME:  #dlti.dl_entry<"dlti.device_type", "GPU">,
+// CHECK-SAME:  #dlti.dl_entry<"dlti.max_vector_op_width", 128 : ui32>>
+// CHECK-SAME: >} {
----------------
ftynse wrote:

Let's not overconstrain the tests, it's okay for these to be just `CHECK`, there is no fundamental requirement to not have a line break in the syntax.

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


More information about the Mlir-commits mailing list