| // Copyright 2023 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| module { |
| func.func @main(%arg0: tensor<1x112x112x8xi8>) -> tensor<1x112x112x16xi8> { |
| %0 = "tosa.const"() {value = dense<[-918, -4433, 87, -234, -21393, 7738, 529, -8835, -16817, -375, -199, 572, 5082, 15569, -186, 4955]> : tensor<16xi32>} : () -> tensor<16xi32> |
| %1 = "tosa.const"() {value = dense<"0xE2E2E2E2E2EBF6E206E2E2E8EBE6DEE2E0E2E2FDDCE7E1E2E2E2E2FDDFE6E0E3EBE2E2DCEFAC213DE2E2E2E3E2D3C9E4E2E2E2E2E3E1E1FA3EE2E2E9E9E5E3E47FE2E2E4EDE2E2E3E0E2E2E4DFE9DCFEE3E2E2E2E2E2E2E2F9E2E2E6EBEADCE4E2E2E2CEE5E1E0E181E2E2D9D3DEE1DDE2E2E2E2E2E2E2E2C5E2E2E2DBE1E3E1"> : tensor<16x1x1x8xi8>} : () -> tensor<16x1x1x8xi8> |
| %2 = "tosa.conv2d"(%arg0, %1, %0) {dilation = array<i64: 1, 1>, pad = array<i64: 0, 0, 0, 0>, quantization_info = #tosa.conv_quant<input_zp = -128, weight_zp = -30>, stride = array<i64: 1, 1>} : (tensor<1x112x112x8xi8>, tensor<16x1x1x8xi8>, tensor<16xi32>) -> tensor<1x112x112x16xi32> |
| %3 = "tosa.rescale"(%2) {double_round = true, input_zp = 0 : i32, multiplier = array<i32: 1364139008>, output_zp = -128 : i32, per_channel = false, scale32 = true, shift = array<i8: 35>} : (tensor<1x112x112x16xi32>) -> tensor<1x112x112x16xi8> |
| return %3 : tensor<1x112x112x16xi8> |
| } |
| } |