1// RUN: mlir-opt %s | mlir-opt | FileCheck %s 2 3// Check that we only preserve the blob that got referenced. 4// CHECK: {-# 5// CHECK-NEXT: dialect_resources: { 6// CHECK-NEXT: test: { 7// CHECK-NEXT: blob1: "0x08000000010000000000000002000000000000000300000000000000" 8// CHECK-NEXT: } 9// CHECK-NEXT: }, 10 11// Check that we properly preserve unknown external resources. 12// CHECK-NEXT: external_resources: { 13// CHECK-NEXT: external: { 14// CHECK-NEXT: blob: "0x08000000010000000000000002000000000000000300000000000000" 15// CHECK-NEXT: bool: true 16// CHECK-NEXT: string: "string" 17// CHECK-NEXT: }, 18// CHECK-NEXT: other_stuff: { 19// CHECK-NEXT: bool: true 20// CHECK-NEXT: } 21// CHECK-NEXT: } 22// CHECK-NEXT: #-} 23 24module attributes { test.blob_ref = #test.e1di64_elements<blob1> : tensor<*xi1>} {} 25 26{-# 27 dialect_resources: { 28 test: { 29 blob1: "0x08000000010000000000000002000000000000000300000000000000", 30 blob2: "0x08000000040000000000000005000000000000000600000000000000" 31 } 32 }, 33 external_resources: { 34 external: { 35 blob: "0x08000000010000000000000002000000000000000300000000000000", 36 bool: true, 37 string: "string" 38 }, 39 other_stuff: { 40 bool: true 41 } 42 } 43#-} 44