Fix GCC build problem with 288f05f related to SmallVector. (#116958)
[llvm-project.git] / mlir / test / IR / pretty-resources-print.mlir
blob625967fcb76038daf5b1de1285103c8bbf7c0402
1 // Check printing with --mlir-elide-resource-strings-if-larger elides printing large resources
3 // RUN: mlir-opt %s --mlir-elide-resource-strings-if-larger=20| FileCheck %s
5 // To ensure we print the resource keys, have reference to them
6 // CHECK: attr = dense_resource<blob1> : tensor<3xi64>
7 "test.blob1op"() {attr = dense_resource<blob1> : tensor<3xi64> } : () -> ()
9 // CHECK-NEXT: attr = dense_resource<blob2> : tensor<3xi64>
10 "test.blob2op"() {attr = dense_resource<blob2> : tensor<3xi64> } : () -> ()
12 // CHECK:      {-#
13 // CHECK-NEXT:   external_resources: {
14 // CHECK-NEXT:     external: {
15 // CHECK-NEXT:       bool: true,
16 // CHECK-NEXT:       string: "\22string\22"
17 // CHECK-NEXT:     },
18 // CHECK-NEXT:     other_stuff: {
19 // CHECK-NEXT:       bool: true
20 // CHECK-NEXT:     }
21 // CHECK-NEXT:   }
22 // CHECK-NEXT: #-}
24 {-#
25   dialect_resources: {
26     builtin: {
27       blob1: "0x08000000010000000000000002000000000000000300000000000000",
28       blob2: "0x08000000040000000000000005000000000000000600000000000000"
29     }
30   },
31   external_resources: {
32     external: {
33       blob: "0x08000000010000000000000002000000000000000300000000000000",
34       bool: true,
35       string: "\"string\"" // with escape characters
36     },
37     other_stuff: {
38       bool: true
39     }
40   }
41 #-}