// RUN: npcomp-opt <%s | npcomp-opt | FileCheck %s // CHECK-LABEL: refback.global @foo dense<0.0{{.*}}> : tensor<10xf32> refback.global @foo dense<0.0> : tensor<10xf32> // CHECK-LABEL: func @global func @global() { // CHECK: refback.get_global_memref @foo : memref<10xf32> %0 = refback.get_global_memref @foo : memref<10xf32> return } // CHECK-LABEL: func @shaped_results // CHECK-NEXT: %[[RET:.*]] = refback.shaped_results %arg1 { // CHECK-NEXT: %[[VAL:.*]] = // CHECK-NEXT: refback.yield %[[VAL]] : tensor // CHECK-NEXT: } : tensor -> tensor // CHECK-NEXT: return %[[RET]] : tensor // CHECK-NEXT: } func @shaped_results(%arg0: tensor, %arg1: tensor) -> tensor { %add = refback.shaped_results %arg1 { %0 = tcp.add %arg0, %arg0 : (tensor, tensor) -> tensor refback.yield %0 : tensor } : tensor -> tensor return %add : tensor }