1// RUN: tf-opt --tosa-fuse-bias-tf --verify-each %s | FileCheck %s 2 3// Operations for testing --tosa-fuse-bias-tf 4 5// ---- 6 7// CHECK-LABEL: test_conv2d_bias 8// CHECK: tosa.const 9// CHECK: tosa.transpose 10// CHECK: tosa.conv2d 11func @test_conv2d_bias(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<3x3x4x8xf32>, %arg2: tensor<8xf32>) -> tensor<1x4x4x8xf32> { 12 %0 = "tf.Conv2D"(%arg0, %arg1) {data_format = "NHWC", device = "", dilations = [1, 1, 1, 1], explicit_paddings = [], padding = "SAME", strides = [1, 1, 1, 1], use_cudnn_on_gpu = true} : (tensor<1x4x4x4xf32>, tensor<3x3x4x8xf32>) -> tensor<1x4x4x8xf32> 13 %1 = "tf.BiasAdd"(%0, %arg2) {data_format = "NHWC"} : (tensor<1x4x4x8xf32>, tensor<8xf32>) -> tensor<1x4x4x8xf32> 14 15 return %1 : tensor<1x4x4x8xf32> 16} 17