aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/Bytecode/resources.mlir
blob: 3ef220e890042c679f1a412f506521d4803074e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: mlir-opt -emit-bytecode %s | mlir-opt | FileCheck %s

// CHECK-LABEL: @TestDialectResources
module @TestDialectResources attributes {
  // CHECK: bytecode.test = dense_resource<decl_resource> : tensor<2xui32>
  // CHECK: bytecode.test2 = dense_resource<resource> : tensor<4xf64>
  // CHECK: bytecode.test3 = dense_resource<"resource\09two"> : tensor<4xf64>
  bytecode.test = dense_resource<decl_resource> : tensor<2xui32>,
  bytecode.test2 = dense_resource<resource> : tensor<4xf64>,
  bytecode.test3 = dense_resource<"resource\09two"> : tensor<4xf64>
} {}

// CHECK: builtin: {
// CHECK-NEXT: resource: "0x08000000010000000000000002000000000000000300000000000000"
// CHECK-NEXT: "resource\09two": "0x08000000010000000000000002000000000000000300000000000000"

{-#
  dialect_resources: {
    builtin: {
      resource: "0x08000000010000000000000002000000000000000300000000000000",
      "resource\09two": "0x08000000010000000000000002000000000000000300000000000000"
    }
  }
#-}